@social-mail/social-mail-client 1.2.116 → 1.2.117

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.
@@ -43989,10 +43989,10 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
43989
43989
 
43990
43990
  AmdLoader.instance.setup("@social-mail/social-mail-client/dist/common/pages/websites/studio/WebSiteStudioPage");
43991
43991
 
43992
- System.register(["tslib", "@web-atoms/core/dist/di/DITransient", "@web-atoms/core/dist/di/Inject", "../../../../services/EntityService", "../../../../model/model", "../../../SocialMailApp"], function (_export, _context) {
43992
+ System.register(["tslib", "@web-atoms/core/dist/di/DITransient", "@web-atoms/core/dist/di/Inject", "../../../../services/EntityService", "../../../../model/model", "../../../SocialMailApp", "@web-atoms/date-time/dist/DateTime"], function (_export, _context) {
43993
43993
  "use strict";
43994
43994
 
43995
- var __awaiter, __decorate, __metadata, DITransient, Inject, EntityService, User, UserAuthFactor, SocialMailApp, UserService;
43995
+ var __awaiter, __decorate, __metadata, DITransient, Inject, EntityService, User, UserAuthFactor, SocialMailApp, DateTime, UserService;
43996
43996
  return {
43997
43997
  setters: [function (_tslib) {
43998
43998
  __awaiter = _tslib.__awaiter;
@@ -44009,6 +44009,8 @@ System.register(["tslib", "@web-atoms/core/dist/di/DITransient", "@web-atoms/cor
44009
44009
  UserAuthFactor = _modelModel.UserAuthFactor;
44010
44010
  }, function (_SocialMailApp) {
44011
44011
  SocialMailApp = _SocialMailApp.default;
44012
+ }, function (_webAtomsDateTimeDistDateTime) {
44013
+ DateTime = _webAtomsDateTimeDistDateTime.default;
44012
44014
  }],
44013
44015
  execute: function () {
44014
44016
  UserService = class UserService {
@@ -44024,7 +44026,7 @@ System.register(["tslib", "@web-atoms/core/dist/di/DITransient", "@web-atoms/cor
44024
44026
  }
44025
44027
  save(user) {
44026
44028
  return __awaiter(this, void 0, void 0, function* () {
44027
- let cloner = this.entityService.cloner(user).include(x => x.authFactors);
44029
+ let cloner = this.entityService.cloner(user);
44028
44030
  if (user.changePassword) {
44029
44031
  cloner = cloner.include(x => x.changePassword);
44030
44032
  }
@@ -44032,16 +44034,21 @@ System.register(["tslib", "@web-atoms/core/dist/di/DITransient", "@web-atoms/cor
44032
44034
  });
44033
44035
  }
44034
44036
  createAuthFactor(user, method = "totp") {
44035
- var _a;
44036
44037
  return __awaiter(this, void 0, void 0, function* () {
44037
44038
  const authFactor = UserAuthFactor.create({
44039
+ userID: user.userID,
44038
44040
  method
44039
44041
  });
44040
- ((_a = user.authFactors) !== null && _a !== void 0 ? _a : user.authFactors = []).add(authFactor);
44041
- yield this.save(user);
44042
+ yield this.entityService.save(authFactor);
44042
44043
  return authFactor;
44043
44044
  });
44044
44045
  }
44046
+ verify(af) {
44047
+ return __awaiter(this, void 0, void 0, function* () {
44048
+ af.dateUpdated = DateTime.now;
44049
+ yield this.entityService.save(af, x => x);
44050
+ });
44051
+ }
44045
44052
  };
44046
44053
  __decorate([Inject, __metadata("design:type", EntityService)], UserService.prototype, "entityService", void 0);
44047
44054
  UserService = __decorate([DITransient()], UserService);