@esolve/ng-esolve-connect 0.6.1 → 0.6.2

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.
@@ -172,7 +172,7 @@
172
172
  EsolveAuthInterceptorService.prototype.intercept = function (req, next) {
173
173
  if (req.url.startsWith(this.config.api_url + "/service/")) {
174
174
  var service_identifier = req.url.replace(this.config.api_url + "/service/", '');
175
- var old_parms_keys = req.params.keys();
175
+ var old_params_keys = req.params.keys();
176
176
  var modified_url = req.url;
177
177
  var params_1 = new i1.HttpParams();
178
178
  var session = this.session.currentSession;
@@ -181,7 +181,7 @@
181
181
  params_1 = params_1.set('key', session.key);
182
182
  }
183
183
  }
184
- old_parms_keys.forEach(function (key) {
184
+ old_params_keys.forEach(function (key) {
185
185
  params_1 = params_1.set(key, req.params.get(key) || '');
186
186
  });
187
187
  var modified_req = req.clone({
@@ -785,6 +785,16 @@
785
785
  return EsolveAddress;
786
786
  }());
787
787
 
788
+ var EsolveRegistrationResult = /** @class */ (function () {
789
+ function EsolveRegistrationResult(user_id, guest, authentication_required, auto_login) {
790
+ this.user_id = user_id;
791
+ this.guest = guest;
792
+ this.authentication_required = authentication_required;
793
+ this.auto_login = auto_login;
794
+ }
795
+ return EsolveRegistrationResult;
796
+ }());
797
+
788
798
  var EsolveAuthService = /** @class */ (function () {
789
799
  function EsolveAuthService(config, http, session, errorHandler) {
790
800
  this.config = config;
@@ -1050,8 +1060,12 @@
1050
1060
  for (var _b = __values(registration_response.log), _c = _b.next(); !_c.done; _c = _b.next()) {
1051
1061
  var response_log = _c.value;
1052
1062
  if ((response_log.type === 'success') && (response_log.message_code === 'registration_success')) {
1053
- _this.sessionService.handleUpdateSession(registration_response.esolve_id);
1054
- return registration_response.esolve_id;
1063
+ var user_id = 0;
1064
+ if (registration_response.auto_login) {
1065
+ user_id = registration_response.esolve_id;
1066
+ _this.sessionService.handleUpdateSession(user_id);
1067
+ }
1068
+ return new EsolveRegistrationResult(user_id, registration_response.guest, registration_response.authentication_required, registration_response.auto_login);
1055
1069
  }
1056
1070
  }
1057
1071
  }
@@ -3041,6 +3055,7 @@
3041
3055
  exports.EsolveNewsGroup = EsolveNewsGroup;
3042
3056
  exports.EsolveNewsService = EsolveNewsService;
3043
3057
  exports.EsolvePaymentMethod = EsolvePaymentMethod;
3058
+ exports.EsolveRegistrationResult = EsolveRegistrationResult;
3044
3059
  exports.EsolveSEOInfo = EsolveSEOInfo;
3045
3060
  exports.EsolveSeoService = EsolveSeoService;
3046
3061
  exports.EsolveSession = EsolveSession;