@sunbird-cb/utils-v2 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4018,13 +4018,13 @@ var PipeCertificateImageURL = (function () {
4018
4018
  var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + mainUrl;
4019
4019
  return value ? finalURL : '';
4020
4020
  }
4021
- if (value.indexOf('/igotuat/collection') > -1) {
4022
- var mainUrl = value && value.split('/igotuat').pop() || '';
4021
+ if (value.indexOf('/igotbm/collection') > -1) {
4022
+ var mainUrl = value && value.split('/igotbm').pop() || '';
4023
4023
  var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + mainUrl;
4024
4024
  return value ? finalURL : '';
4025
4025
  }
4026
- if (value.indexOf('/igotuat/content') > -1) {
4027
- var mainUrl = value && value.split('/igotuat').pop() || '';
4026
+ if (value.indexOf('/igotbm/content') > -1) {
4027
+ var mainUrl = value && value.split('/igotbm').pop() || '';
4028
4028
  var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + mainUrl;
4029
4029
  return value ? finalURL : '';
4030
4030
  }
@@ -4048,8 +4048,8 @@ var PipeCertificateImageURL = (function () {
4048
4048
  var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + mainUrl;
4049
4049
  return value ? finalURL : '';
4050
4050
  }
4051
- if (value.indexOf('/igotuat/profileImage') > -1) {
4052
- var mainUrl = value && value.split('/igotuat').pop() || '';
4051
+ if (value.indexOf('/igotbm/profileImage') > -1) {
4052
+ var mainUrl = value && value.split('/igotbm').pop() || '';
4053
4053
  var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + mainUrl;
4054
4054
  return value ? finalURL : '';
4055
4055
  }
@@ -4068,23 +4068,6 @@ var PipeCertificateImageURL = (function () {
4068
4068
  var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + mainUrl;
4069
4069
  return value ? finalURL : '';
4070
4070
  }
4071
- if (this.environment && this.environment.bucketName) {
4072
- if (value.indexOf("/" + this.environment.bucketName + "/profileImage") > -1) {
4073
- var mainUrl = value && value.split("/" + this.environment.bucketName).pop() || '';
4074
- var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + mainUrl;
4075
- return value ? finalURL : '';
4076
- }
4077
- if (value.indexOf("/" + this.environment.bucketName + "/content") > -1) {
4078
- var mainUrl = value && value.split("/" + this.environment.bucketName).pop() || '';
4079
- var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + mainUrl;
4080
- return value ? finalURL : '';
4081
- }
4082
- if (value.indexOf("/" + this.environment.bucketName + "/collection") > -1) {
4083
- var mainUrl = value && value.split("/" + this.environment.bucketName).pop() || '';
4084
- var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + mainUrl;
4085
- return value ? finalURL : '';
4086
- }
4087
- }
4088
4071
  }
4089
4072
  };
4090
4073
  PipeCertificateImageURL.decorators = [
@@ -5466,7 +5449,7 @@ var NsContent;
5466
5449
  var PROTECTED_SLAG_V8 = '/apis/protected/v8';
5467
5450
  var ɵ0 = function (type, id) {
5468
5451
  return PROTECTED_SLAG_V8 + "/content/collection/" + type + "/" + id;
5469
- }, ɵ1 = function (contentId) { return PROTECTED_SLAG_V8 + "/user/progress/" + contentId; }, ɵ2 = function (contentId) { return "/apis/proxies/v8/cios-enroll/v1/readby/useridcourseid/" + contentId; };
5452
+ }, ɵ1 = function (contentId) { return PROTECTED_SLAG_V8 + "/user/progress/" + contentId; }, ɵ2 = function (contentId) { return "/apis/proxies/v8/cios-enroll/v1/readby/useridcourseid/" + contentId; }, ɵ3 = function (certId) { return PROTECTED_SLAG_V8 + "/cohorts/course/batch/cert/download/" + certId; };
5470
5453
  var API_END_POINTS = {
5471
5454
  CONTENT: PROTECTED_SLAG_V8 + "/content",
5472
5455
  AUTHORING_CONTENT: "/apis/authApi/hierarchy",
@@ -5487,6 +5470,7 @@ var API_END_POINTS = {
5487
5470
  MARK_AS_COMPLETE_META: (ɵ1),
5488
5471
  EXT_USER_COURSE_ENROLL: (ɵ2),
5489
5472
  EXT_CONTENT_EROLL: "/apis/proxies/v8/cios-enroll/v1/create",
5473
+ CERT_DOWNLOAD: (ɵ3),
5490
5474
  };
5491
5475
  var WidgetContentService = (function () {
5492
5476
  function WidgetContentService(http, configSvc) {
@@ -5656,6 +5640,9 @@ var WidgetContentService = (function () {
5656
5640
  WidgetContentService.prototype.extContentEnroll = function (requestBody) {
5657
5641
  return this.http.post("" + API_END_POINTS.EXT_CONTENT_EROLL, requestBody);
5658
5642
  };
5643
+ WidgetContentService.prototype.downloadCert = function (certId) {
5644
+ return this.http.get("" + API_END_POINTS.CERT_DOWNLOAD(certId));
5645
+ };
5659
5646
  WidgetContentService.decorators = [
5660
5647
  { type: Injectable, args: [{
5661
5648
  providedIn: 'root',