Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mkm-service-progresstrackerassignments

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mkm-service-progresstrackerassignments - npm Package Compare versions

Comparing version 2.0.12 to 2.0.13

2

lib/index.js

@@ -1,2 +0,2 @@

module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(e,t,n){"use strict";var r=n(2),o=n(10),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function s(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:o,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:u,isStream:function(e){return s(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function e(){var t={};function n(n,r){"object"==typeof t[r]&&"object"==typeof n?t[r]=e(t[r],n):t[r]=n}for(var r=0,o=arguments.length;r<o;r++)c(arguments[r],n);return t},extend:function(e,t,n){return c(t,function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t,n){"use strict";(function(t){var r=n(0),o=n(13),i={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,u={adapter:("undefined"!=typeof XMLHttpRequest?s=n(3):void 0!==t&&(s=n(3)),s),transformRequest:[function(e,t){return o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(e){u.headers[e]={}}),r.forEach(["post","put","patch"],function(e){u.headers[e]=r.merge(i)}),e.exports=u}).call(this,n(12))},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(0),o=n(14),i=n(16),a=n(17),s=n(18),u=n(4),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(19);e.exports=function(e){return new Promise(function(t,f){var l=e.data,d=e.headers;r.isFormData(l)&&delete d["Content-Type"];var h=new XMLHttpRequest,p="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in h||s(e.url)||(h=new window.XDomainRequest,p="onload",m=!0,h.onprogress=function(){},h.ontimeout=function(){}),e.auth){var g=e.auth.username||"",v=e.auth.password||"";d.Authorization="Basic "+c(g+":"+v)}if(h.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h[p]=function(){if(h&&(4===h.readyState||m)&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in h?a(h.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:1223===h.status?204:h.status,statusText:1223===h.status?"No Content":h.statusText,headers:n,config:e,request:h};o(t,f,r),h=null}},h.onerror=function(){f(u("Network Error",e,null,h)),h=null},h.ontimeout=function(){f(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var y=n(20),w=(e.withCredentials||s(e.url))&&e.xsrfCookieName?y.read(e.xsrfCookieName):void 0;w&&(d[e.xsrfHeaderName]=w)}if("setRequestHeader"in h&&r.forEach(d,function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete d[t]:h.setRequestHeader(t,e)}),e.withCredentials&&(h.withCredentials=!0),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){h&&(h.abort(),f(e),h=null)}),void 0===l&&(l=null),h.send(l)})}},function(e,t,n){"use strict";var r=n(15);e.exports=function(e,t,n,o,i){var a=new Error(e);return r(a,t,n,o,i)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.ProgressTrackerAssignementService=void 0;var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(8);var a=((r=i)&&r.__esModule?r:{default:r}).default.create({params:{},headers:{Pragma:"no-cache"}});a.interceptors.request.use(function(e){var t=localStorage.getItem("authToken"),n=localStorage.getItem("roleToken"),r=localStorage.getItem("deviceId");return t&&(e.headers.Authorization="Bearer "+t),n&&(e.headers["x-current-role-token"]=n),r&&(e.headers.DeviceId=r),e});var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.apiUrl=t.apiUri+t.upstreamPath,this.apiRoot=t.apiUri}return o(e,[{key:"getActiveAssignments",value:function(){var e=this;return new Promise(function(t,n){a.get(e.apiUrl+"forotherswithgroups").then(function(e){e.data?t(e.data):n("No progress tracker assignments available")}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentsForUser",value:function(e){var t=this;return new Promise(function(n,r){a.get(t.apiUrl+"forother/user/"+e).then(function(e){e.data?n(e.data):n("Issue fetching assessments")}).catch(function(e){return n({deploymentSummaries:[],groups:[]})})})}},{key:"getActiveAssignment",value:function(e){var t=this;return new Promise(function(n,r){a.get(t.apiUrl+"reviewer/"+e).then(function(e){e.data&&n(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentForUser",value:function(e,t,n,r){var o=this;return new Promise(function(i,s){a.get(o.apiUrl+"foruser/"+e+"/user/"+t+"?startDate="+n+"&endDate="+r).then(function(e){e.data&&i(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getAssignmentMarksForUser",value:function(e,t,n){var r=this;return new Promise(function(o,i){a.get(r.apiUrl+"MarkForOther/"+e+"/"+t+"/who/"+n).then(function(e){e.data&&o(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getAssignmentMarksForMe",value:function(e,t){var n=this;return new Promise(function(r,o){a.get(n.apiUrl+"MarkForMe/"+e+"/"+t).then(function(e){e.data&&r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getAssignmentMarksForUser",value:function(e,t,n){var r=this;return new Promise(function(o,i){a.get(r.apiUrl+"MarkForOther/"+e+"/"+t+"/who/"+n).then(function(e){e.data&&o(e.data)}).catch(function(e){return console.log(e)})})}},{key:"addAssignmentMarkForUser",value:function(e,t){var n=this;return new Promise(function(r,o){a.post(n.apiUrl+"createMark/"+e,t).then(function(e){e.data&&r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"addAssignmentMarkForMe",value:function(e,t){var n=this;return new Promise(function(r,o){a.post(n.apiUrl+"createMark/"+e,t).then(function(e){e.data&&r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"retractAssignmentMarkForUser",value:function(e,t,n,r){var o=this;return new Promise(function(i,s){a.post(o.apiUrl+"MarkForOther/"+e+"/"+t+"/retract/who/"+n,r).then(function(e){e.data&&i(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentsForMe",value:function(){var e=this;return new Promise(function(t,n){a.get(e.apiUrl+"formewithgroups").then(function(e){e.data?t(e.data):t("Issue fetching assignments")}).catch(function(e){return t({deploymentSummaries:[],groups:[]})})})}},{key:"getActiveAssignmentForMe",value:function(e,t,n){var r=this;return new Promise(function(o,i){a.get(r.apiUrl+"forme/"+e+"?startDate="+t+"&endDate="+n).then(function(e){e.data&&o(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentProgressForMe",value:function(e,t,n){var r=this;return new Promise(function(o,i){a.get(r.apiUrl+"progressforme/"+e+"?startDate="+t+"&endDate="+n).then(function(e){e.data&&o(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentProgressForUser",value:function(e,t,n,r){var o=this;return new Promise(function(i,s){a.get(o.apiUrl+"progressforuser/"+e+"/user/"+t+"?startDate="+n+"&endDate="+r).then(function(e){e.data&&i(e.data)}).catch(function(e){return i(null)})})}},{key:"getActiveAssignmentProgress",value:function(e,t,n){var r=this;return new Promise(function(o,i){a.get(r.apiUrl+"progressforassignment/"+e+"?startDate="+t+"&endDate="+n).then(function(e){e.data&&o(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentProgressForGroup",value:function(e,t,n,r){var o=this;return new Promise(function(i,s){a.get(o.apiUrl+"progressforall/"+e+"/group/"+t+"?startDate="+n+"&endDate="+r).then(function(e){e.data&&i(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentCommentsForMe",value:function(e,t,n){var r=this;return new Promise(function(o,i){a.get(r.apiUrl+"forme/"+e+"/comments?startDate="+t+"&endDate="+n).then(function(e){e.data&&o(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentCommentsForMeForDetail",value:function(e,t,n,r){var o=this;return new Promise(function(i,s){a.get(o.apiUrl+"forme/"+e+"/comments/"+t+"?startDate="+n+"&endDate="+r).then(function(e){e.data&&i(e.data)}).catch(function(e){return console.log(e)})})}},{key:"createtActiveAssignmentCommentsForMeForDetail",value:function(e,t,n){var r=this;return new Promise(function(o,i){a.post(r.apiUrl+"forme/"+e+"/comments/"+t,n).then(function(e){e.data&&o(e.data)}).catch(function(e){return console.log(e)})})}},{key:"updateActiveAssignmentCommentsForMeForDetail",value:function(e,t){var n=this;return new Promise(function(r,o){a.put(n.apiUrl+"forme/"+e+"/comments/"+t.whatForDetailId,t).then(function(e){e.data&&r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentCommentsForOthers",value:function(e,t,n,r){var o=this;return new Promise(function(t,i){a.get(o.apiUrl+"forothers/"+e+"/comments?startDate="+n+"&endDate="+r).then(function(e){e.data&&t(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentCommentsForMeForOthers",value:function(e,t,n,r,o){var i=this;return new Promise(function(s,u){a.get(i.apiUrl+"forothers/"+e+"/comments/"+t+"/"+n+"?startDate="+r+"&endDate="+o).then(function(e){e.data&&s(e.data)}).catch(function(e){return console.log(e)})})}},{key:"createtActiveAssignmentCommentsForMeForOthers",value:function(e,t,n,r){var o=this;return new Promise(function(i,s){a.post(o.apiUrl+"forothers/"+e+"/comments/"+t+"/"+n,r).then(function(e){e.data&&i(e.data)}).catch(function(e){return console.log(e)})})}},{key:"updateActiveAssignmentCommentsForMeForOthers",value:function(e,t,n){var r=this;return new Promise(function(o,i){a.put(r.apiUrl+"forothers/"+e+"/comments/"+n.whatForDetailId+"/"+t,n).then(function(e){e.data&&o(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getAllAssignmentEvidenceForMe",value:function(e,t,n){var r=this;return new Promise(function(o,i){a.get(r.apiUrl+"EvidenceForMe/"+e+"?startDate="+t+"&endDate="+n).then(function(e){e.data&&o(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getAssignmentEvidenceForMe",value:function(e,t,n,r){var o=this;return new Promise(function(i,s){a.get(o.apiUrl+"EvidenceForMe/"+e+"/"+t+"?startDate="+n+"&endDate="+r).then(function(e){e.data&&i(e.data)}).catch(function(e){return console.log(e)})})}},{key:"addAssignmentEvidenceForMe",value:function(e,t){var n=this;return new Promise(function(r,o){a.post(n.apiUrl+"EvidenceForMe/"+e,t).then(function(e){r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"removeAssignmentEvidenceForMe",value:function(e,t){var n=this;return new Promise(function(r,o){a.delete(n.apiUrl+"EvidenceForMe/"+e+"/evidence/"+t).then(function(e){r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"addAssignmentEvidenceForOther",value:function(e,t){var n=this;return new Promise(function(r,o){a.post(n.apiUrl+"EvidenceForOther/"+e,t).then(function(e){r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"removeAssignmentEvidenceForOther",value:function(e,t){var n=this;return new Promise(function(r,o){a.delete(n.apiUrl+"EvidenceForOther/"+e+"/evidence/"+t).then(function(e){r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getEvidenceFromSource",value:function(e){return new Promise(function(t,n){a.get(e).then(function(e){e.data?t(e.data):t("404")}).catch(function(e){return t("404")})})}},{key:"getEvidenceFromSourceDetailUriForMe",value:function(e,t){var n=this;return new Promise(function(r,o){a.get(n.apiUrl+"evidenceforme/"+e+"/evidence/"+t).then(function(e){e.data?r(e.data):r("404")}).catch(function(e){return r("404")})})}},{key:"getEvidenceFromSourceDetailUriForOthers",value:function(e,t){var n=this;return new Promise(function(r,o){a.get(n.apiUrl+"evidenceforother/"+e+"/evidence/"+t).then(function(e){e.data?r(e.data):r("404")}).catch(function(e){return r("404")})})}},{key:"getAllAssignmentEvidenceForOthers",value:function(e,t,n,r){var o=this;return new Promise(function(i,s){a.get(o.apiUrl+"EvidenceForOther/"+e+"/who/"+t+"?startDate="+n+"&endDate="+r).then(function(e){e.data&&i(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getAssignmentEvidenceForOthers",value:function(e,t,n,r,o){var i=this;return new Promise(function(s,u){a.get(i.apiUrl+"EvidenceForOther/"+e+"/"+t+"/who/"+n+"?startDate="+r+"&endDate="+o).then(function(e){e.data&&s(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getEvidenceForOthersBySourceIds",value:function(e,t){var n=this;return new Promise(function(r,o){a.post(n.apiRoot+"deployedAssignment/EvidenceForOther/source/who/"+t,e).then(function(e){e.data&&r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getEvidenceForMeBySourceIds",value:function(e){var t=this;return new Promise(function(n,r){a.post(t.apiRoot+"assignment/api/GetEvidence/source/user",e).then(function(e){e.data&&n(e.data)}).catch(function(e){return console.log(e)})})}},{key:"exportAllAssignmentEvidenceForOthers",value:function(e,t,n,r){var o=this;return new Promise(function(i,s){a.get(o.apiUrl+"EvidenceForOther/"+e+"/who/"+t+"/export?startDate="+n+"&endDate="+r).then(function(e){e.data&&i(e.data)}).catch(function(e){return console.log(e)})})}},{key:"setAssignmentAsComplete",value:function(e,t){var n=this;return new Promise(function(r,o){a.post(n.apiRoot+"assignment/api/admin/AssignmentDeployedToUserAdmin/"+e+"/user/"+t+"/completed").then(function(e){e.data&&r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"setAssignmentAsNotComplete",value:function(e,t){var n=this;return new Promise(function(r,o){a.post(n.apiRoot+"assignment/api/admin/AssignmentDeployedToUserAdmin/"+e+"/user/"+t+"/notcompleted").then(function(e){e.data&&r(e.data)}).catch(function(e){return console.log(e)})})}}]),e}();t.ProgressTrackerAssignementService=s,t.instance=a},function(e,t,n){e.exports=n(9)},function(e,t,n){"use strict";var r=n(0),o=n(2),i=n(11),a=n(1);function s(e){var t=new i(e),n=o(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var u=s(a);u.Axios=i,u.create=function(e){return s(r.merge(a,e))},u.Cancel=n(6),u.CancelToken=n(26),u.isCancel=n(5),u.all=function(e){return Promise.all(e)},u.spread=n(27),e.exports=u,e.exports.default=u},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(e,t,n){"use strict";var r=n(2),o=n(10),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function s(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:o,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:u,isStream:function(e){return s(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function e(){var t={};function n(n,r){"object"==typeof t[r]&&"object"==typeof n?t[r]=e(t[r],n):t[r]=n}for(var r=0,o=arguments.length;r<o;r++)c(arguments[r],n);return t},extend:function(e,t,n){return c(t,function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t,n){"use strict";(function(t){var r=n(0),o=n(13),i={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,u={adapter:("undefined"!=typeof XMLHttpRequest?s=n(3):void 0!==t&&(s=n(3)),s),transformRequest:[function(e,t){return o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(e){u.headers[e]={}}),r.forEach(["post","put","patch"],function(e){u.headers[e]=r.merge(i)}),e.exports=u}).call(this,n(12))},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(0),o=n(14),i=n(16),a=n(17),s=n(18),u=n(4),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(19);e.exports=function(e){return new Promise(function(t,f){var l=e.data,d=e.headers;r.isFormData(l)&&delete d["Content-Type"];var h=new XMLHttpRequest,p="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in h||s(e.url)||(h=new window.XDomainRequest,p="onload",m=!0,h.onprogress=function(){},h.ontimeout=function(){}),e.auth){var g=e.auth.username||"",v=e.auth.password||"";d.Authorization="Basic "+c(g+":"+v)}if(h.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h[p]=function(){if(h&&(4===h.readyState||m)&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in h?a(h.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:1223===h.status?204:h.status,statusText:1223===h.status?"No Content":h.statusText,headers:n,config:e,request:h};o(t,f,r),h=null}},h.onerror=function(){f(u("Network Error",e,null,h)),h=null},h.ontimeout=function(){f(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var y=n(20),w=(e.withCredentials||s(e.url))&&e.xsrfCookieName?y.read(e.xsrfCookieName):void 0;w&&(d[e.xsrfHeaderName]=w)}if("setRequestHeader"in h&&r.forEach(d,function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete d[t]:h.setRequestHeader(t,e)}),e.withCredentials&&(h.withCredentials=!0),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){h&&(h.abort(),f(e),h=null)}),void 0===l&&(l=null),h.send(l)})}},function(e,t,n){"use strict";var r=n(15);e.exports=function(e,t,n,o,i){var a=new Error(e);return r(a,t,n,o,i)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.ProgressTrackerAssignementService=void 0;var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(8);var a=((r=i)&&r.__esModule?r:{default:r}).default.create({params:{},headers:{Pragma:"no-cache"}});a.interceptors.request.use(function(e){var t=localStorage.getItem("authToken"),n=localStorage.getItem("roleToken"),r=localStorage.getItem("deviceId");return t&&(e.headers.Authorization="Bearer "+t),n&&(e.headers["x-current-role-token"]=n),r&&(e.headers.DeviceId=r),e});var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.apiUrl=t.apiUri+t.upstreamPath,this.apiRoot=t.apiUri}return o(e,[{key:"getActiveAssignments",value:function(){var e=this;return new Promise(function(t,n){a.get(e.apiUrl+"forotherswithgroups").then(function(e){e.data?t(e.data):n("No progress tracker assignments available")}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentsForUser",value:function(e){var t=this;return new Promise(function(n,r){a.get(t.apiUrl+"forother/user/"+e).then(function(e){e.data?n(e.data):n("Issue fetching assessments")}).catch(function(e){return n({deploymentSummaries:[],groups:[]})})})}},{key:"getActiveAssignment",value:function(e){var t=this;return new Promise(function(n,r){a.get(t.apiUrl+"reviewer/"+e).then(function(e){e.data&&n(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentForUser",value:function(e,t,n,r){var o=this;return new Promise(function(i,s){a.get(o.apiUrl+"foruser/"+e+"/user/"+t+"?startDate="+n+"&endDate="+r).then(function(e){e.data&&i(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getAssignmentMarksForUser",value:function(e,t,n){var r=this;return new Promise(function(o,i){a.get(r.apiUrl+"MarkForOther/"+e+"/"+t+"/who/"+n).then(function(e){e.data&&o(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getAssignmentMarksForMe",value:function(e,t){var n=this;return new Promise(function(r,o){a.get(n.apiUrl+"MarkForMe/"+e+"/"+t).then(function(e){e.data&&r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getAssignmentMarksForUser",value:function(e,t,n){var r=this;return new Promise(function(o,i){a.get(r.apiUrl+"MarkForOther/"+e+"/"+t+"/who/"+n).then(function(e){e.data&&o(e.data)}).catch(function(e){return console.log(e)})})}},{key:"addAssignmentMarkForUser",value:function(e,t){var n=this;return new Promise(function(r,o){a.post(n.apiUrl+"createMark/"+e,t).then(function(e){e.data&&r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"addAssignmentMarkForMe",value:function(e,t){var n=this;return new Promise(function(r,o){a.post(n.apiUrl+"createMark/"+e,t).then(function(e){e.data&&r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"retractAssignmentMarkForUser",value:function(e,t,n,r){var o=this;return new Promise(function(i,s){a.post(o.apiUrl+"MarkForOther/"+e+"/"+t+"/retract/who/"+n,r).then(function(e){e.data&&i(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentsForMe",value:function(){var e=this;return new Promise(function(t,n){a.get(e.apiUrl+"formewithgroups").then(function(e){e.data?t(e.data):t("Issue fetching assignments")}).catch(function(e){return t({deploymentSummaries:[],groups:[]})})})}},{key:"getActiveAssignmentForMe",value:function(e,t,n){var r=this;return new Promise(function(o,i){a.get(r.apiUrl+"forme/"+e+"?startDate="+t+"&endDate="+n).then(function(e){e.data&&o(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentProgressForMe",value:function(e,t,n){var r=this;return new Promise(function(o,i){a.get(r.apiUrl+"progressforme/"+e+"?startDate="+t+"&endDate="+n).then(function(e){e.data&&o(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentProgressForUser",value:function(e,t,n,r){var o=this;return new Promise(function(i,s){a.get(o.apiUrl+"progressforuser/"+e+"/user/"+t+"?startDate="+n+"&endDate="+r).then(function(e){e.data&&i(e.data)}).catch(function(e){return i(null)})})}},{key:"getActiveAssignmentProgress",value:function(e,t,n){var r=this;return new Promise(function(o,i){a.get(r.apiUrl+"progressforassignment/"+e+"?startDate="+t+"&endDate="+n).then(function(e){e.data&&o(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentProgressForGroup",value:function(e,t,n,r){var o=this;return new Promise(function(i,s){a.get(o.apiUrl+"progressforall/"+e+"/group/"+t+"?startDate="+n+"&endDate="+r).then(function(e){e.data&&i(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentCommentsForMe",value:function(e,t,n){var r=this;return new Promise(function(o,i){a.get(r.apiUrl+"forme/"+e+"/comments?startDate="+t+"&endDate="+n).then(function(e){e.data&&o(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentCommentsForMeForDetail",value:function(e,t,n,r){var o=this;return new Promise(function(i,s){a.get(o.apiUrl+"forme/"+e+"/comments/"+t+"?startDate="+n+"&endDate="+r).then(function(e){e.data&&i(e.data)}).catch(function(e){return console.log(e)})})}},{key:"createtActiveAssignmentCommentsForMeForDetail",value:function(e,t,n){var r=this;return new Promise(function(o,i){a.post(r.apiUrl+"forme/"+e+"/comments/"+t,n).then(function(e){e.data&&o(e.data)}).catch(function(e){return console.log(e)})})}},{key:"updateActiveAssignmentCommentsForMeForDetail",value:function(e,t){var n=this;return new Promise(function(r,o){a.put(n.apiUrl+"forme/"+e+"/comments/"+t.whatForDetailId,t).then(function(e){e.data&&r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentCommentsForOthers",value:function(e,t,n,r){var o=this;return new Promise(function(t,i){a.get(o.apiUrl+"forothers/"+e+"/comments?startDate="+n+"&endDate="+r).then(function(e){e.data&&t(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getActiveAssignmentCommentsForMeForOthers",value:function(e,t,n,r,o){var i=this;return new Promise(function(s,u){a.get(i.apiUrl+"forothers/"+e+"/comments/"+t+"/"+n+"?startDate="+r+"&endDate="+o).then(function(e){e.data&&s(e.data)}).catch(function(e){return console.log(e)})})}},{key:"createtActiveAssignmentCommentsForMeForOthers",value:function(e,t,n,r){var o=this;return new Promise(function(i,s){a.post(o.apiUrl+"forothers/"+e+"/comments/"+t+"/"+n,r).then(function(e){e.data&&i(e.data)}).catch(function(e){return console.log(e)})})}},{key:"updateActiveAssignmentCommentsForMeForOthers",value:function(e,t,n){var r=this;return new Promise(function(o,i){a.put(r.apiUrl+"forothers/"+e+"/comments/"+n.whatForDetailId+"/"+t,n).then(function(e){e.data&&o(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getAllAssignmentEvidenceForMe",value:function(e,t,n){var r=this;return new Promise(function(o,i){a.get(r.apiUrl+"EvidenceForMe/"+e+"?startDate="+t+"&endDate="+n).then(function(e){e.data&&o(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getAssignmentEvidenceForMe",value:function(e,t,n,r){var o=this;return new Promise(function(i,s){a.get(o.apiUrl+"EvidenceForMe/"+e+"/"+t+"?startDate="+n+"&endDate="+r).then(function(e){e.data&&i(e.data)}).catch(function(e){return console.log(e)})})}},{key:"addAssignmentEvidenceForMe",value:function(e,t){var n=this;return new Promise(function(r,o){a.post(n.apiUrl+"EvidenceForMe/"+e,t).then(function(e){r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"removeAssignmentEvidenceForMe",value:function(e,t){var n=this;return new Promise(function(r,o){a.delete(n.apiUrl+"EvidenceForMe/"+e+"/evidence/"+t).then(function(e){r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"addAssignmentEvidenceForOther",value:function(e,t){var n=this;return new Promise(function(r,o){a.post(n.apiUrl+"EvidenceForOther/"+e,t).then(function(e){r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"removeAssignmentEvidenceForOther",value:function(e,t){var n=this;return new Promise(function(r,o){a.delete(n.apiUrl+"EvidenceForOther/"+e+"/evidence/"+t).then(function(e){r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getEvidenceFromSource",value:function(e){return new Promise(function(t,n){a.get(e).then(function(e){e.data?t(e.data):t("404")}).catch(function(e){return t("404")})})}},{key:"getEvidenceFromSourceDetailUriForMe",value:function(e,t){var n=this;return new Promise(function(r,o){a.get(n.apiUrl+"evidenceforme/"+e+"/evidence/"+t).then(function(e){e.data?r(e.data):r("404")}).catch(function(e){return r("404")})})}},{key:"getEvidenceFromSourceDetailUriForOthers",value:function(e,t){var n=this;return new Promise(function(r,o){a.get(n.apiUrl+"evidenceforother/"+e+"/evidence/"+t).then(function(e){e.data?r(e.data):r("404")}).catch(function(e){return r("404")})})}},{key:"getAllAssignmentEvidenceForOthers",value:function(e,t,n,r){var o=this;return new Promise(function(i,s){a.get(o.apiUrl+"EvidenceForOther/"+e+"/who/"+t+"?startDate="+n+"&endDate="+r).then(function(e){e.data&&i(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getAssignmentEvidenceForOthers",value:function(e,t,n,r,o){var i=this;return new Promise(function(s,u){a.get(i.apiUrl+"EvidenceForOther/"+e+"/"+t+"/who/"+n+"?startDate="+r+"&endDate="+o).then(function(e){e.data&&s(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getEvidenceForOthersBySourceIds",value:function(e,t){var n=this;return new Promise(function(r,o){a.post(n.apiRoot+"deployedAssignment/EvidenceForOther/source/who/"+t,e).then(function(e){e.data&&r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"getEvidenceForMeBySourceIds",value:function(e){var t=this;return new Promise(function(n,r){a.post(t.apiRoot+"assignment/api/GetEvidence/source/user",e).then(function(e){e.data&&n(e.data)}).catch(function(e){return console.log(e)})})}},{key:"exportAllAssignmentEvidenceForOthers",value:function(e,t){var n=this;return new Promise(function(r,o){a.post(n.apiUrl+"assignment/api/admin/AssignmentDeployedToUserAdmin/"+e+"/user/"+t+"/export").then(function(e){e.data&&r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"setAssignmentAsComplete",value:function(e,t){var n=this;return new Promise(function(r,o){a.post(n.apiRoot+"assignment/api/admin/AssignmentDeployedToUserAdmin/"+e+"/user/"+t+"/completed").then(function(e){e.data&&r(e.data)}).catch(function(e){return console.log(e)})})}},{key:"setAssignmentAsNotComplete",value:function(e,t){var n=this;return new Promise(function(r,o){a.post(n.apiRoot+"assignment/api/admin/AssignmentDeployedToUserAdmin/"+e+"/user/"+t+"/notcompleted").then(function(e){e.data&&r(e.data)}).catch(function(e){return console.log(e)})})}}]),e}();t.ProgressTrackerAssignementService=s,t.instance=a},function(e,t,n){e.exports=n(9)},function(e,t,n){"use strict";var r=n(0),o=n(2),i=n(11),a=n(1);function s(e){var t=new i(e),n=o(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var u=s(a);u.Axios=i,u.create=function(e){return s(r.merge(a,e))},u.Cancel=n(6),u.CancelToken=n(26),u.isCancel=n(5),u.all=function(e){return Promise.all(e)},u.spread=n(27),e.exports=u,e.exports.default=u},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
/*!

@@ -3,0 +3,0 @@ * Determine if an object is a Buffer

{
"name": "mkm-service-progresstrackerassignments",
"version": "2.0.12",
"version": "2.0.13",
"description": "Wrapper for progress tracker assignments API's",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc