@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.
@@ -4227,13 +4227,13 @@
4227
4227
  var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + mainUrl;
4228
4228
  return value ? finalURL : '';
4229
4229
  }
4230
- if (value.indexOf('/igotuat/collection') > -1) {
4231
- var mainUrl = value && value.split('/igotuat').pop() || '';
4230
+ if (value.indexOf('/igotbm/collection') > -1) {
4231
+ var mainUrl = value && value.split('/igotbm').pop() || '';
4232
4232
  var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + mainUrl;
4233
4233
  return value ? finalURL : '';
4234
4234
  }
4235
- if (value.indexOf('/igotuat/content') > -1) {
4236
- var mainUrl = value && value.split('/igotuat').pop() || '';
4235
+ if (value.indexOf('/igotbm/content') > -1) {
4236
+ var mainUrl = value && value.split('/igotbm').pop() || '';
4237
4237
  var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + mainUrl;
4238
4238
  return value ? finalURL : '';
4239
4239
  }
@@ -4257,8 +4257,8 @@
4257
4257
  var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + mainUrl;
4258
4258
  return value ? finalURL : '';
4259
4259
  }
4260
- if (value.indexOf('/igotuat/profileImage') > -1) {
4261
- var mainUrl = value && value.split('/igotuat').pop() || '';
4260
+ if (value.indexOf('/igotbm/profileImage') > -1) {
4261
+ var mainUrl = value && value.split('/igotbm').pop() || '';
4262
4262
  var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + mainUrl;
4263
4263
  return value ? finalURL : '';
4264
4264
  }
@@ -4277,23 +4277,6 @@
4277
4277
  var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + mainUrl;
4278
4278
  return value ? finalURL : '';
4279
4279
  }
4280
- if (this.environment && this.environment.bucketName) {
4281
- if (value.indexOf("/" + this.environment.bucketName + "/profileImage") > -1) {
4282
- var mainUrl = value && value.split("/" + this.environment.bucketName).pop() || '';
4283
- var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + mainUrl;
4284
- return value ? finalURL : '';
4285
- }
4286
- if (value.indexOf("/" + this.environment.bucketName + "/content") > -1) {
4287
- var mainUrl = value && value.split("/" + this.environment.bucketName).pop() || '';
4288
- var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + mainUrl;
4289
- return value ? finalURL : '';
4290
- }
4291
- if (value.indexOf("/" + this.environment.bucketName + "/collection") > -1) {
4292
- var mainUrl = value && value.split("/" + this.environment.bucketName).pop() || '';
4293
- var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + mainUrl;
4294
- return value ? finalURL : '';
4295
- }
4296
- }
4297
4280
  }
4298
4281
  };
4299
4282
  PipeCertificateImageURL.decorators = [
@@ -5675,7 +5658,7 @@
5675
5658
  var PROTECTED_SLAG_V8 = '/apis/protected/v8';
5676
5659
  var ɵ0 = function (type, id) {
5677
5660
  return PROTECTED_SLAG_V8 + "/content/collection/" + type + "/" + id;
5678
- }, ɵ1 = function (contentId) { return PROTECTED_SLAG_V8 + "/user/progress/" + contentId; }, ɵ2 = function (contentId) { return "/apis/proxies/v8/cios-enroll/v1/readby/useridcourseid/" + contentId; };
5661
+ }, ɵ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; };
5679
5662
  var API_END_POINTS = {
5680
5663
  CONTENT: PROTECTED_SLAG_V8 + "/content",
5681
5664
  AUTHORING_CONTENT: "/apis/authApi/hierarchy",
@@ -5696,6 +5679,7 @@
5696
5679
  MARK_AS_COMPLETE_META: (ɵ1),
5697
5680
  EXT_USER_COURSE_ENROLL: (ɵ2),
5698
5681
  EXT_CONTENT_EROLL: "/apis/proxies/v8/cios-enroll/v1/create",
5682
+ CERT_DOWNLOAD: (ɵ3),
5699
5683
  };
5700
5684
  var WidgetContentService = (function () {
5701
5685
  function WidgetContentService(http, configSvc) {
@@ -5865,6 +5849,9 @@
5865
5849
  WidgetContentService.prototype.extContentEnroll = function (requestBody) {
5866
5850
  return this.http.post("" + API_END_POINTS.EXT_CONTENT_EROLL, requestBody);
5867
5851
  };
5852
+ WidgetContentService.prototype.downloadCert = function (certId) {
5853
+ return this.http.get("" + API_END_POINTS.CERT_DOWNLOAD(certId));
5854
+ };
5868
5855
  WidgetContentService.decorators = [
5869
5856
  { type: core.Injectable, args: [{
5870
5857
  providedIn: 'root',