@sunbird-cb/utils-v2 0.0.5 → 0.0.7

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.
@@ -3073,14 +3073,17 @@
3073
3073
  case 0:
3074
3074
  if (!storage$1.getItem('telemetrySessionId')) return [3, 1];
3075
3075
  storage$1.removeItem('telemetrySessionId');
3076
- return [3, 3];
3076
+ return [3, 4];
3077
3077
  case 1:
3078
3078
  storage$1.removeItem(storageKey$1);
3079
3079
  return [4, this.http.get('/apis/reset').toPromise()];
3080
3080
  case 2:
3081
3081
  _a.sent();
3082
- _a.label = 3;
3082
+ return [4, this.http.get('https://admin-test.ecornell.com/saml/logout.do').toPromise()];
3083
3083
  case 3:
3084
+ _a.sent();
3085
+ _a.label = 4;
3086
+ case 4:
3084
3087
  try {
3085
3088
  sessionStorage.clear();
3086
3089
  localStorage.clear();
@@ -3089,7 +3092,10 @@
3089
3092
  }
3090
3093
  storage$1.removeItem(storageKey$1);
3091
3094
  return [4, this.http.get('/apis/reset').toPromise()];
3092
- case 4:
3095
+ case 5:
3096
+ _a.sent();
3097
+ return [4, this.http.get('https://admin-test.ecornell.com/saml/logout.do').toPromise()];
3098
+ case 6:
3093
3099
  _a.sent();
3094
3100
  return [2];
3095
3101
  }
@@ -4157,9 +4163,12 @@
4157
4163
  this.environment = environment;
4158
4164
  }
4159
4165
  PipePublicURL.prototype.transform = function (value) {
4160
- var mainUrl = value && value.split('/content').pop() || '';
4161
- var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + "/content" + mainUrl;
4162
- return value ? finalURL : '';
4166
+ if (value.includes('karmayogi')) {
4167
+ var mainUrl = value && value.split('/content').pop() || '';
4168
+ var finalURL = this.environment.contentHost + "/" + this.environment.contentBucket + "/content" + mainUrl;
4169
+ return value ? finalURL : '';
4170
+ }
4171
+ return value;
4163
4172
  };
4164
4173
  PipePublicURL.decorators = [
4165
4174
  { type: core.Pipe, args: [{
@@ -5649,7 +5658,7 @@
5649
5658
  var PROTECTED_SLAG_V8 = '/apis/protected/v8';
5650
5659
  var ɵ0 = function (type, id) {
5651
5660
  return PROTECTED_SLAG_V8 + "/content/collection/" + type + "/" + id;
5652
- }, ɵ1 = function (contentId) { return PROTECTED_SLAG_V8 + "/user/progress/" + 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; };
5653
5662
  var API_END_POINTS = {
5654
5663
  CONTENT: PROTECTED_SLAG_V8 + "/content",
5655
5664
  AUTHORING_CONTENT: "/apis/authApi/hierarchy",
@@ -5668,6 +5677,8 @@
5668
5677
  COLLECTION_HIERARCHY: (ɵ0),
5669
5678
  REGISTRATION_STATUS: PROTECTED_SLAG_V8 + "/admin/userRegistration/checkUserRegistrationContent",
5670
5679
  MARK_AS_COMPLETE_META: (ɵ1),
5680
+ EXT_USER_COURSE_ENROLL: (ɵ2),
5681
+ EXT_CONTENT_EROLL: "/apis/proxies/v8/cios-enroll/v1/create",
5671
5682
  };
5672
5683
  var WidgetContentService = (function () {
5673
5684
  function WidgetContentService(http, configSvc) {
@@ -5831,6 +5842,12 @@
5831
5842
  WidgetContentService.prototype.fetchConfig = function (url) {
5832
5843
  return this.http.get(url);
5833
5844
  };
5845
+ WidgetContentService.prototype.fetchExtUserContentEnroll = function (contentId) {
5846
+ return this.http.get(API_END_POINTS.EXT_USER_COURSE_ENROLL(contentId));
5847
+ };
5848
+ WidgetContentService.prototype.extContentEnroll = function (requestBody) {
5849
+ return this.http.post("" + API_END_POINTS.EXT_CONTENT_EROLL, requestBody);
5850
+ };
5834
5851
  WidgetContentService.decorators = [
5835
5852
  { type: core.Injectable, args: [{
5836
5853
  providedIn: 'root',