(()=>{function e(m,a,u,e){var f="service/connectivity",c={getTerminalDetails:{prefix:"mo",suffix:"op/terminal",mo:!0,method:"GET"},getTerminalSessionInfo:{prefix:"mo",suffix:"op/terminal/session",mo:!0,method:"GET"},setTerminalSimStatus:{prefix:"mo",suffix:"op/terminal/sim_status",mo:!0,method:"PUT"},setTerminalSimStatusV2:{prefix:"mo",suffix:"op/terminal/sim/status",mo:!0,method:"PUT"},getTerminalAuditLogs:{prefix:"mo",suffix:"op/terminal/audit",mo:!0,method:"GET"},getTerminalUsage:{prefix:"mo",suffix:"op/billing",mo:!0,method:"GET"},getTerminalVoiceUsage:{prefix:"mo",suffix:"op/billing/voice",mo:!0,method:"GET"},getTerminalDataUsage:{prefix:"mo",suffix:"op/billing/data",mo:!0,method:"GET"},getTerminalSmsUsage:{prefix:"mo",suffix:"op/billing/sms",mo:!0,method:"GET"},sendSms:{prefix:"mo",suffix:"op/sms",mo:!0,method:"POST"},getSms:{prefix:"mo",suffix:"op/sms",mo:!0,method:"GET"},getSmsDetails:{prefix:"mo",suffix:"op/sms/details",mo:!0,method:"GET"},ping:{suffix:"op/ping",mo:!1,method:"GET"},getSource:{prefix:"mo",suffix:"op/terminal/source",mo:!0,method:"GET"},getProviderSupportedFunctionalities:{suffix:"metadata/sim/functionalities",mo:!1,method:"GET"},getAvailableProvidersList:{suffix:"metadata/sim/providers",mo:!1,method:"GET"},disconnectSimFromSession:{prefix:"mo",suffix:"op/terminal/sim/disconnect/session",mo:!0,method:"POST"}};return{detail:o,getTerminalDetails:function(e,t,i,n){return o("getTerminalDetails",e,t,i,n)},getTerminalSessionInfo:function(e,t,i,n){return o("getTerminalSessionInfo",e,t,i,n)},setTerminalSimStatus:function(e,t,i,n){return o("setTerminalSimStatus",e,t,i,n)},setTerminalSimStatusV2:function(e,t,i,n){return o("setTerminalSimStatusV2",e,t,i,n)},getTerminalAuditLogs:function(e,t,i,n){return o("getTerminalAuditLogs",e,t,i,n)},getTerminalUsage:function(e,t,i,n){return o("getTerminalUsage",e,t,i,n)},getTerminalVoiceUsage:function(e,t,i,n){return o("getTerminalVoiceUsage",e,t,i,n)},getTerminalDataUsage:function(e,t,i,n){return o("getTerminalDataUsage",e,t,i,n)},getTerminalSmsUsage:function(e,t,i,n){return o("getTerminalSmsUsage",e,t,i,n)},getSms:function(e,t,i,n){return o("getSms",e,t,i,n)},sendSms:function(e,t,i,n){return o("sendSms",e,t,i,n)},getSmsDetails:function(e,t,i,n){return o("getSmsDetails",e,t,i,n)},getSource:function(e,t,i,n){return o("getSource",e,t,i,n)},getProviderSupportedFunctionalities:function(){return o("getProviderSupportedFunctionalities","mo",{},{},{silentError:!0})},getAvailableProvidersList:function(){return o("getAvailableProvidersList","mo",{},{},{silentError:!0})},disconnectSimFromSession:function(e,t,i){return o("disconnectSimFromSession",e,{},t,i)},ping:function(){return r("ping","mo",{},{},{silentError:!0})},getStatuses:function(){var e="".concat(f,"/metadata/sim/statuses");return m.get(u.url(e)).then(u.getResData)},isConnectivitySubscribed:function(){return e.isAvailable("connectivity").then(function(e){return e||a.reject("Connectivity microservice is not subscribed")})}};function o(e,t,i,n,o){return r(e,t,i,n,o).then(u.getResData)}function r(e,t,i,n,o){return t&&e?(r=e,e=t,t=i,i=n,n=o,s=[u.url(f)],c[r].mo?c[r].mo=e:delete c.mo,_.forEach(["prefix","mo","suffix"],function(e){c[r][e]&&s.push(c[r][e])}),e=s.join("/"),e={method:c[r].method,url:e,data:t,params:i,headers:{Accept:"application/json","Content-Type":"application/json;charset=UTF-8"}},e=_.assign(e,n||{}),m(e)):a.reject("Device not valid");var r,s}}e.$inject=["$http","$q","c8yBase","c8yApplication"],angular.module("c8y.core").factory("c8yConnectivity",e)})();