@bitwarden/cli 2022.10.0 → 2022.11.0

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.
Files changed (3) hide show
  1. package/build/bw.js +1184 -830
  2. package/build/bw.js.map +1 -1
  3. package/package.json +2 -2
package/build/bw.js CHANGED
@@ -20,7 +20,7 @@ module.exports = require("url");
20
20
  /***/ 147:
21
21
  /***/ ((module) => {
22
22
 
23
- module.exports = JSON.parse('{"name":"@bitwarden/cli","description":"A secure and free password manager for all of your devices.","version":"2022.10.0","keywords":["bitwarden","password","vault","password manager","cli"],"author":"Bitwarden Inc. <hello@bitwarden.com> (https://bitwarden.com)","homepage":"https://bitwarden.com","repository":{"type":"git","url":"https://github.com/bitwarden/clients"},"license":"GPL-3.0-only","scripts":{"clean":"rimraf dist/**/*","build":"webpack","build:debug":"npm run build && node --inspect ./build/bw.js","build:watch":"webpack --watch","build:prod":"cross-env NODE_ENV=production webpack","build:prod:watch":"cross-env NODE_ENV=production webpack --watch","package":"npm run package:win && npm run package:mac && npm run package:lin","package:win":"pkg . --targets win-x64 --output ./dist/windows/bw.exe --build","package:mac":"pkg . --targets macos-x64 --output ./dist/macos/bw","package:lin":"pkg . --targets linux-x64 --output ./dist/linux/bw","debug":"node --inspect ./build/bw.js","dist":"npm run build:prod && npm run clean && npm run package","dist:win":"npm run build:prod && npm run clean && npm run package:win","dist:mac":"npm run build:prod && npm run clean && npm run package:mac","dist:lin":"npm run build:prod && npm run clean && npm run package:lin","publish:npm":"npm run build:prod && npm publish --access public","test":"jest","test:watch":"jest --watch","test:watch:all":"jest --watchAll"},"bin":{"bw":"build/bw.js"},"pkg":{"assets":"./build/**/*"},"dependencies":{"@koa/multer":"^3.0.0","@koa/router":"^10.1.1","big-integer":"^1.6.51","browser-hrtime":"^1.1.8","chalk":"^4.1.1","commander":"7.2.0","form-data":"4.0.0","https-proxy-agent":"5.0.0","inquirer":"8.0.0","jsdom":"^16.7.0","jszip":"^3.10.0","koa":"^2.13.4","koa-bodyparser":"^4.3.0","koa-json":"^2.0.2","lowdb":"1.0.0","lunr":"^2.3.9","multer":"^1.4.5-lts.1","node-fetch":"^2.6.7","node-forge":"1.3.1","open":"^8.4.0","papaparse":"^5.3.2","proper-lockfile":"^4.1.2","rxjs":"^7.5.5","tldjs":"^2.3.1","zxcvbn":"^4.4.2"}}');
23
+ module.exports = JSON.parse('{"name":"@bitwarden/cli","description":"A secure and free password manager for all of your devices.","version":"2022.11.0","keywords":["bitwarden","password","vault","password manager","cli"],"author":"Bitwarden Inc. <hello@bitwarden.com> (https://bitwarden.com)","homepage":"https://bitwarden.com","repository":{"type":"git","url":"https://github.com/bitwarden/clients"},"license":"GPL-3.0-only","scripts":{"clean":"rimraf dist/**/*","build":"webpack","build:debug":"npm run build && node --inspect ./build/bw.js","build:watch":"webpack --watch","build:prod":"cross-env NODE_ENV=production webpack","build:prod:watch":"cross-env NODE_ENV=production webpack --watch","package":"npm run package:win && npm run package:mac && npm run package:lin","package:win":"pkg . --targets win-x64 --output ./dist/windows/bw.exe --build","package:mac":"pkg . --targets macos-x64 --output ./dist/macos/bw","package:lin":"pkg . --targets linux-x64 --output ./dist/linux/bw","debug":"node --inspect ./build/bw.js","dist":"npm run build:prod && npm run clean && npm run package","dist:win":"npm run build:prod && npm run clean && npm run package:win","dist:mac":"npm run build:prod && npm run clean && npm run package:mac","dist:lin":"npm run build:prod && npm run clean && npm run package:lin","publish:npm":"npm run build:prod && npm publish --access public","test":"jest","test:watch":"jest --watch","test:watch:all":"jest --watchAll"},"bin":{"bw":"build/bw.js"},"pkg":{"assets":"./build/**/*"},"dependencies":{"@koa/multer":"^3.0.0","@koa/router":"^10.1.1","big-integer":"^1.6.51","browser-hrtime":"^1.1.8","chalk":"^4.1.1","commander":"7.2.0","form-data":"4.0.0","https-proxy-agent":"5.0.0","inquirer":"8.0.0","jsdom":"^16.7.0","jszip":"^3.10.0","koa":"^2.13.4","koa-bodyparser":"^4.3.0","koa-json":"^2.0.2","lowdb":"1.0.0","lunr":"^2.3.9","multer":"^1.4.5-lts.1","node-fetch":"^2.6.7","node-forge":"1.3.1","open":"^8.4.0","papaparse":"^5.3.2","proper-lockfile":"^4.1.2","rxjs":"^7.5.5","tldts":"^5.7.84","zxcvbn":"^4.4.2"}}');
24
24
 
25
25
  /***/ })
26
26
 
@@ -158,8 +158,8 @@ class StateFactory {
158
158
  }
159
159
  }
160
160
 
161
- ;// CONCATENATED MODULE: external "tldjs"
162
- const external_tldjs_namespaceObject = require("tldjs");
161
+ ;// CONCATENATED MODULE: external "tldts"
162
+ const external_tldts_namespaceObject = require("tldts");
163
163
  ;// CONCATENATED MODULE: ../../libs/common/src/misc/utils.ts
164
164
  /* eslint-disable no-useless-escape */
165
165
 
@@ -333,13 +333,34 @@ class Utils {
333
333
  return RegExp(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/, "i").test(id);
334
334
  }
335
335
  static getHostname(uriString) {
336
- const url = Utils.getUrl(uriString);
336
+ if (Utils.isNullOrWhitespace(uriString)) {
337
+ return null;
338
+ }
339
+ uriString = uriString.trim();
340
+ if (uriString.startsWith("data:")) {
341
+ return null;
342
+ }
343
+ if (uriString.startsWith("about:")) {
344
+ return null;
345
+ }
346
+ if (uriString.startsWith("file:")) {
347
+ return null;
348
+ }
349
+ // Does uriString contain invalid characters
350
+ // TODO Needs to possibly be extended, although '!' is a reserved character
351
+ if (uriString.indexOf("!") > 0) {
352
+ return null;
353
+ }
337
354
  try {
338
- return url != null && url.hostname !== "" ? url.hostname : null;
355
+ const hostname = (0,external_tldts_namespaceObject.getHostname)(uriString, { validHosts: this.validHosts });
356
+ if (hostname != null) {
357
+ return hostname;
358
+ }
339
359
  }
340
360
  catch (_a) {
341
361
  return null;
342
362
  }
363
+ return null;
343
364
  }
344
365
  static getHost(uriString) {
345
366
  const url = Utils.getUrl(uriString);
@@ -351,45 +372,26 @@ class Utils {
351
372
  }
352
373
  }
353
374
  static getDomain(uriString) {
354
- if (uriString == null) {
375
+ if (Utils.isNullOrWhitespace(uriString)) {
355
376
  return null;
356
377
  }
357
378
  uriString = uriString.trim();
358
- if (uriString === "") {
359
- return null;
360
- }
361
379
  if (uriString.startsWith("data:")) {
362
380
  return null;
363
381
  }
364
- let httpUrl = uriString.startsWith("http://") || uriString.startsWith("https://");
365
- if (!httpUrl &&
366
- uriString.indexOf("://") < 0 &&
367
- Utils.tldEndingRegex.test(uriString) &&
368
- uriString.indexOf("@") < 0) {
369
- uriString = "http://" + uriString;
370
- httpUrl = true;
382
+ if (uriString.startsWith("about:")) {
383
+ return null;
371
384
  }
372
- if (httpUrl) {
373
- try {
374
- const url = Utils.getUrlObject(uriString);
375
- const validHostname = (external_tldjs_namespaceObject === null || external_tldjs_namespaceObject === void 0 ? void 0 : external_tldjs_namespaceObject.isValid) != null ? external_tldjs_namespaceObject.isValid(url.hostname) : true;
376
- if (!validHostname) {
377
- return null;
385
+ try {
386
+ const parseResult = (0,external_tldts_namespaceObject.parse)(uriString, { validHosts: this.validHosts });
387
+ if (parseResult != null && parseResult.hostname != null) {
388
+ if (parseResult.hostname === "localhost" || parseResult.isIp) {
389
+ return parseResult.hostname;
378
390
  }
379
- if (url.hostname === "localhost" || Utils.validIpAddress(url.hostname)) {
380
- return url.hostname;
391
+ if (parseResult.domain != null) {
392
+ return parseResult.domain;
381
393
  }
382
- const urlDomain = external_tldjs_namespaceObject != null && external_tldjs_namespaceObject.getDomain != null ? external_tldjs_namespaceObject.getDomain(url.hostname) : null;
383
- return urlDomain != null ? urlDomain : url.hostname;
384
- }
385
- catch (e) {
386
- // Invalid domain, try another approach below.
387
- }
388
- }
389
- try {
390
- const domain = external_tldjs_namespaceObject != null && external_tldjs_namespaceObject.getDomain != null ? external_tldjs_namespaceObject.getDomain(uriString) : null;
391
- if (domain != null) {
392
- return domain;
394
+ return null;
393
395
  }
394
396
  }
395
397
  catch (_a) {
@@ -424,6 +426,7 @@ class Utils {
424
426
  if (a[prop] == null && b[prop] == null) {
425
427
  return 0;
426
428
  }
429
+ // The `as unknown as string` here is unfortunate because typescript doesn't property understand that the return of T[prop] will be a string
427
430
  return i18nService.collator
428
431
  ? i18nService.collator.compare(a[prop], b[prop])
429
432
  : a[prop].localeCompare(b[prop]);
@@ -435,6 +438,9 @@ class Utils {
435
438
  static isNullOrEmpty(str) {
436
439
  return str == null || typeof str !== "string" || str == "";
437
440
  }
441
+ static isPromise(obj) {
442
+ return (obj != undefined && typeof obj["then"] === "function" && typeof obj["catch"] === "function");
443
+ }
438
444
  static nameOf(name) {
439
445
  return name;
440
446
  }
@@ -445,13 +451,10 @@ class Utils {
445
451
  return Object.keys(obj).filter((k) => Number.isNaN(+k)).map((k) => obj[k]);
446
452
  }
447
453
  static getUrl(uriString) {
448
- if (uriString == null) {
454
+ if (this.isNullOrWhitespace(uriString)) {
449
455
  return null;
450
456
  }
451
457
  uriString = uriString.trim();
452
- if (uriString === "") {
453
- return null;
454
- }
455
458
  let url = Utils.getUrlObject(uriString);
456
459
  if (url == null) {
457
460
  const hasHttpProtocol = uriString.indexOf("http://") === 0 || uriString.indexOf("https://") === 0;
@@ -504,10 +507,6 @@ class Utils {
504
507
  }
505
508
  return this.global.bitwardenContainerService;
506
509
  }
507
- static validIpAddress(ipString) {
508
- const ipRegex = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
509
- return ipRegex.test(ipString);
510
- }
511
510
  static isMobile(win) {
512
511
  let mobile = false;
513
512
  ((a) => {
@@ -555,9 +554,9 @@ Utils.isBrowser = true;
555
554
  Utils.isMobileBrowser = false;
556
555
  Utils.isAppleMobileBrowser = false;
557
556
  Utils.global = null;
558
- Utils.tldEndingRegex = /.*\.(com|net|org|edu|uk|gov|ca|de|jp|fr|au|ru|ch|io|es|us|co|xyz|info|ly|mil)$/;
559
557
  // Transpiled version of /\p{Emoji_Presentation}/gu using https://mothereff.in/regexpu. Used for compatability in older browsers.
560
558
  Utils.regexpEmojiPresentation = /(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])/g;
559
+ Utils.validHosts = ["localhost"];
561
560
  Utils.init();
562
561
 
563
562
  ;// CONCATENATED MODULE: ../../libs/common/src/models/data/server-config.data.ts
@@ -614,7 +613,7 @@ var EncryptionType;
614
613
  EncryptionType[EncryptionType["Rsa2048_OaepSha1_HmacSha256_B64"] = 6] = "Rsa2048_OaepSha1_HmacSha256_B64";
615
614
  })(EncryptionType || (EncryptionType = {}));
616
615
 
617
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/encString.ts
616
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/enc-string.ts
618
617
  var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
619
618
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
620
619
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -648,6 +647,9 @@ class EncString {
648
647
  return this.encryptedString;
649
648
  }
650
649
  static fromJSON(obj) {
650
+ if (obj == null) {
651
+ return null;
652
+ }
651
653
  return new EncString(obj);
652
654
  }
653
655
  initFromData(encType, data, iv, mac) {
@@ -757,7 +759,7 @@ class EncString {
757
759
  }
758
760
  }
759
761
 
760
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/environmentUrls.ts
762
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/environment-urls.ts
761
763
  class EnvironmentUrls {
762
764
  constructor() {
763
765
  this.base = null;
@@ -774,7 +776,7 @@ class EnvironmentUrls {
774
776
  }
775
777
  }
776
778
 
777
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/symmetricCryptoKey.ts
779
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/symmetric-crypto-key.ts
778
780
 
779
781
 
780
782
  class SymmetricCryptoKey {
@@ -1004,11 +1006,11 @@ var ThemeType;
1004
1006
  ThemeType["SolarizedDark"] = "solarizedDark";
1005
1007
  })(ThemeType || (ThemeType = {}));
1006
1008
 
1007
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/windowState.ts
1009
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/window-state.ts
1008
1010
  class WindowState {
1009
1011
  }
1010
1012
 
1011
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/globalState.ts
1013
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/global-state.ts
1012
1014
 
1013
1015
 
1014
1016
 
@@ -1216,7 +1218,7 @@ var authenticationType_AuthenticationType;
1216
1218
  AuthenticationType[AuthenticationType["Passwordless"] = 3] = "Passwordless";
1217
1219
  })(authenticationType_AuthenticationType || (authenticationType_AuthenticationType = {}));
1218
1220
 
1219
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/identityToken/tokenRequest.ts
1221
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/identity-token/token.request.ts
1220
1222
  class TokenRequest {
1221
1223
  constructor(twoFactor, device) {
1222
1224
  this.twoFactor = twoFactor;
@@ -1257,7 +1259,7 @@ class TokenRequest {
1257
1259
  }
1258
1260
  }
1259
1261
 
1260
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/identityToken/apiTokenRequest.ts
1262
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/identity-token/api-token.request.ts
1261
1263
 
1262
1264
  class ApiTokenRequest extends TokenRequest {
1263
1265
  constructor(clientId, clientSecret, twoFactor, device) {
@@ -1288,7 +1290,7 @@ var TwoFactorProviderType;
1288
1290
  TwoFactorProviderType[TwoFactorProviderType["WebAuthn"] = 7] = "WebAuthn";
1289
1291
  })(TwoFactorProviderType || (TwoFactorProviderType = {}));
1290
1292
 
1291
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/authResult.ts
1293
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/auth-result.ts
1292
1294
 
1293
1295
  class AuthResult {
1294
1296
  constructor() {
@@ -1305,7 +1307,7 @@ class AuthResult {
1305
1307
  }
1306
1308
  }
1307
1309
 
1308
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/deviceRequest.ts
1310
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/device.request.ts
1309
1311
  class DeviceRequest {
1310
1312
  constructor(appId, platformUtilsService) {
1311
1313
  this.type = platformUtilsService.getDevice();
@@ -1315,8 +1317,8 @@ class DeviceRequest {
1315
1317
  }
1316
1318
  }
1317
1319
 
1318
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/identityToken/tokenRequestTwoFactor.ts
1319
- class TokenRequestTwoFactor {
1320
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/identity-token/token-two-factor.request.ts
1321
+ class TokenTwoFactorRequest {
1320
1322
  constructor(provider = null, token = null, remember = false) {
1321
1323
  this.provider = provider;
1322
1324
  this.token = token;
@@ -1324,7 +1326,7 @@ class TokenRequestTwoFactor {
1324
1326
  }
1325
1327
  }
1326
1328
 
1327
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/keysRequest.ts
1329
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/keys.request.ts
1328
1330
  class KeysRequest {
1329
1331
  constructor(publicKey, encryptedPrivateKey) {
1330
1332
  this.publicKey = publicKey;
@@ -1332,7 +1334,7 @@ class KeysRequest {
1332
1334
  }
1333
1335
  }
1334
1336
 
1335
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/baseResponse.ts
1337
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/base.response.ts
1336
1338
  class BaseResponse {
1337
1339
  constructor(response) {
1338
1340
  this.response = response;
@@ -1370,7 +1372,7 @@ class BaseResponse {
1370
1372
  }
1371
1373
  }
1372
1374
 
1373
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/identityCaptchaResponse.ts
1375
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/identity-captcha.response.ts
1374
1376
 
1375
1377
  class IdentityCaptchaResponse extends BaseResponse {
1376
1378
  constructor(response) {
@@ -1379,7 +1381,7 @@ class IdentityCaptchaResponse extends BaseResponse {
1379
1381
  }
1380
1382
  }
1381
1383
 
1382
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/identityTokenResponse.ts
1384
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/identity-token.response.ts
1383
1385
 
1384
1386
  class IdentityTokenResponse extends BaseResponse {
1385
1387
  constructor(response) {
@@ -1400,7 +1402,7 @@ class IdentityTokenResponse extends BaseResponse {
1400
1402
  }
1401
1403
  }
1402
1404
 
1403
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/identityTwoFactorResponse.ts
1405
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/identity-two-factor.response.ts
1404
1406
 
1405
1407
  class IdentityTwoFactorResponse extends BaseResponse {
1406
1408
  constructor(response) {
@@ -1491,9 +1493,9 @@ class LogInStrategy {
1491
1493
  }
1492
1494
  const storedTwoFactorToken = yield this.tokenService.getTwoFactorToken();
1493
1495
  if (storedTwoFactorToken != null) {
1494
- return new TokenRequestTwoFactor(TwoFactorProviderType.Remember, storedTwoFactorToken, false);
1496
+ return new TokenTwoFactorRequest(TwoFactorProviderType.Remember, storedTwoFactorToken, false);
1495
1497
  }
1496
- return new TokenRequestTwoFactor();
1498
+ return new TokenTwoFactorRequest();
1497
1499
  });
1498
1500
  }
1499
1501
  saveAccountInformation(tokenResponse) {
@@ -1502,6 +1504,7 @@ class LogInStrategy {
1502
1504
  yield this.stateService.addAccount(new Account({
1503
1505
  profile: Object.assign(Object.assign({}, new AccountProfile()), {
1504
1506
  userId: accountInformation.sub,
1507
+ name: accountInformation.name,
1505
1508
  email: accountInformation.email,
1506
1509
  hasPremiumPersonally: accountInformation.premium,
1507
1510
  kdfIterations: tokenResponse.kdfIterations,
@@ -1616,7 +1619,7 @@ var HashPurpose;
1616
1619
  HashPurpose[HashPurpose["LocalAuthorization"] = 2] = "LocalAuthorization";
1617
1620
  })(HashPurpose || (HashPurpose = {}));
1618
1621
 
1619
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/identityToken/passwordTokenRequest.ts
1622
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/identity-token/password-token.request.ts
1620
1623
 
1621
1624
 
1622
1625
  class PasswordTokenRequest extends TokenRequest {
@@ -1714,13 +1717,16 @@ class PasswordlessLogInStrategy extends LogInStrategy {
1714
1717
  get email() {
1715
1718
  return this.tokenRequest.email;
1716
1719
  }
1717
- get masterPasswordHash() {
1718
- return this.tokenRequest.masterPasswordHash;
1720
+ get accessCode() {
1721
+ return this.passwordlessCredentials.accessCode;
1722
+ }
1723
+ get authRequestId() {
1724
+ return this.passwordlessCredentials.authRequestId;
1719
1725
  }
1720
1726
  onSuccessfulLogin() {
1721
1727
  return passwordlessLogin_strategy_awaiter(this, void 0, void 0, function* () {
1722
- yield this.cryptoService.setKey(this.key);
1723
- yield this.cryptoService.setKeyHash(this.localHashedPassword);
1728
+ yield this.cryptoService.setKey(this.passwordlessCredentials.decKey);
1729
+ yield this.cryptoService.setKeyHash(this.passwordlessCredentials.localPasswordHash);
1724
1730
  });
1725
1731
  }
1726
1732
  logInTwoFactor(twoFactor, captchaResponse) {
@@ -1734,8 +1740,7 @@ class PasswordlessLogInStrategy extends LogInStrategy {
1734
1740
  }
1735
1741
  logIn(credentials) {
1736
1742
  return passwordlessLogin_strategy_awaiter(this, void 0, void 0, function* () {
1737
- this.localHashedPassword = credentials.localPasswordHash;
1738
- this.key = credentials.decKey;
1743
+ this.passwordlessCredentials = credentials;
1739
1744
  this.tokenRequest = new PasswordTokenRequest(credentials.email, credentials.accessCode, null, yield this.buildTwoFactor(credentials.twoFactor), yield this.buildDeviceRequest());
1740
1745
  this.tokenRequest.setPasswordlessAccessCode(credentials.authRequestId);
1741
1746
  return this.startLogIn();
@@ -1743,7 +1748,7 @@ class PasswordlessLogInStrategy extends LogInStrategy {
1743
1748
  }
1744
1749
  }
1745
1750
 
1746
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/identityToken/ssoTokenRequest.ts
1751
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/identity-token/sso-token.request.ts
1747
1752
 
1748
1753
  class SsoTokenRequest extends TokenRequest {
1749
1754
  constructor(code, codeVerifier, redirectUri, twoFactor, device) {
@@ -1802,14 +1807,14 @@ class SsoLogInStrategy extends LogInStrategy {
1802
1807
  }
1803
1808
  }
1804
1809
 
1805
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/preloginRequest.ts
1810
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/prelogin.request.ts
1806
1811
  class PreloginRequest {
1807
1812
  constructor(email) {
1808
1813
  this.email = email;
1809
1814
  }
1810
1815
  }
1811
1816
 
1812
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/errorResponse.ts
1817
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/error.response.ts
1813
1818
 
1814
1819
 
1815
1820
  class ErrorResponse extends BaseResponse {
@@ -1913,13 +1918,27 @@ class AuthService {
1913
1918
  this.pushNotificationSubject = new external_rxjs_namespaceObject.Subject();
1914
1919
  }
1915
1920
  get email() {
1916
- return this.logInStrategy instanceof PasswordLogInStrategy ? this.logInStrategy.email : null;
1921
+ if (this.logInStrategy instanceof PasswordLogInStrategy ||
1922
+ this.logInStrategy instanceof PasswordlessLogInStrategy) {
1923
+ return this.logInStrategy.email;
1924
+ }
1925
+ return null;
1917
1926
  }
1918
1927
  get masterPasswordHash() {
1919
1928
  return this.logInStrategy instanceof PasswordLogInStrategy
1920
1929
  ? this.logInStrategy.masterPasswordHash
1921
1930
  : null;
1922
1931
  }
1932
+ get accessCode() {
1933
+ return this.logInStrategy instanceof PasswordlessLogInStrategy
1934
+ ? this.logInStrategy.accessCode
1935
+ : null;
1936
+ }
1937
+ get authRequestId() {
1938
+ return this.logInStrategy instanceof PasswordlessLogInStrategy
1939
+ ? this.logInStrategy.authRequestId
1940
+ : null;
1941
+ }
1923
1942
  logIn(credentials) {
1924
1943
  return auth_service_awaiter(this, void 0, void 0, function* () {
1925
1944
  this.clearState();
@@ -1980,6 +1999,9 @@ class AuthService {
1980
1999
  authingWithPassword() {
1981
2000
  return this.logInStrategy instanceof PasswordLogInStrategy;
1982
2001
  }
2002
+ authingWithPasswordless() {
2003
+ return this.logInStrategy instanceof PasswordlessLogInStrategy;
2004
+ }
1983
2005
  getAuthStatus(userId) {
1984
2006
  return auth_service_awaiter(this, void 0, void 0, function* () {
1985
2007
  const isAuthenticated = yield this.stateService.getIsAuthenticated({ userId: userId });
@@ -2159,7 +2181,7 @@ function sequentialize(cacheKey) {
2159
2181
  };
2160
2182
  }
2161
2183
 
2162
- ;// CONCATENATED MODULE: ../../libs/common/src/models/data/attachmentData.ts
2184
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/data/attachment.data.ts
2163
2185
  class AttachmentData {
2164
2186
  constructor(response) {
2165
2187
  if (response == null) {
@@ -2174,7 +2196,7 @@ class AttachmentData {
2174
2196
  }
2175
2197
  }
2176
2198
 
2177
- ;// CONCATENATED MODULE: ../../libs/common/src/models/data/cardData.ts
2199
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/data/card.data.ts
2178
2200
  class CardData {
2179
2201
  constructor(data) {
2180
2202
  if (data == null) {
@@ -2189,7 +2211,7 @@ class CardData {
2189
2211
  }
2190
2212
  }
2191
2213
 
2192
- ;// CONCATENATED MODULE: ../../libs/common/src/models/data/fieldData.ts
2214
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/data/field.data.ts
2193
2215
  class FieldData {
2194
2216
  constructor(response) {
2195
2217
  if (response == null) {
@@ -2202,7 +2224,7 @@ class FieldData {
2202
2224
  }
2203
2225
  }
2204
2226
 
2205
- ;// CONCATENATED MODULE: ../../libs/common/src/models/data/identityData.ts
2227
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/data/identity.data.ts
2206
2228
  class IdentityData {
2207
2229
  constructor(data) {
2208
2230
  if (data == null) {
@@ -2229,7 +2251,7 @@ class IdentityData {
2229
2251
  }
2230
2252
  }
2231
2253
 
2232
- ;// CONCATENATED MODULE: ../../libs/common/src/models/data/loginUriData.ts
2254
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/data/login-uri.data.ts
2233
2255
  class LoginUriData {
2234
2256
  constructor(data) {
2235
2257
  this.match = null;
@@ -2241,7 +2263,7 @@ class LoginUriData {
2241
2263
  }
2242
2264
  }
2243
2265
 
2244
- ;// CONCATENATED MODULE: ../../libs/common/src/models/data/loginData.ts
2266
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/data/login.data.ts
2245
2267
 
2246
2268
  class LoginData {
2247
2269
  constructor(data) {
@@ -2259,7 +2281,7 @@ class LoginData {
2259
2281
  }
2260
2282
  }
2261
2283
 
2262
- ;// CONCATENATED MODULE: ../../libs/common/src/models/data/passwordHistoryData.ts
2284
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/data/password-history.data.ts
2263
2285
  class PasswordHistoryData {
2264
2286
  constructor(response) {
2265
2287
  if (response == null) {
@@ -2270,7 +2292,7 @@ class PasswordHistoryData {
2270
2292
  }
2271
2293
  }
2272
2294
 
2273
- ;// CONCATENATED MODULE: ../../libs/common/src/models/data/secureNoteData.ts
2295
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/data/secure-note.data.ts
2274
2296
  class SecureNoteData {
2275
2297
  constructor(data) {
2276
2298
  if (data == null) {
@@ -2280,7 +2302,7 @@ class SecureNoteData {
2280
2302
  }
2281
2303
  }
2282
2304
 
2283
- ;// CONCATENATED MODULE: ../../libs/common/src/models/data/cipherData.ts
2305
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/data/cipher.data.ts
2284
2306
 
2285
2307
 
2286
2308
 
@@ -2306,6 +2328,7 @@ class CipherData {
2306
2328
  this.name = response.name;
2307
2329
  this.notes = response.notes;
2308
2330
  this.collectionIds = collectionIds != null ? collectionIds : response.collectionIds;
2331
+ this.creationDate = response.creationDate;
2309
2332
  this.deletedDate = response.deletedDate;
2310
2333
  this.reprompt = response.reprompt;
2311
2334
  switch (this.type) {
@@ -2336,7 +2359,7 @@ class CipherData {
2336
2359
  }
2337
2360
  }
2338
2361
 
2339
- ;// CONCATENATED MODULE: ../../libs/common/src/models/view/attachmentView.ts
2362
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/view/attachment.view.ts
2340
2363
 
2341
2364
  class AttachmentView {
2342
2365
  constructor(a) {
@@ -2371,8 +2394,8 @@ class AttachmentView {
2371
2394
  }
2372
2395
  }
2373
2396
 
2374
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/domainBase.ts
2375
- var domainBase_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
2397
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/domain-base.ts
2398
+ var domain_base_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
2376
2399
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
2377
2400
  return new (P || (P = Promise))(function (resolve, reject) {
2378
2401
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -2414,7 +2437,7 @@ class Domain {
2414
2437
  }
2415
2438
  }
2416
2439
  decryptObj(viewModel, map, orgId, key = null) {
2417
- return domainBase_awaiter(this, void 0, void 0, function* () {
2440
+ return domain_base_awaiter(this, void 0, void 0, function* () {
2418
2441
  const promises = [];
2419
2442
  const self = this;
2420
2443
  for (const prop in map) {
@@ -2458,6 +2481,7 @@ var attachment_awaiter = (undefined && undefined.__awaiter) || function (thisArg
2458
2481
 
2459
2482
 
2460
2483
 
2484
+
2461
2485
  class Attachment extends Domain {
2462
2486
  constructor(obj) {
2463
2487
  super();
@@ -2519,6 +2543,17 @@ class Attachment extends Domain {
2519
2543
  }, ["id", "url", "sizeName"]);
2520
2544
  return a;
2521
2545
  }
2546
+ static fromJSON(obj) {
2547
+ if (obj == null) {
2548
+ return null;
2549
+ }
2550
+ const key = EncString.fromJSON(obj.key);
2551
+ const fileName = EncString.fromJSON(obj.fileName);
2552
+ return Object.assign(new Attachment(), obj, {
2553
+ key,
2554
+ fileName,
2555
+ });
2556
+ }
2522
2557
  }
2523
2558
 
2524
2559
  ;// CONCATENATED MODULE: ../../libs/common/src/enums/linkedIdType.ts
@@ -2589,18 +2624,18 @@ function linkedFieldOption(id, i18nKey) {
2589
2624
  };
2590
2625
  }
2591
2626
 
2592
- ;// CONCATENATED MODULE: ../../libs/common/src/models/view/itemView.ts
2627
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/view/item.view.ts
2593
2628
  class ItemView {
2594
2629
  }
2595
2630
 
2596
- ;// CONCATENATED MODULE: ../../libs/common/src/models/view/cardView.ts
2597
- var cardView_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2631
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/view/card.view.ts
2632
+ var card_view_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2598
2633
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2599
2634
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2600
2635
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2601
2636
  return c > 3 && r && Object.defineProperty(target, key, r), r;
2602
2637
  };
2603
- var cardView_metadata = (undefined && undefined.__metadata) || function (k, v) {
2638
+ var card_view_metadata = (undefined && undefined.__metadata) || function (k, v) {
2604
2639
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
2605
2640
  };
2606
2641
 
@@ -2669,37 +2704,38 @@ class CardView extends ItemView {
2669
2704
  return Object.assign(new CardView(), obj);
2670
2705
  }
2671
2706
  }
2672
- cardView_decorate([
2707
+ card_view_decorate([
2673
2708
  linkedFieldOption(CardLinkedId.CardholderName),
2674
- cardView_metadata("design:type", String)
2709
+ card_view_metadata("design:type", String)
2675
2710
  ], CardView.prototype, "cardholderName", void 0);
2676
- cardView_decorate([
2711
+ card_view_decorate([
2677
2712
  linkedFieldOption(CardLinkedId.ExpMonth, "expirationMonth"),
2678
- cardView_metadata("design:type", String)
2713
+ card_view_metadata("design:type", String)
2679
2714
  ], CardView.prototype, "expMonth", void 0);
2680
- cardView_decorate([
2715
+ card_view_decorate([
2681
2716
  linkedFieldOption(CardLinkedId.ExpYear, "expirationYear"),
2682
- cardView_metadata("design:type", String)
2717
+ card_view_metadata("design:type", String)
2683
2718
  ], CardView.prototype, "expYear", void 0);
2684
- cardView_decorate([
2719
+ card_view_decorate([
2685
2720
  linkedFieldOption(CardLinkedId.Code, "securityCode"),
2686
- cardView_metadata("design:type", String)
2721
+ card_view_metadata("design:type", String)
2687
2722
  ], CardView.prototype, "code", void 0);
2688
- cardView_decorate([
2723
+ card_view_decorate([
2689
2724
  linkedFieldOption(CardLinkedId.Brand),
2690
- cardView_metadata("design:type", String),
2691
- cardView_metadata("design:paramtypes", [String])
2725
+ card_view_metadata("design:type", String),
2726
+ card_view_metadata("design:paramtypes", [String])
2692
2727
  ], CardView.prototype, "brand", null);
2693
- cardView_decorate([
2728
+ card_view_decorate([
2694
2729
  linkedFieldOption(CardLinkedId.Number),
2695
- cardView_metadata("design:type", String),
2696
- cardView_metadata("design:paramtypes", [String])
2730
+ card_view_metadata("design:type", String),
2731
+ card_view_metadata("design:paramtypes", [String])
2697
2732
  ], CardView.prototype, "number", null);
2698
2733
 
2699
2734
  ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/card.ts
2700
2735
 
2701
2736
 
2702
2737
 
2738
+
2703
2739
  class Card extends Domain {
2704
2740
  constructor(obj) {
2705
2741
  super();
@@ -2737,8 +2773,34 @@ class Card extends Domain {
2737
2773
  });
2738
2774
  return c;
2739
2775
  }
2776
+ static fromJSON(obj) {
2777
+ if (obj == null) {
2778
+ return null;
2779
+ }
2780
+ const cardholderName = EncString.fromJSON(obj.cardholderName);
2781
+ const brand = EncString.fromJSON(obj.brand);
2782
+ const number = EncString.fromJSON(obj.number);
2783
+ const expMonth = EncString.fromJSON(obj.expMonth);
2784
+ const expYear = EncString.fromJSON(obj.expYear);
2785
+ const code = EncString.fromJSON(obj.code);
2786
+ return Object.assign(new Card(), obj, {
2787
+ cardholderName,
2788
+ brand,
2789
+ number,
2790
+ expMonth,
2791
+ expYear,
2792
+ code,
2793
+ });
2794
+ }
2740
2795
  }
2741
2796
 
2797
+ ;// CONCATENATED MODULE: ../../libs/common/src/services/cryptography/initializer-key.ts
2798
+ var InitializerKey;
2799
+ (function (InitializerKey) {
2800
+ InitializerKey[InitializerKey["Cipher"] = 0] = "Cipher";
2801
+ InitializerKey[InitializerKey["CipherView"] = 1] = "CipherView";
2802
+ })(InitializerKey || (InitializerKey = {}));
2803
+
2742
2804
  ;// CONCATENATED MODULE: ../../libs/common/src/enums/cipherRepromptType.ts
2743
2805
  var CipherRepromptType;
2744
2806
  (function (CipherRepromptType) {
@@ -2746,7 +2808,7 @@ var CipherRepromptType;
2746
2808
  CipherRepromptType[CipherRepromptType["Password"] = 1] = "Password";
2747
2809
  })(CipherRepromptType || (CipherRepromptType = {}));
2748
2810
 
2749
- ;// CONCATENATED MODULE: ../../libs/common/src/models/view/fieldView.ts
2811
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/view/field.view.ts
2750
2812
  class FieldView {
2751
2813
  constructor(f) {
2752
2814
  this.name = null;
@@ -2770,14 +2832,14 @@ class FieldView {
2770
2832
  }
2771
2833
  }
2772
2834
 
2773
- ;// CONCATENATED MODULE: ../../libs/common/src/models/view/identityView.ts
2774
- var identityView_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2835
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/view/identity.view.ts
2836
+ var identity_view_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2775
2837
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2776
2838
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2777
2839
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2778
2840
  return c > 3 && r && Object.defineProperty(target, key, r), r;
2779
2841
  };
2780
- var identityView_metadata = (undefined && undefined.__metadata) || function (k, v) {
2842
+ var identity_view_metadata = (undefined && undefined.__metadata) || function (k, v) {
2781
2843
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
2782
2844
  };
2783
2845
 
@@ -2892,87 +2954,87 @@ class IdentityView extends ItemView {
2892
2954
  return Object.assign(new IdentityView(), obj);
2893
2955
  }
2894
2956
  }
2895
- identityView_decorate([
2957
+ identity_view_decorate([
2896
2958
  linkedFieldOption(IdentityLinkedId.Title),
2897
- identityView_metadata("design:type", String)
2959
+ identity_view_metadata("design:type", String)
2898
2960
  ], IdentityView.prototype, "title", void 0);
2899
- identityView_decorate([
2961
+ identity_view_decorate([
2900
2962
  linkedFieldOption(IdentityLinkedId.MiddleName),
2901
- identityView_metadata("design:type", String)
2963
+ identity_view_metadata("design:type", String)
2902
2964
  ], IdentityView.prototype, "middleName", void 0);
2903
- identityView_decorate([
2965
+ identity_view_decorate([
2904
2966
  linkedFieldOption(IdentityLinkedId.Address1),
2905
- identityView_metadata("design:type", String)
2967
+ identity_view_metadata("design:type", String)
2906
2968
  ], IdentityView.prototype, "address1", void 0);
2907
- identityView_decorate([
2969
+ identity_view_decorate([
2908
2970
  linkedFieldOption(IdentityLinkedId.Address2),
2909
- identityView_metadata("design:type", String)
2971
+ identity_view_metadata("design:type", String)
2910
2972
  ], IdentityView.prototype, "address2", void 0);
2911
- identityView_decorate([
2973
+ identity_view_decorate([
2912
2974
  linkedFieldOption(IdentityLinkedId.Address3),
2913
- identityView_metadata("design:type", String)
2975
+ identity_view_metadata("design:type", String)
2914
2976
  ], IdentityView.prototype, "address3", void 0);
2915
- identityView_decorate([
2977
+ identity_view_decorate([
2916
2978
  linkedFieldOption(IdentityLinkedId.City, "cityTown"),
2917
- identityView_metadata("design:type", String)
2979
+ identity_view_metadata("design:type", String)
2918
2980
  ], IdentityView.prototype, "city", void 0);
2919
- identityView_decorate([
2981
+ identity_view_decorate([
2920
2982
  linkedFieldOption(IdentityLinkedId.State, "stateProvince"),
2921
- identityView_metadata("design:type", String)
2983
+ identity_view_metadata("design:type", String)
2922
2984
  ], IdentityView.prototype, "state", void 0);
2923
- identityView_decorate([
2985
+ identity_view_decorate([
2924
2986
  linkedFieldOption(IdentityLinkedId.PostalCode, "zipPostalCode"),
2925
- identityView_metadata("design:type", String)
2987
+ identity_view_metadata("design:type", String)
2926
2988
  ], IdentityView.prototype, "postalCode", void 0);
2927
- identityView_decorate([
2989
+ identity_view_decorate([
2928
2990
  linkedFieldOption(IdentityLinkedId.Country),
2929
- identityView_metadata("design:type", String)
2991
+ identity_view_metadata("design:type", String)
2930
2992
  ], IdentityView.prototype, "country", void 0);
2931
- identityView_decorate([
2993
+ identity_view_decorate([
2932
2994
  linkedFieldOption(IdentityLinkedId.Company),
2933
- identityView_metadata("design:type", String)
2995
+ identity_view_metadata("design:type", String)
2934
2996
  ], IdentityView.prototype, "company", void 0);
2935
- identityView_decorate([
2997
+ identity_view_decorate([
2936
2998
  linkedFieldOption(IdentityLinkedId.Email),
2937
- identityView_metadata("design:type", String)
2999
+ identity_view_metadata("design:type", String)
2938
3000
  ], IdentityView.prototype, "email", void 0);
2939
- identityView_decorate([
3001
+ identity_view_decorate([
2940
3002
  linkedFieldOption(IdentityLinkedId.Phone),
2941
- identityView_metadata("design:type", String)
3003
+ identity_view_metadata("design:type", String)
2942
3004
  ], IdentityView.prototype, "phone", void 0);
2943
- identityView_decorate([
3005
+ identity_view_decorate([
2944
3006
  linkedFieldOption(IdentityLinkedId.Ssn),
2945
- identityView_metadata("design:type", String)
3007
+ identity_view_metadata("design:type", String)
2946
3008
  ], IdentityView.prototype, "ssn", void 0);
2947
- identityView_decorate([
3009
+ identity_view_decorate([
2948
3010
  linkedFieldOption(IdentityLinkedId.Username),
2949
- identityView_metadata("design:type", String)
3011
+ identity_view_metadata("design:type", String)
2950
3012
  ], IdentityView.prototype, "username", void 0);
2951
- identityView_decorate([
3013
+ identity_view_decorate([
2952
3014
  linkedFieldOption(IdentityLinkedId.PassportNumber),
2953
- identityView_metadata("design:type", String)
3015
+ identity_view_metadata("design:type", String)
2954
3016
  ], IdentityView.prototype, "passportNumber", void 0);
2955
- identityView_decorate([
3017
+ identity_view_decorate([
2956
3018
  linkedFieldOption(IdentityLinkedId.LicenseNumber),
2957
- identityView_metadata("design:type", String)
3019
+ identity_view_metadata("design:type", String)
2958
3020
  ], IdentityView.prototype, "licenseNumber", void 0);
2959
- identityView_decorate([
3021
+ identity_view_decorate([
2960
3022
  linkedFieldOption(IdentityLinkedId.FirstName),
2961
- identityView_metadata("design:type", String),
2962
- identityView_metadata("design:paramtypes", [String])
3023
+ identity_view_metadata("design:type", String),
3024
+ identity_view_metadata("design:paramtypes", [String])
2963
3025
  ], IdentityView.prototype, "firstName", null);
2964
- identityView_decorate([
3026
+ identity_view_decorate([
2965
3027
  linkedFieldOption(IdentityLinkedId.LastName),
2966
- identityView_metadata("design:type", String),
2967
- identityView_metadata("design:paramtypes", [String])
3028
+ identity_view_metadata("design:type", String),
3029
+ identity_view_metadata("design:paramtypes", [String])
2968
3030
  ], IdentityView.prototype, "lastName", null);
2969
- identityView_decorate([
3031
+ identity_view_decorate([
2970
3032
  linkedFieldOption(IdentityLinkedId.FullName),
2971
- identityView_metadata("design:type", String),
2972
- identityView_metadata("design:paramtypes", [])
3033
+ identity_view_metadata("design:type", String),
3034
+ identity_view_metadata("design:paramtypes", [])
2973
3035
  ], IdentityView.prototype, "fullName", null);
2974
3036
 
2975
- ;// CONCATENATED MODULE: ../../libs/common/src/models/view/loginUriView.ts
3037
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/view/login-uri.view.ts
2976
3038
 
2977
3039
 
2978
3040
  const CanLaunchWhitelist = [
@@ -3054,7 +3116,7 @@ class LoginUriView {
3054
3116
  return (this.uri != null &&
3055
3117
  (this.uri.indexOf("http://") === 0 ||
3056
3118
  this.uri.indexOf("https://") === 0 ||
3057
- (this.uri.indexOf("://") < 0 && Utils.tldEndingRegex.test(this.uri))));
3119
+ (this.uri.indexOf("://") < 0 && !Utils.isNullOrWhitespace(Utils.getDomain(this.uri)))));
3058
3120
  }
3059
3121
  get canLaunch() {
3060
3122
  if (this._canLaunch != null) {
@@ -3073,7 +3135,7 @@ class LoginUriView {
3073
3135
  return this._canLaunch;
3074
3136
  }
3075
3137
  get launchUri() {
3076
- return this.uri.indexOf("://") < 0 && Utils.tldEndingRegex.test(this.uri)
3138
+ return this.uri.indexOf("://") < 0 && !Utils.isNullOrWhitespace(Utils.getDomain(this.uri))
3077
3139
  ? "http://" + this.uri
3078
3140
  : this.uri;
3079
3141
  }
@@ -3082,14 +3144,14 @@ class LoginUriView {
3082
3144
  }
3083
3145
  }
3084
3146
 
3085
- ;// CONCATENATED MODULE: ../../libs/common/src/models/view/loginView.ts
3086
- var loginView_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
3147
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/view/login.view.ts
3148
+ var login_view_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
3087
3149
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3088
3150
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3089
3151
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3090
3152
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3091
3153
  };
3092
- var loginView_metadata = (undefined && undefined.__metadata) || function (k, v) {
3154
+ var login_view_metadata = (undefined && undefined.__metadata) || function (k, v) {
3093
3155
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
3094
3156
  };
3095
3157
 
@@ -3149,16 +3211,16 @@ class LoginView extends ItemView {
3149
3211
  });
3150
3212
  }
3151
3213
  }
3152
- loginView_decorate([
3214
+ login_view_decorate([
3153
3215
  linkedFieldOption(LoginLinkedId.Username),
3154
- loginView_metadata("design:type", String)
3216
+ login_view_metadata("design:type", String)
3155
3217
  ], LoginView.prototype, "username", void 0);
3156
- loginView_decorate([
3218
+ login_view_decorate([
3157
3219
  linkedFieldOption(LoginLinkedId.Password),
3158
- loginView_metadata("design:type", String)
3220
+ login_view_metadata("design:type", String)
3159
3221
  ], LoginView.prototype, "password", void 0);
3160
3222
 
3161
- ;// CONCATENATED MODULE: ../../libs/common/src/models/view/passwordHistoryView.ts
3223
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/view/password-history.view.ts
3162
3224
  class PasswordHistoryView {
3163
3225
  constructor(ph) {
3164
3226
  this.password = null;
@@ -3176,7 +3238,7 @@ class PasswordHistoryView {
3176
3238
  }
3177
3239
  }
3178
3240
 
3179
- ;// CONCATENATED MODULE: ../../libs/common/src/models/view/secureNoteView.ts
3241
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/view/secure-note.view.ts
3180
3242
 
3181
3243
  class SecureNoteView extends ItemView {
3182
3244
  constructor(n) {
@@ -3195,7 +3257,8 @@ class SecureNoteView extends ItemView {
3195
3257
  }
3196
3258
  }
3197
3259
 
3198
- ;// CONCATENATED MODULE: ../../libs/common/src/models/view/cipherView.ts
3260
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/view/cipher.view.ts
3261
+
3199
3262
 
3200
3263
 
3201
3264
 
@@ -3208,6 +3271,7 @@ class SecureNoteView extends ItemView {
3208
3271
  class CipherView {
3209
3272
  constructor(c) {
3210
3273
  var _a;
3274
+ this.initializerKey = InitializerKey.CipherView;
3211
3275
  this.id = null;
3212
3276
  this.organizationId = null;
3213
3277
  this.folderId = null;
@@ -3227,6 +3291,7 @@ class CipherView {
3227
3291
  this.passwordHistory = null;
3228
3292
  this.collectionIds = null;
3229
3293
  this.revisionDate = null;
3294
+ this.creationDate = null;
3230
3295
  this.deletedDate = null;
3231
3296
  this.reprompt = CipherRepromptType.None;
3232
3297
  if (!c) {
@@ -3243,6 +3308,7 @@ class CipherView {
3243
3308
  this.localData = c.localData;
3244
3309
  this.collectionIds = c.collectionIds;
3245
3310
  this.revisionDate = c.revisionDate;
3311
+ this.creationDate = c.creationDate;
3246
3312
  this.deletedDate = c.deletedDate;
3247
3313
  // Old locally stored ciphers might have reprompt == null. If so set it to None.
3248
3314
  this.reprompt = (_a = c.reprompt) !== null && _a !== void 0 ? _a : CipherRepromptType.None;
@@ -3351,6 +3417,7 @@ class CipherView {
3351
3417
 
3352
3418
 
3353
3419
 
3420
+
3354
3421
  class Field extends Domain {
3355
3422
  constructor(obj) {
3356
3423
  super();
@@ -3380,12 +3447,24 @@ class Field extends Domain {
3380
3447
  }, ["type", "linkedId"]);
3381
3448
  return f;
3382
3449
  }
3450
+ static fromJSON(obj) {
3451
+ if (obj == null) {
3452
+ return null;
3453
+ }
3454
+ const name = EncString.fromJSON(obj.name);
3455
+ const value = EncString.fromJSON(obj.value);
3456
+ return Object.assign(new Field(), obj, {
3457
+ name,
3458
+ value,
3459
+ });
3460
+ }
3383
3461
  }
3384
3462
 
3385
3463
  ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/identity.ts
3386
3464
 
3387
3465
 
3388
3466
 
3467
+
3389
3468
  class Identity extends Domain {
3390
3469
  constructor(obj) {
3391
3470
  super();
@@ -3459,9 +3538,53 @@ class Identity extends Domain {
3459
3538
  });
3460
3539
  return i;
3461
3540
  }
3462
- }
3463
-
3464
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/loginUri.ts
3541
+ static fromJSON(obj) {
3542
+ if (obj == null) {
3543
+ return null;
3544
+ }
3545
+ const title = EncString.fromJSON(obj.title);
3546
+ const firstName = EncString.fromJSON(obj.firstName);
3547
+ const middleName = EncString.fromJSON(obj.middleName);
3548
+ const lastName = EncString.fromJSON(obj.lastName);
3549
+ const address1 = EncString.fromJSON(obj.address1);
3550
+ const address2 = EncString.fromJSON(obj.address2);
3551
+ const address3 = EncString.fromJSON(obj.address3);
3552
+ const city = EncString.fromJSON(obj.city);
3553
+ const state = EncString.fromJSON(obj.state);
3554
+ const postalCode = EncString.fromJSON(obj.postalCode);
3555
+ const country = EncString.fromJSON(obj.country);
3556
+ const company = EncString.fromJSON(obj.company);
3557
+ const email = EncString.fromJSON(obj.email);
3558
+ const phone = EncString.fromJSON(obj.phone);
3559
+ const ssn = EncString.fromJSON(obj.ssn);
3560
+ const username = EncString.fromJSON(obj.username);
3561
+ const passportNumber = EncString.fromJSON(obj.passportNumber);
3562
+ const licenseNumber = EncString.fromJSON(obj.licenseNumber);
3563
+ return Object.assign(new Identity(), obj, {
3564
+ title,
3565
+ firstName,
3566
+ middleName,
3567
+ lastName,
3568
+ address1,
3569
+ address2,
3570
+ address3,
3571
+ city,
3572
+ state,
3573
+ postalCode,
3574
+ country,
3575
+ company,
3576
+ email,
3577
+ phone,
3578
+ ssn,
3579
+ username,
3580
+ passportNumber,
3581
+ licenseNumber,
3582
+ });
3583
+ }
3584
+ }
3585
+
3586
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/login-uri.ts
3587
+
3465
3588
 
3466
3589
 
3467
3590
 
@@ -3489,6 +3612,15 @@ class LoginUri extends Domain {
3489
3612
  }, ["match"]);
3490
3613
  return u;
3491
3614
  }
3615
+ static fromJSON(obj) {
3616
+ if (obj == null) {
3617
+ return null;
3618
+ }
3619
+ const uri = EncString.fromJSON(obj.uri);
3620
+ return Object.assign(new LoginUri(), obj, {
3621
+ uri,
3622
+ });
3623
+ }
3492
3624
  }
3493
3625
 
3494
3626
  ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/login.ts
@@ -3505,6 +3637,7 @@ var login_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _ar
3505
3637
 
3506
3638
 
3507
3639
 
3640
+
3508
3641
  class Login extends Domain {
3509
3642
  constructor(obj) {
3510
3643
  super();
@@ -3561,12 +3694,31 @@ class Login extends Domain {
3561
3694
  }
3562
3695
  return l;
3563
3696
  }
3697
+ static fromJSON(obj) {
3698
+ var _a;
3699
+ if (obj == null) {
3700
+ return null;
3701
+ }
3702
+ const username = EncString.fromJSON(obj.username);
3703
+ const password = EncString.fromJSON(obj.password);
3704
+ const totp = EncString.fromJSON(obj.totp);
3705
+ const passwordRevisionDate = obj.passwordRevisionDate == null ? null : new Date(obj.passwordRevisionDate);
3706
+ const uris = (_a = obj.uris) === null || _a === void 0 ? void 0 : _a.map((uri) => LoginUri.fromJSON(uri));
3707
+ return Object.assign(new Login(), obj, {
3708
+ username,
3709
+ password,
3710
+ totp,
3711
+ passwordRevisionDate: passwordRevisionDate,
3712
+ uris: uris,
3713
+ });
3714
+ }
3564
3715
  }
3565
3716
 
3566
3717
  ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/password.ts
3567
3718
 
3568
3719
 
3569
3720
 
3721
+
3570
3722
  class Password extends Domain {
3571
3723
  constructor(obj) {
3572
3724
  super();
@@ -3591,9 +3743,20 @@ class Password extends Domain {
3591
3743
  });
3592
3744
  return ph;
3593
3745
  }
3746
+ static fromJSON(obj) {
3747
+ if (obj == null) {
3748
+ return null;
3749
+ }
3750
+ const password = EncString.fromJSON(obj.password);
3751
+ const lastUsedDate = obj.lastUsedDate == null ? null : new Date(obj.lastUsedDate);
3752
+ return Object.assign(new Password(), obj, {
3753
+ password,
3754
+ lastUsedDate,
3755
+ });
3756
+ }
3594
3757
  }
3595
3758
 
3596
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/secureNote.ts
3759
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/secure-note.ts
3597
3760
 
3598
3761
 
3599
3762
 
@@ -3613,6 +3776,12 @@ class SecureNote extends Domain {
3613
3776
  n.type = this.type;
3614
3777
  return n;
3615
3778
  }
3779
+ static fromJSON(obj) {
3780
+ if (obj == null) {
3781
+ return null;
3782
+ }
3783
+ return Object.assign(new SecureNote(), obj);
3784
+ }
3616
3785
  }
3617
3786
 
3618
3787
  ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/cipher.ts
@@ -3636,9 +3805,12 @@ var cipher_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _a
3636
3805
 
3637
3806
 
3638
3807
 
3808
+
3809
+
3639
3810
  class Cipher extends Domain {
3640
3811
  constructor(obj, localData = null) {
3641
3812
  super();
3813
+ this.initializerKey = InitializerKey.Cipher;
3642
3814
  if (obj == null) {
3643
3815
  return;
3644
3816
  }
@@ -3662,6 +3834,7 @@ class Cipher extends Domain {
3662
3834
  this.revisionDate = obj.revisionDate != null ? new Date(obj.revisionDate) : null;
3663
3835
  this.collectionIds = obj.collectionIds;
3664
3836
  this.localData = localData;
3837
+ this.creationDate = obj.creationDate != null ? new Date(obj.creationDate) : null;
3665
3838
  this.deletedDate = obj.deletedDate != null ? new Date(obj.deletedDate) : null;
3666
3839
  this.reprompt = obj.reprompt;
3667
3840
  switch (this.type) {
@@ -3777,6 +3950,7 @@ class Cipher extends Domain {
3777
3950
  c.revisionDate = this.revisionDate != null ? this.revisionDate.toISOString() : null;
3778
3951
  c.type = this.type;
3779
3952
  c.collectionIds = this.collectionIds;
3953
+ c.creationDate = this.creationDate != null ? this.creationDate.toISOString() : null;
3780
3954
  c.deletedDate = this.deletedDate != null ? this.deletedDate.toISOString() : null;
3781
3955
  c.reprompt = this.reprompt;
3782
3956
  this.buildDataModel(this, c, {
@@ -3810,10 +3984,50 @@ class Cipher extends Domain {
3810
3984
  }
3811
3985
  return c;
3812
3986
  }
3987
+ static fromJSON(obj) {
3988
+ var _a, _b, _c;
3989
+ if (obj == null) {
3990
+ return null;
3991
+ }
3992
+ const domain = new Cipher();
3993
+ const name = EncString.fromJSON(obj.name);
3994
+ const notes = EncString.fromJSON(obj.notes);
3995
+ const revisionDate = obj.revisionDate == null ? null : new Date(obj.revisionDate);
3996
+ const deletedDate = obj.deletedDate == null ? null : new Date(obj.deletedDate);
3997
+ const attachments = (_a = obj.attachments) === null || _a === void 0 ? void 0 : _a.map((a) => Attachment.fromJSON(a));
3998
+ const fields = (_b = obj.fields) === null || _b === void 0 ? void 0 : _b.map((f) => Field.fromJSON(f));
3999
+ const passwordHistory = (_c = obj.passwordHistory) === null || _c === void 0 ? void 0 : _c.map((ph) => Password.fromJSON(ph));
4000
+ Object.assign(domain, obj, {
4001
+ name,
4002
+ notes,
4003
+ revisionDate,
4004
+ deletedDate,
4005
+ attachments,
4006
+ fields,
4007
+ passwordHistory,
4008
+ });
4009
+ switch (obj.type) {
4010
+ case CipherType.Card:
4011
+ domain.card = Card.fromJSON(obj.card);
4012
+ break;
4013
+ case CipherType.Identity:
4014
+ domain.identity = Identity.fromJSON(obj.identity);
4015
+ break;
4016
+ case CipherType.Login:
4017
+ domain.login = Login.fromJSON(obj.login);
4018
+ break;
4019
+ case CipherType.SecureNote:
4020
+ domain.secureNote = SecureNote.fromJSON(obj.secureNote);
4021
+ break;
4022
+ default:
4023
+ break;
4024
+ }
4025
+ return domain;
4026
+ }
3813
4027
  }
3814
4028
 
3815
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/encArrayBuffer.ts
3816
- var encArrayBuffer_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
4029
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/enc-array-buffer.ts
4030
+ var enc_array_buffer_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
3817
4031
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3818
4032
  return new (P || (P = Promise))(function (resolve, reject) {
3819
4033
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -3867,7 +4081,7 @@ class EncArrayBuffer {
3867
4081
  throw new Error("Error parsing encrypted ArrayBuffer: data is corrupted or has an invalid format.");
3868
4082
  }
3869
4083
  static fromResponse(response) {
3870
- return encArrayBuffer_awaiter(this, void 0, void 0, function* () {
4084
+ return enc_array_buffer_awaiter(this, void 0, void 0, function* () {
3871
4085
  const buffer = yield response.arrayBuffer();
3872
4086
  if (buffer == null) {
3873
4087
  throw new Error("Cannot create EncArrayBuffer from Response - Response is empty");
@@ -3881,7 +4095,7 @@ class EncArrayBuffer {
3881
4095
  }
3882
4096
  }
3883
4097
 
3884
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/sortedCiphersCache.ts
4098
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/sorted-ciphers-cache.ts
3885
4099
  const CacheTTL = 3000;
3886
4100
  class SortedCiphersCache {
3887
4101
  constructor(comparator) {
@@ -3950,7 +4164,7 @@ class Ciphers {
3950
4164
  }
3951
4165
  }
3952
4166
 
3953
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/cipherBulkDeleteRequest.ts
4167
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/cipher-bulk-delete.request.ts
3954
4168
  class CipherBulkDeleteRequest {
3955
4169
  constructor(ids, organizationId) {
3956
4170
  this.ids = ids == null ? [] : ids;
@@ -3958,7 +4172,7 @@ class CipherBulkDeleteRequest {
3958
4172
  }
3959
4173
  }
3960
4174
 
3961
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/cipherBulkMoveRequest.ts
4175
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/cipher-bulk-move.request.ts
3962
4176
  class CipherBulkMoveRequest {
3963
4177
  constructor(ids, folderId) {
3964
4178
  this.ids = ids == null ? [] : ids;
@@ -3966,14 +4180,14 @@ class CipherBulkMoveRequest {
3966
4180
  }
3967
4181
  }
3968
4182
 
3969
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/cipherBulkRestoreRequest.ts
4183
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/cipher-bulk-restore.request.ts
3970
4184
  class CipherBulkRestoreRequest {
3971
4185
  constructor(ids) {
3972
4186
  this.ids = ids == null ? [] : ids;
3973
4187
  }
3974
4188
  }
3975
4189
 
3976
- ;// CONCATENATED MODULE: ../../libs/common/src/models/api/cardApi.ts
4190
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/api/card.api.ts
3977
4191
 
3978
4192
  class CardApi extends BaseResponse {
3979
4193
  constructor(data = null) {
@@ -3990,7 +4204,7 @@ class CardApi extends BaseResponse {
3990
4204
  }
3991
4205
  }
3992
4206
 
3993
- ;// CONCATENATED MODULE: ../../libs/common/src/models/api/fieldApi.ts
4207
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/api/field.api.ts
3994
4208
 
3995
4209
  class FieldApi extends BaseResponse {
3996
4210
  constructor(data = null) {
@@ -4005,7 +4219,7 @@ class FieldApi extends BaseResponse {
4005
4219
  }
4006
4220
  }
4007
4221
 
4008
- ;// CONCATENATED MODULE: ../../libs/common/src/models/api/identityApi.ts
4222
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/api/identity.api.ts
4009
4223
 
4010
4224
  class IdentityApi extends BaseResponse {
4011
4225
  constructor(data = null) {
@@ -4034,7 +4248,7 @@ class IdentityApi extends BaseResponse {
4034
4248
  }
4035
4249
  }
4036
4250
 
4037
- ;// CONCATENATED MODULE: ../../libs/common/src/models/api/loginUriApi.ts
4251
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/api/login-uri.api.ts
4038
4252
 
4039
4253
  class LoginUriApi extends BaseResponse {
4040
4254
  constructor(data = null) {
@@ -4049,7 +4263,7 @@ class LoginUriApi extends BaseResponse {
4049
4263
  }
4050
4264
  }
4051
4265
 
4052
- ;// CONCATENATED MODULE: ../../libs/common/src/models/api/loginApi.ts
4266
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/api/login.api.ts
4053
4267
 
4054
4268
 
4055
4269
  class LoginApi extends BaseResponse {
@@ -4070,7 +4284,7 @@ class LoginApi extends BaseResponse {
4070
4284
  }
4071
4285
  }
4072
4286
 
4073
- ;// CONCATENATED MODULE: ../../libs/common/src/models/api/secureNoteApi.ts
4287
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/api/secure-note.api.ts
4074
4288
 
4075
4289
  class SecureNoteApi extends BaseResponse {
4076
4290
  constructor(data = null) {
@@ -4082,11 +4296,11 @@ class SecureNoteApi extends BaseResponse {
4082
4296
  }
4083
4297
  }
4084
4298
 
4085
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/attachmentRequest.ts
4299
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/attachment.request.ts
4086
4300
  class AttachmentRequest {
4087
4301
  }
4088
4302
 
4089
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/cipherRequest.ts
4303
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/cipher.request.ts
4090
4304
 
4091
4305
 
4092
4306
 
@@ -4224,7 +4438,7 @@ class CipherRequest {
4224
4438
  }
4225
4439
  }
4226
4440
 
4227
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/cipherWithIdRequest.ts
4441
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/cipher-with-id.request.ts
4228
4442
 
4229
4443
  class CipherWithIdRequest extends CipherRequest {
4230
4444
  constructor(cipher) {
@@ -4233,7 +4447,7 @@ class CipherWithIdRequest extends CipherRequest {
4233
4447
  }
4234
4448
  }
4235
4449
 
4236
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/cipherBulkShareRequest.ts
4450
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/cipher-bulk-share.request.ts
4237
4451
 
4238
4452
  class CipherBulkShareRequest {
4239
4453
  constructor(ciphers, collectionIds) {
@@ -4247,14 +4461,14 @@ class CipherBulkShareRequest {
4247
4461
  }
4248
4462
  }
4249
4463
 
4250
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/cipherCollectionsRequest.ts
4464
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/cipher-collections.request.ts
4251
4465
  class CipherCollectionsRequest {
4252
4466
  constructor(collectionIds) {
4253
4467
  this.collectionIds = collectionIds == null ? [] : collectionIds;
4254
4468
  }
4255
4469
  }
4256
4470
 
4257
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/cipherCreateRequest.ts
4471
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/cipher-create.request.ts
4258
4472
 
4259
4473
  class CipherCreateRequest {
4260
4474
  constructor(cipher) {
@@ -4263,7 +4477,15 @@ class CipherCreateRequest {
4263
4477
  }
4264
4478
  }
4265
4479
 
4266
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/cipherShareRequest.ts
4480
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/cipher-partial.request.ts
4481
+ class CipherPartialRequest {
4482
+ constructor(cipher) {
4483
+ this.folderId = cipher.folderId;
4484
+ this.favorite = cipher.favorite;
4485
+ }
4486
+ }
4487
+
4488
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/cipher-share.request.ts
4267
4489
 
4268
4490
  class CipherShareRequest {
4269
4491
  constructor(cipher) {
@@ -4317,13 +4539,14 @@ var cipher_service_awaiter = (undefined && undefined.__awaiter) || function (thi
4317
4539
 
4318
4540
 
4319
4541
 
4542
+
4320
4543
 
4321
4544
 
4322
4545
  const DomainMatchBlacklist = new Map([
4323
4546
  ["google.com", new Set(["script.google.com"])],
4324
4547
  ]);
4325
4548
  class CipherService {
4326
- constructor(cryptoService, settingsService, apiService, fileUploadService, i18nService, searchService, logService, stateService) {
4549
+ constructor(cryptoService, settingsService, apiService, fileUploadService, i18nService, searchService, logService, stateService, encryptService) {
4327
4550
  this.cryptoService = cryptoService;
4328
4551
  this.settingsService = settingsService;
4329
4552
  this.apiService = apiService;
@@ -4332,6 +4555,7 @@ class CipherService {
4332
4555
  this.searchService = searchService;
4333
4556
  this.logService = logService;
4334
4557
  this.stateService = stateService;
4558
+ this.encryptService = encryptService;
4335
4559
  this.sortedCiphersCache = new SortedCiphersCache(this.sortCiphersByLastUsed);
4336
4560
  }
4337
4561
  getDecryptedCipherCache() {
@@ -4418,6 +4642,7 @@ class CipherService {
4418
4642
  cipher.collectionIds = model.collectionIds;
4419
4643
  cipher.revisionDate = model.revisionDate;
4420
4644
  cipher.reprompt = model.reprompt;
4645
+ cipher.edit = model.edit;
4421
4646
  if (key == null && cipher.organizationId != null) {
4422
4647
  key = yield this.cryptoService.getOrgKey(cipher.organizationId);
4423
4648
  if (key == null) {
@@ -4552,32 +4777,43 @@ class CipherService {
4552
4777
  });
4553
4778
  }
4554
4779
  getAllDecrypted() {
4555
- var _a;
4556
4780
  return cipher_service_awaiter(this, void 0, void 0, function* () {
4557
- const userId = yield this.stateService.getUserId();
4558
4781
  if ((yield this.getDecryptedCipherCache()) != null) {
4559
- if (this.searchService != null &&
4560
- ((_a = this.searchService().indexedEntityId) !== null && _a !== void 0 ? _a : userId) !== userId) {
4561
- yield this.searchService().indexCiphers(userId, yield this.getDecryptedCipherCache());
4562
- }
4782
+ yield this.reindexCiphers();
4563
4783
  return yield this.getDecryptedCipherCache();
4564
4784
  }
4565
- const decCiphers = [];
4566
4785
  const hasKey = yield this.cryptoService.hasKey();
4567
4786
  if (!hasKey) {
4568
4787
  throw new Error("No key.");
4569
4788
  }
4570
- const promises = [];
4571
4789
  const ciphers = yield this.getAll();
4572
- ciphers.forEach((cipher) => cipher_service_awaiter(this, void 0, void 0, function* () {
4573
- promises.push(cipher.decrypt().then((c) => decCiphers.push(c)));
4574
- }));
4575
- yield Promise.all(promises);
4576
- decCiphers.sort(this.getLocaleSortingFunction());
4790
+ const orgKeys = yield this.cryptoService.getOrgKeys();
4791
+ const userKey = yield this.cryptoService.getKeyForUserEncryption();
4792
+ // Group ciphers by orgId or under 'null' for the user's ciphers
4793
+ const grouped = ciphers.reduce((agg, c) => {
4794
+ var _a;
4795
+ var _b;
4796
+ (_a = agg[_b = c.organizationId]) !== null && _a !== void 0 ? _a : (agg[_b] = []);
4797
+ agg[c.organizationId].push(c);
4798
+ return agg;
4799
+ }, {});
4800
+ const decCiphers = (yield Promise.all(Object.entries(grouped).map(([orgId, groupedCiphers]) => { var _a; return this.encryptService.decryptItems(groupedCiphers, (_a = orgKeys.get(orgId)) !== null && _a !== void 0 ? _a : userKey); })))
4801
+ .flat()
4802
+ .sort(this.getLocaleSortingFunction());
4577
4803
  yield this.setDecryptedCipherCache(decCiphers);
4578
4804
  return decCiphers;
4579
4805
  });
4580
4806
  }
4807
+ reindexCiphers() {
4808
+ var _a;
4809
+ return cipher_service_awaiter(this, void 0, void 0, function* () {
4810
+ const userId = yield this.stateService.getUserId();
4811
+ const reindexRequired = this.searchService != null && ((_a = this.searchService().indexedEntityId) !== null && _a !== void 0 ? _a : userId) !== userId;
4812
+ if (reindexRequired) {
4813
+ yield this.searchService().indexCiphers(userId, yield this.getDecryptedCipherCache());
4814
+ }
4815
+ });
4816
+ }
4581
4817
  getAllDecryptedForGrouping(groupingId, folder = true) {
4582
4818
  return cipher_service_awaiter(this, void 0, void 0, function* () {
4583
4819
  const ciphers = yield this.getAllDecrypted();
@@ -4695,22 +4931,15 @@ class CipherService {
4695
4931
  }
4696
4932
  getAllFromApiForOrganization(organizationId) {
4697
4933
  return cipher_service_awaiter(this, void 0, void 0, function* () {
4698
- const ciphers = yield this.apiService.getCiphersOrganization(organizationId);
4699
- if (ciphers != null && ciphers.data != null && ciphers.data.length) {
4700
- const decCiphers = [];
4701
- const promises = [];
4702
- ciphers.data.forEach((r) => {
4703
- const data = new CipherData(r);
4704
- const cipher = new Cipher(data);
4705
- promises.push(cipher.decrypt().then((c) => decCiphers.push(c)));
4706
- });
4707
- yield Promise.all(promises);
4708
- decCiphers.sort(this.getLocaleSortingFunction());
4709
- return decCiphers;
4710
- }
4711
- else {
4934
+ const response = yield this.apiService.getCiphersOrganization(organizationId);
4935
+ if ((response === null || response === void 0 ? void 0 : response.data) == null || response.data.length < 1) {
4712
4936
  return [];
4713
4937
  }
4938
+ const ciphers = response.data.map((cr) => new Cipher(new CipherData(cr)));
4939
+ const key = yield this.cryptoService.getOrgKey(organizationId);
4940
+ const decCiphers = yield this.encryptService.decryptItems(ciphers, key);
4941
+ decCiphers.sort(this.getLocaleSortingFunction());
4942
+ return decCiphers;
4714
4943
  });
4715
4944
  }
4716
4945
  getLastUsedForUrl(url, autofillOnPageLoad = false) {
@@ -4802,24 +5031,33 @@ class CipherService {
4802
5031
  yield this.stateService.setNeverDomains(domains);
4803
5032
  });
4804
5033
  }
4805
- saveWithServer(cipher) {
5034
+ createWithServer(cipher) {
4806
5035
  return cipher_service_awaiter(this, void 0, void 0, function* () {
4807
5036
  let response;
4808
- if (cipher.id == null) {
4809
- if (cipher.collectionIds != null) {
4810
- const request = new CipherCreateRequest(cipher);
4811
- response = yield this.apiService.postCipherCreate(request);
4812
- }
4813
- else {
4814
- const request = new CipherRequest(cipher);
4815
- response = yield this.apiService.postCipher(request);
4816
- }
4817
- cipher.id = response.id;
5037
+ if (cipher.collectionIds != null) {
5038
+ const request = new CipherCreateRequest(cipher);
5039
+ response = yield this.apiService.postCipherCreate(request);
4818
5040
  }
4819
5041
  else {
5042
+ const request = new CipherRequest(cipher);
5043
+ response = yield this.apiService.postCipher(request);
5044
+ }
5045
+ cipher.id = response.id;
5046
+ const data = new CipherData(response, cipher.collectionIds);
5047
+ yield this.upsert(data);
5048
+ });
5049
+ }
5050
+ updateWithServer(cipher) {
5051
+ return cipher_service_awaiter(this, void 0, void 0, function* () {
5052
+ let response;
5053
+ if (cipher.edit) {
4820
5054
  const request = new CipherRequest(cipher);
4821
5055
  response = yield this.apiService.putCipher(cipher.id, request);
4822
5056
  }
5057
+ else {
5058
+ const request = new CipherPartialRequest(cipher);
5059
+ response = yield this.apiService.putPartialCipher(cipher.id, request);
5060
+ }
4823
5061
  const data = new CipherData(response, cipher.collectionIds);
4824
5062
  yield this.upsert(data);
4825
5063
  });
@@ -5391,7 +5629,7 @@ cipher_service_decorate([
5391
5629
  cipher_service_metadata("design:returntype", Promise)
5392
5630
  ], CipherService.prototype, "getAllDecrypted", null);
5393
5631
 
5394
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/treeNode.ts
5632
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/tree-node.ts
5395
5633
  class TreeNode {
5396
5634
  constructor(node, name, parent) {
5397
5635
  this.children = [];
@@ -5447,7 +5685,7 @@ class ServiceUtils {
5447
5685
  }
5448
5686
  }
5449
5687
 
5450
- ;// CONCATENATED MODULE: ../../libs/common/src/models/data/collectionData.ts
5688
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/data/collection.data.ts
5451
5689
  class CollectionData {
5452
5690
  constructor(response) {
5453
5691
  this.id = response.id;
@@ -5458,7 +5696,7 @@ class CollectionData {
5458
5696
  }
5459
5697
  }
5460
5698
 
5461
- ;// CONCATENATED MODULE: ../../libs/common/src/models/view/collectionView.ts
5699
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/view/collection.view.ts
5462
5700
 
5463
5701
  class CollectionView {
5464
5702
  constructor(c) {
@@ -5718,7 +5956,7 @@ const SEND_KDF_ITERATIONS = 100000;
5718
5956
 
5719
5957
  ;// CONCATENATED MODULE: ../../libs/common/src/misc/wordlist.ts
5720
5958
  // EFF's Long Wordlist from https://www.eff.org/dice
5721
- const EEFLongWordList = [
5959
+ const EFFLongWordList = [
5722
5960
  "abacus",
5723
5961
  "abdomen",
5724
5962
  "abdominal",
@@ -13497,8 +13735,8 @@ const EEFLongWordList = [
13497
13735
  "zoom",
13498
13736
  ];
13499
13737
 
13500
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/encryptedOrganizationKey.ts
13501
- var encryptedOrganizationKey_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
13738
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/encrypted-organization-key.ts
13739
+ var encrypted_organization_key_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
13502
13740
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13503
13741
  return new (P || (P = Promise))(function (resolve, reject) {
13504
13742
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -13526,7 +13764,7 @@ class EncryptedOrganizationKey {
13526
13764
  this.key = key;
13527
13765
  }
13528
13766
  decrypt(cryptoService) {
13529
- return encryptedOrganizationKey_awaiter(this, void 0, void 0, function* () {
13767
+ return encrypted_organization_key_awaiter(this, void 0, void 0, function* () {
13530
13768
  const decValue = yield cryptoService.rsaDecrypt(this.key);
13531
13769
  return new SymmetricCryptoKey(decValue);
13532
13770
  });
@@ -13544,7 +13782,7 @@ class ProviderEncryptedOrganizationKey {
13544
13782
  this.providerId = providerId;
13545
13783
  }
13546
13784
  decrypt(cryptoService) {
13547
- return encryptedOrganizationKey_awaiter(this, void 0, void 0, function* () {
13785
+ return encrypted_organization_key_awaiter(this, void 0, void 0, function* () {
13548
13786
  const providerKey = yield cryptoService.getProviderKey(this.providerId);
13549
13787
  const decValue = yield cryptoService.decryptToBytes(new EncString(this.key), providerKey);
13550
13788
  return new SymmetricCryptoKey(decValue);
@@ -14252,7 +14490,7 @@ class CryptoService {
14252
14490
  }
14253
14491
  hashPhrase(hash, minimumEntropy = 64) {
14254
14492
  return crypto_service_awaiter(this, void 0, void 0, function* () {
14255
- const entropyPerWord = Math.log(EEFLongWordList.length) / Math.log(2);
14493
+ const entropyPerWord = Math.log(EFFLongWordList.length) / Math.log(2);
14256
14494
  let numWords = Math.ceil(minimumEntropy / entropyPerWord);
14257
14495
  const hashArr = Array.from(new Uint8Array(hash));
14258
14496
  const entropyAvailable = hashArr.length * 4;
@@ -14262,9 +14500,9 @@ class CryptoService {
14262
14500
  const phrase = [];
14263
14501
  let hashNumber = external_big_integer_namespaceObject.fromArray(hashArr, 256);
14264
14502
  while (numWords--) {
14265
- const remainder = hashNumber.mod(EEFLongWordList.length);
14266
- hashNumber = hashNumber.divide(EEFLongWordList.length);
14267
- phrase.push(EEFLongWordList[remainder]);
14503
+ const remainder = hashNumber.mod(EFFLongWordList.length);
14504
+ hashNumber = hashNumber.divide(EFFLongWordList.length);
14505
+ phrase.push(EFFLongWordList[remainder]);
14268
14506
  }
14269
14507
  return phrase;
14270
14508
  });
@@ -14347,12 +14585,12 @@ crypto_service_decorate([
14347
14585
  crypto_service_metadata("design:returntype", Promise)
14348
14586
  ], CryptoService.prototype, "getProviderKeys", null);
14349
14587
 
14350
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/encryptedObject.ts
14588
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/encrypted-object.ts
14351
14589
  class EncryptedObject {
14352
14590
  }
14353
14591
 
14354
- ;// CONCATENATED MODULE: ../../libs/common/src/services/encrypt.service.ts
14355
- var encrypt_service_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
14592
+ ;// CONCATENATED MODULE: ../../libs/common/src/services/cryptography/encrypt.service.implementation.ts
14593
+ var encrypt_service_implementation_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
14356
14594
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14357
14595
  return new (P || (P = Promise))(function (resolve, reject) {
14358
14596
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -14367,14 +14605,14 @@ var encrypt_service_awaiter = (undefined && undefined.__awaiter) || function (th
14367
14605
 
14368
14606
 
14369
14607
 
14370
- class EncryptService {
14608
+ class EncryptServiceImplementation {
14371
14609
  constructor(cryptoFunctionService, logService, logMacFailures) {
14372
14610
  this.cryptoFunctionService = cryptoFunctionService;
14373
14611
  this.logService = logService;
14374
14612
  this.logMacFailures = logMacFailures;
14375
14613
  }
14376
14614
  encrypt(plainValue, key) {
14377
- return encrypt_service_awaiter(this, void 0, void 0, function* () {
14615
+ return encrypt_service_implementation_awaiter(this, void 0, void 0, function* () {
14378
14616
  if (key == null) {
14379
14617
  throw new Error("No encryption key provided.");
14380
14618
  }
@@ -14396,7 +14634,7 @@ class EncryptService {
14396
14634
  });
14397
14635
  }
14398
14636
  encryptToBytes(plainValue, key) {
14399
- return encrypt_service_awaiter(this, void 0, void 0, function* () {
14637
+ return encrypt_service_implementation_awaiter(this, void 0, void 0, function* () {
14400
14638
  if (key == null) {
14401
14639
  throw new Error("No encryption key provided.");
14402
14640
  }
@@ -14416,7 +14654,7 @@ class EncryptService {
14416
14654
  });
14417
14655
  }
14418
14656
  decryptToUtf8(encString, key) {
14419
- return encrypt_service_awaiter(this, void 0, void 0, function* () {
14657
+ return encrypt_service_implementation_awaiter(this, void 0, void 0, function* () {
14420
14658
  if (key == null) {
14421
14659
  throw new Error("No key provided for decryption.");
14422
14660
  }
@@ -14442,7 +14680,7 @@ class EncryptService {
14442
14680
  });
14443
14681
  }
14444
14682
  decryptToBytes(encThing, key) {
14445
- return encrypt_service_awaiter(this, void 0, void 0, function* () {
14683
+ return encrypt_service_implementation_awaiter(this, void 0, void 0, function* () {
14446
14684
  if (key == null) {
14447
14685
  throw new Error("No encryption key provided.");
14448
14686
  }
@@ -14474,8 +14712,16 @@ class EncryptService {
14474
14712
  return result !== null && result !== void 0 ? result : null;
14475
14713
  });
14476
14714
  }
14715
+ decryptItems(items, key) {
14716
+ return encrypt_service_implementation_awaiter(this, void 0, void 0, function* () {
14717
+ if (items == null || items.length < 1) {
14718
+ return [];
14719
+ }
14720
+ return yield Promise.all(items.map((item) => item.decrypt(key)));
14721
+ });
14722
+ }
14477
14723
  aesEncrypt(data, key) {
14478
- return encrypt_service_awaiter(this, void 0, void 0, function* () {
14724
+ return encrypt_service_implementation_awaiter(this, void 0, void 0, function* () {
14479
14725
  const obj = new EncryptedObject();
14480
14726
  obj.key = key;
14481
14727
  obj.iv = yield this.cryptoFunctionService.randomBytes(16);
@@ -14686,7 +14932,7 @@ class EnvironmentService {
14686
14932
 
14687
14933
  ;// CONCATENATED MODULE: external "papaparse"
14688
14934
  const external_papaparse_namespaceObject = require("papaparse");
14689
- ;// CONCATENATED MODULE: ../../libs/common/src/models/export/cardExport.ts
14935
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/export/card.export.ts
14690
14936
 
14691
14937
 
14692
14938
 
@@ -14743,7 +14989,7 @@ class CardExport {
14743
14989
  }
14744
14990
  }
14745
14991
 
14746
- ;// CONCATENATED MODULE: ../../libs/common/src/models/export/fieldExport.ts
14992
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/export/field.export.ts
14747
14993
 
14748
14994
 
14749
14995
 
@@ -14788,7 +15034,7 @@ class FieldExport {
14788
15034
  }
14789
15035
  }
14790
15036
 
14791
- ;// CONCATENATED MODULE: ../../libs/common/src/models/export/identityExport.ts
15037
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/export/identity.export.ts
14792
15038
 
14793
15039
 
14794
15040
 
@@ -14905,7 +15151,7 @@ class IdentityExport {
14905
15151
  }
14906
15152
  }
14907
15153
 
14908
- ;// CONCATENATED MODULE: ../../libs/common/src/models/export/loginUriExport.ts
15154
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/export/login-uri.export.ts
14909
15155
 
14910
15156
 
14911
15157
 
@@ -14942,7 +15188,7 @@ class LoginUriExport {
14942
15188
  }
14943
15189
  }
14944
15190
 
14945
- ;// CONCATENATED MODULE: ../../libs/common/src/models/export/loginExport.ts
15191
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/export/login.export.ts
14946
15192
 
14947
15193
 
14948
15194
 
@@ -15006,7 +15252,7 @@ var SecureNoteType;
15006
15252
  SecureNoteType[SecureNoteType["Generic"] = 0] = "Generic";
15007
15253
  })(SecureNoteType || (SecureNoteType = {}));
15008
15254
 
15009
- ;// CONCATENATED MODULE: ../../libs/common/src/models/export/secureNoteExport.ts
15255
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/export/secure-note.export.ts
15010
15256
 
15011
15257
 
15012
15258
 
@@ -15032,7 +15278,7 @@ class SecureNoteExport {
15032
15278
  }
15033
15279
  }
15034
15280
 
15035
- ;// CONCATENATED MODULE: ../../libs/common/src/models/export/cipherExport.ts
15281
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/export/cipher.export.ts
15036
15282
 
15037
15283
 
15038
15284
 
@@ -15166,7 +15412,7 @@ class CipherExport {
15166
15412
  }
15167
15413
  }
15168
15414
 
15169
- ;// CONCATENATED MODULE: ../../libs/common/src/models/export/cipherWithIdsExport.ts
15415
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/export/cipher-with-ids.export.ts
15170
15416
 
15171
15417
  class CipherWithIdExport extends CipherExport {
15172
15418
  // Use build method instead of ctor so that we can control order of JSON stringify for pretty print
@@ -15177,7 +15423,7 @@ class CipherWithIdExport extends CipherExport {
15177
15423
  }
15178
15424
  }
15179
15425
 
15180
- ;// CONCATENATED MODULE: ../../libs/common/src/models/export/collectionExport.ts
15426
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/export/collection.export.ts
15181
15427
 
15182
15428
 
15183
15429
 
@@ -15219,7 +15465,7 @@ class CollectionExport {
15219
15465
  }
15220
15466
  }
15221
15467
 
15222
- ;// CONCATENATED MODULE: ../../libs/common/src/models/export/collectionWithIdExport.ts
15468
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/export/collection-with-id.export.ts
15223
15469
 
15224
15470
  class CollectionWithIdExport extends CollectionExport {
15225
15471
  // Use build method instead of ctor so that we can control order of JSON stringify for pretty print
@@ -15299,7 +15545,7 @@ var EventType;
15299
15545
  EventType[EventType["ProviderOrganization_VaultAccessed"] = 1903] = "ProviderOrganization_VaultAccessed";
15300
15546
  })(EventType || (EventType = {}));
15301
15547
 
15302
- ;// CONCATENATED MODULE: ../../libs/common/src/models/export/eventExport.ts
15548
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/export/event.export.ts
15303
15549
 
15304
15550
  class EventExport {
15305
15551
  constructor(event) {
@@ -15316,7 +15562,7 @@ class EventExport {
15316
15562
  }
15317
15563
  }
15318
15564
 
15319
- ;// CONCATENATED MODULE: ../../libs/common/src/models/view/folderView.ts
15565
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/view/folder.view.ts
15320
15566
  class FolderView {
15321
15567
  constructor(f) {
15322
15568
  this.id = null;
@@ -15361,7 +15607,7 @@ class Folder extends Domain {
15361
15607
  }
15362
15608
  }
15363
15609
 
15364
- ;// CONCATENATED MODULE: ../../libs/common/src/models/export/folderExport.ts
15610
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/export/folder.export.ts
15365
15611
 
15366
15612
 
15367
15613
 
@@ -15391,7 +15637,7 @@ class FolderExport {
15391
15637
  }
15392
15638
  }
15393
15639
 
15394
- ;// CONCATENATED MODULE: ../../libs/common/src/models/export/folderWithIdExport.ts
15640
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/export/folder-with-id.export.ts
15395
15641
 
15396
15642
  class FolderWithIdExport extends FolderExport {
15397
15643
  // Use build method instead of ctor so that we can control order of JSON stringify for pretty print
@@ -16097,7 +16343,7 @@ class FileUploadService {
16097
16343
  }
16098
16344
  }
16099
16345
 
16100
- ;// CONCATENATED MODULE: ../../libs/common/src/models/data/folderData.ts
16346
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/data/folder.data.ts
16101
16347
  class FolderData {
16102
16348
  constructor(response) {
16103
16349
  this.name = response.name;
@@ -16106,14 +16352,14 @@ class FolderData {
16106
16352
  }
16107
16353
  }
16108
16354
 
16109
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/folderRequest.ts
16355
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/folder.request.ts
16110
16356
  class FolderRequest {
16111
16357
  constructor(folder) {
16112
16358
  this.name = folder.name ? folder.name.encryptedString : null;
16113
16359
  }
16114
16360
  }
16115
16361
 
16116
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/folderResponse.ts
16362
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/folder.response.ts
16117
16363
 
16118
16364
  class FolderResponse extends BaseResponse {
16119
16365
  constructor(response) {
@@ -16413,7 +16659,7 @@ const regularImportOptions = [
16413
16659
  { id: "nordpasscsv", name: "Nordpass (csv)" },
16414
16660
  ];
16415
16661
 
16416
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/importResult.ts
16662
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/import-result.ts
16417
16663
  class ImportResult {
16418
16664
  constructor() {
16419
16665
  this.success = false;
@@ -17510,10 +17756,14 @@ class ButtercupCsvImporter extends BaseImporter {
17510
17756
  }
17511
17757
  }
17512
17758
 
17513
- ;// CONCATENATED MODULE: ../../libs/common/src/importers/chromeCsvImporter.ts
17759
+ ;// CONCATENATED MODULE: ../../libs/common/src/importers/chrome-csv-importer.ts
17514
17760
 
17515
17761
 
17516
17762
  class ChromeCsvImporter extends BaseImporter {
17763
+ constructor() {
17764
+ super(...arguments);
17765
+ this.androidPatternRegex = new RegExp("^android:\\/\\/.*(?<=@)(.*)(?=\\/)");
17766
+ }
17517
17767
  parse(data) {
17518
17768
  const result = new ImportResult();
17519
17769
  const results = this.parseCsv(data, true);
@@ -17523,7 +17773,11 @@ class ChromeCsvImporter extends BaseImporter {
17523
17773
  }
17524
17774
  results.forEach((value) => {
17525
17775
  const cipher = this.initLoginCipher();
17526
- cipher.name = this.getValueOrDefault(value.name, "--");
17776
+ let name = value.name;
17777
+ if (!name && this.androidPatternRegex.test(value.url)) {
17778
+ name = value.url.match(this.androidPatternRegex)[1];
17779
+ }
17780
+ cipher.name = this.getValueOrDefault(name, "--");
17527
17781
  cipher.login.username = this.getValueOrDefault(value.username);
17528
17782
  cipher.login.password = this.getValueOrDefault(value.password);
17529
17783
  cipher.login.uris = this.makeUriArray(value.url);
@@ -21854,7 +22108,7 @@ class ZohoVaultCsvImporter extends BaseImporter {
21854
22108
  }
21855
22109
  }
21856
22110
 
21857
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/collectionRequest.ts
22111
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/collection.request.ts
21858
22112
  class CollectionRequest {
21859
22113
  constructor(collection) {
21860
22114
  this.groups = [];
@@ -21866,7 +22120,7 @@ class CollectionRequest {
21866
22120
  }
21867
22121
  }
21868
22122
 
21869
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/importCiphersRequest.ts
22123
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/import-ciphers.request.ts
21870
22124
  class ImportCiphersRequest {
21871
22125
  constructor() {
21872
22126
  this.ciphers = [];
@@ -21875,7 +22129,7 @@ class ImportCiphersRequest {
21875
22129
  }
21876
22130
  }
21877
22131
 
21878
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/importOrganizationCiphersRequest.ts
22132
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/import-organization-ciphers.request.ts
21879
22133
  class ImportOrganizationCiphersRequest {
21880
22134
  constructor() {
21881
22135
  this.ciphers = [];
@@ -21884,7 +22138,7 @@ class ImportOrganizationCiphersRequest {
21884
22138
  }
21885
22139
  }
21886
22140
 
21887
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/kvpRequest.ts
22141
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/kvp.request.ts
21888
22142
  class KvpRequest {
21889
22143
  constructor(key, value) {
21890
22144
  this.key = key;
@@ -22245,7 +22499,7 @@ var OrganizationUserType;
22245
22499
  OrganizationUserType[OrganizationUserType["Custom"] = 4] = "Custom";
22246
22500
  })(OrganizationUserType || (OrganizationUserType = {}));
22247
22501
 
22248
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/account/setKeyConnectorKeyRequest.ts
22502
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/account/set-key-connector-key.request.ts
22249
22503
  class SetKeyConnectorKeyRequest {
22250
22504
  constructor(key, kdf, kdfIterations, orgIdentifier, keys) {
22251
22505
  this.key = key;
@@ -22256,7 +22510,7 @@ class SetKeyConnectorKeyRequest {
22256
22510
  }
22257
22511
  }
22258
22512
 
22259
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/keyConnectorUserKeyRequest.ts
22513
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/key-connector-user-key.request.ts
22260
22514
  class KeyConnectorUserKeyRequest {
22261
22515
  constructor(key) {
22262
22516
  this.key = key;
@@ -22446,215 +22700,7 @@ class NoopMessagingService {
22446
22700
  }
22447
22701
  }
22448
22702
 
22449
- ;// CONCATENATED MODULE: ../../libs/common/src/enums/organizationUserStatusType.ts
22450
- var OrganizationUserStatusType;
22451
- (function (OrganizationUserStatusType) {
22452
- OrganizationUserStatusType[OrganizationUserStatusType["Invited"] = 0] = "Invited";
22453
- OrganizationUserStatusType[OrganizationUserStatusType["Accepted"] = 1] = "Accepted";
22454
- OrganizationUserStatusType[OrganizationUserStatusType["Confirmed"] = 2] = "Confirmed";
22455
- OrganizationUserStatusType[OrganizationUserStatusType["Revoked"] = -1] = "Revoked";
22456
- })(OrganizationUserStatusType || (OrganizationUserStatusType = {}));
22457
-
22458
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/organization.ts
22459
-
22460
-
22461
- class Organization {
22462
- constructor(obj) {
22463
- if (obj == null) {
22464
- return;
22465
- }
22466
- this.id = obj.id;
22467
- this.name = obj.name;
22468
- this.status = obj.status;
22469
- this.type = obj.type;
22470
- this.enabled = obj.enabled;
22471
- this.usePolicies = obj.usePolicies;
22472
- this.useGroups = obj.useGroups;
22473
- this.useDirectory = obj.useDirectory;
22474
- this.useEvents = obj.useEvents;
22475
- this.useTotp = obj.useTotp;
22476
- this.use2fa = obj.use2fa;
22477
- this.useApi = obj.useApi;
22478
- this.useSso = obj.useSso;
22479
- this.useKeyConnector = obj.useKeyConnector;
22480
- this.useScim = obj.useScim;
22481
- this.useResetPassword = obj.useResetPassword;
22482
- this.selfHost = obj.selfHost;
22483
- this.usersGetPremium = obj.usersGetPremium;
22484
- this.seats = obj.seats;
22485
- this.maxCollections = obj.maxCollections;
22486
- this.maxStorageGb = obj.maxStorageGb;
22487
- this.ssoBound = obj.ssoBound;
22488
- this.identifier = obj.identifier;
22489
- this.permissions = obj.permissions;
22490
- this.resetPasswordEnrolled = obj.resetPasswordEnrolled;
22491
- this.userId = obj.userId;
22492
- this.hasPublicAndPrivateKeys = obj.hasPublicAndPrivateKeys;
22493
- this.providerId = obj.providerId;
22494
- this.providerName = obj.providerName;
22495
- this.isProviderUser = obj.isProviderUser;
22496
- this.familySponsorshipFriendlyName = obj.familySponsorshipFriendlyName;
22497
- this.familySponsorshipAvailable = obj.familySponsorshipAvailable;
22498
- this.planProductType = obj.planProductType;
22499
- this.keyConnectorEnabled = obj.keyConnectorEnabled;
22500
- this.keyConnectorUrl = obj.keyConnectorUrl;
22501
- this.familySponsorshipLastSyncDate = obj.familySponsorshipLastSyncDate;
22502
- this.familySponsorshipValidUntil = obj.familySponsorshipValidUntil;
22503
- this.familySponsorshipToDelete = obj.familySponsorshipToDelete;
22504
- }
22505
- get canAccess() {
22506
- if (this.type === OrganizationUserType.Owner) {
22507
- return true;
22508
- }
22509
- return this.enabled && this.status === OrganizationUserStatusType.Confirmed;
22510
- }
22511
- get isManager() {
22512
- return (this.type === OrganizationUserType.Manager ||
22513
- this.type === OrganizationUserType.Owner ||
22514
- this.type === OrganizationUserType.Admin);
22515
- }
22516
- get isAdmin() {
22517
- return this.type === OrganizationUserType.Owner || this.type === OrganizationUserType.Admin;
22518
- }
22519
- get isOwner() {
22520
- return this.type === OrganizationUserType.Owner || this.isProviderUser;
22521
- }
22522
- get canAccessEventLogs() {
22523
- return (this.isAdmin || this.permissions.accessEventLogs) && this.useEvents;
22524
- }
22525
- get canAccessImportExport() {
22526
- return this.isAdmin || this.permissions.accessImportExport;
22527
- }
22528
- get canAccessReports() {
22529
- return this.isAdmin || this.permissions.accessReports;
22530
- }
22531
- get canCreateNewCollections() {
22532
- var _a;
22533
- return (this.isManager ||
22534
- ((_a = this.permissions.createNewCollections) !== null && _a !== void 0 ? _a : this.permissions.manageAllCollections));
22535
- }
22536
- get canEditAnyCollection() {
22537
- var _a;
22538
- return (this.isAdmin || ((_a = this.permissions.editAnyCollection) !== null && _a !== void 0 ? _a : this.permissions.manageAllCollections));
22539
- }
22540
- get canDeleteAnyCollection() {
22541
- var _a;
22542
- return (this.isAdmin ||
22543
- ((_a = this.permissions.deleteAnyCollection) !== null && _a !== void 0 ? _a : this.permissions.manageAllCollections));
22544
- }
22545
- get canViewAllCollections() {
22546
- return this.canCreateNewCollections || this.canEditAnyCollection || this.canDeleteAnyCollection;
22547
- }
22548
- get canEditAssignedCollections() {
22549
- var _a;
22550
- return (this.isManager ||
22551
- ((_a = this.permissions.editAssignedCollections) !== null && _a !== void 0 ? _a : this.permissions.manageAssignedCollections));
22552
- }
22553
- get canDeleteAssignedCollections() {
22554
- var _a;
22555
- return (this.isManager ||
22556
- ((_a = this.permissions.deleteAssignedCollections) !== null && _a !== void 0 ? _a : this.permissions.manageAssignedCollections));
22557
- }
22558
- get canViewAssignedCollections() {
22559
- return this.canDeleteAssignedCollections || this.canEditAssignedCollections;
22560
- }
22561
- get canManageGroups() {
22562
- return (this.isAdmin || this.permissions.manageGroups) && this.useGroups;
22563
- }
22564
- get canManageSso() {
22565
- return (this.isAdmin || this.permissions.manageSso) && this.useSso;
22566
- }
22567
- get canManageScim() {
22568
- return (this.isAdmin || this.permissions.manageScim) && this.useScim;
22569
- }
22570
- get canManagePolicies() {
22571
- return (this.isAdmin || this.permissions.managePolicies) && this.usePolicies;
22572
- }
22573
- get canManageUsers() {
22574
- return this.isAdmin || this.permissions.manageUsers;
22575
- }
22576
- get canManageUsersPassword() {
22577
- return this.isAdmin || this.permissions.manageResetPassword;
22578
- }
22579
- get isExemptFromPolicies() {
22580
- return this.canManagePolicies;
22581
- }
22582
- get canManageBilling() {
22583
- return this.isOwner && (this.isProviderUser || !this.hasProvider);
22584
- }
22585
- get hasProvider() {
22586
- return this.providerId != null || this.providerName != null;
22587
- }
22588
- }
22589
-
22590
- ;// CONCATENATED MODULE: ../../libs/common/src/services/organization.service.ts
22591
- var organization_service_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
22592
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
22593
- return new (P || (P = Promise))(function (resolve, reject) {
22594
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
22595
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22596
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22597
- step((generator = generator.apply(thisArg, _arguments || [])).next());
22598
- });
22599
- };
22600
-
22601
- class OrganizationService {
22602
- constructor(stateService) {
22603
- this.stateService = stateService;
22604
- }
22605
- get(id) {
22606
- return organization_service_awaiter(this, void 0, void 0, function* () {
22607
- const organizations = yield this.stateService.getOrganizations();
22608
- // eslint-disable-next-line
22609
- if (organizations == null || !organizations.hasOwnProperty(id)) {
22610
- return null;
22611
- }
22612
- return new Organization(organizations[id]);
22613
- });
22614
- }
22615
- getByIdentifier(identifier) {
22616
- return organization_service_awaiter(this, void 0, void 0, function* () {
22617
- const organizations = yield this.getAll();
22618
- if (organizations == null || organizations.length === 0) {
22619
- return null;
22620
- }
22621
- return organizations.find((o) => o.identifier === identifier);
22622
- });
22623
- }
22624
- getAll(userId) {
22625
- return organization_service_awaiter(this, void 0, void 0, function* () {
22626
- const organizations = yield this.stateService.getOrganizations({ userId: userId });
22627
- const response = [];
22628
- for (const id in organizations) {
22629
- // eslint-disable-next-line
22630
- if (organizations.hasOwnProperty(id) && !organizations[id].isProviderUser) {
22631
- response.push(new Organization(organizations[id]));
22632
- }
22633
- }
22634
- const sortedResponse = response.sort((a, b) => a.name.localeCompare(b.name));
22635
- return sortedResponse;
22636
- });
22637
- }
22638
- save(organizations) {
22639
- return organization_service_awaiter(this, void 0, void 0, function* () {
22640
- return yield this.stateService.setOrganizations(organizations);
22641
- });
22642
- }
22643
- canManageSponsorships() {
22644
- return organization_service_awaiter(this, void 0, void 0, function* () {
22645
- const orgs = yield this.getAll();
22646
- return orgs.some((o) => o.familySponsorshipAvailable || o.familySponsorshipFriendlyName !== null);
22647
- });
22648
- }
22649
- hasOrganizations(userId) {
22650
- return organization_service_awaiter(this, void 0, void 0, function* () {
22651
- const organizations = yield this.getAll(userId);
22652
- return organizations.length > 0;
22653
- });
22654
- }
22655
- }
22656
-
22657
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/apiKeyResponse.ts
22703
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/api-key.response.ts
22658
22704
 
22659
22705
  class ApiKeyResponse extends BaseResponse {
22660
22706
  constructor(response) {
@@ -22664,7 +22710,7 @@ class ApiKeyResponse extends BaseResponse {
22664
22710
  }
22665
22711
  }
22666
22712
 
22667
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/billingResponse.ts
22713
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/billing.response.ts
22668
22714
 
22669
22715
  class BillingResponse extends BaseResponse {
22670
22716
  constructor(response) {
@@ -22683,6 +22729,9 @@ class BillingResponse extends BaseResponse {
22683
22729
  this.invoices = invoices.map((i) => new BillingInvoiceResponse(i));
22684
22730
  }
22685
22731
  }
22732
+ get hasNoHistory() {
22733
+ return this.invoices.length == 0 && this.transactions.length == 0;
22734
+ }
22686
22735
  }
22687
22736
  class BillingSourceResponse extends BaseResponse {
22688
22737
  constructor(response) {
@@ -22718,7 +22767,7 @@ class BillingTransactionResponse extends BaseResponse {
22718
22767
  }
22719
22768
  }
22720
22769
 
22721
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/listResponse.ts
22770
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/list.response.ts
22722
22771
 
22723
22772
  class ListResponse extends BaseResponse {
22724
22773
  constructor(response, t) {
@@ -22729,148 +22778,7 @@ class ListResponse extends BaseResponse {
22729
22778
  }
22730
22779
  }
22731
22780
 
22732
- ;// CONCATENATED MODULE: ../../libs/common/src/enums/ssoEnums.ts
22733
- var SsoType;
22734
- (function (SsoType) {
22735
- SsoType[SsoType["None"] = 0] = "None";
22736
- SsoType[SsoType["OpenIdConnect"] = 1] = "OpenIdConnect";
22737
- SsoType[SsoType["Saml2"] = 2] = "Saml2";
22738
- })(SsoType || (SsoType = {}));
22739
- var OpenIdConnectRedirectBehavior;
22740
- (function (OpenIdConnectRedirectBehavior) {
22741
- OpenIdConnectRedirectBehavior[OpenIdConnectRedirectBehavior["RedirectGet"] = 0] = "RedirectGet";
22742
- OpenIdConnectRedirectBehavior[OpenIdConnectRedirectBehavior["FormPost"] = 1] = "FormPost";
22743
- })(OpenIdConnectRedirectBehavior || (OpenIdConnectRedirectBehavior = {}));
22744
- var Saml2BindingType;
22745
- (function (Saml2BindingType) {
22746
- Saml2BindingType[Saml2BindingType["HttpRedirect"] = 1] = "HttpRedirect";
22747
- Saml2BindingType[Saml2BindingType["HttpPost"] = 2] = "HttpPost";
22748
- })(Saml2BindingType || (Saml2BindingType = {}));
22749
- var Saml2NameIdFormat;
22750
- (function (Saml2NameIdFormat) {
22751
- Saml2NameIdFormat[Saml2NameIdFormat["NotConfigured"] = 0] = "NotConfigured";
22752
- Saml2NameIdFormat[Saml2NameIdFormat["Unspecified"] = 1] = "Unspecified";
22753
- Saml2NameIdFormat[Saml2NameIdFormat["EmailAddress"] = 2] = "EmailAddress";
22754
- Saml2NameIdFormat[Saml2NameIdFormat["X509SubjectName"] = 3] = "X509SubjectName";
22755
- Saml2NameIdFormat[Saml2NameIdFormat["WindowsDomainQualifiedName"] = 4] = "WindowsDomainQualifiedName";
22756
- Saml2NameIdFormat[Saml2NameIdFormat["KerberosPrincipalName"] = 5] = "KerberosPrincipalName";
22757
- Saml2NameIdFormat[Saml2NameIdFormat["EntityIdentifier"] = 6] = "EntityIdentifier";
22758
- Saml2NameIdFormat[Saml2NameIdFormat["Persistent"] = 7] = "Persistent";
22759
- Saml2NameIdFormat[Saml2NameIdFormat["Transient"] = 8] = "Transient";
22760
- })(Saml2NameIdFormat || (Saml2NameIdFormat = {}));
22761
- var Saml2SigningBehavior;
22762
- (function (Saml2SigningBehavior) {
22763
- Saml2SigningBehavior[Saml2SigningBehavior["IfIdpWantAuthnRequestsSigned"] = 0] = "IfIdpWantAuthnRequestsSigned";
22764
- Saml2SigningBehavior[Saml2SigningBehavior["Always"] = 1] = "Always";
22765
- Saml2SigningBehavior[Saml2SigningBehavior["Never"] = 3] = "Never";
22766
- })(Saml2SigningBehavior || (Saml2SigningBehavior = {}));
22767
-
22768
- ;// CONCATENATED MODULE: ../../libs/common/src/models/api/ssoConfigApi.ts
22769
-
22770
-
22771
- class SsoConfigApi extends BaseResponse {
22772
- constructor(data = null) {
22773
- super(data);
22774
- if (data == null) {
22775
- return;
22776
- }
22777
- this.configType = this.getResponseProperty("ConfigType");
22778
- this.keyConnectorEnabled = this.getResponseProperty("KeyConnectorEnabled");
22779
- this.keyConnectorUrl = this.getResponseProperty("KeyConnectorUrl");
22780
- this.authority = this.getResponseProperty("Authority");
22781
- this.clientId = this.getResponseProperty("ClientId");
22782
- this.clientSecret = this.getResponseProperty("ClientSecret");
22783
- this.metadataAddress = this.getResponseProperty("MetadataAddress");
22784
- this.redirectBehavior = this.getResponseProperty("RedirectBehavior");
22785
- this.getClaimsFromUserInfoEndpoint = this.getResponseProperty("GetClaimsFromUserInfoEndpoint");
22786
- this.additionalScopes = this.getResponseProperty("AdditionalScopes");
22787
- this.additionalUserIdClaimTypes = this.getResponseProperty("AdditionalUserIdClaimTypes");
22788
- this.additionalEmailClaimTypes = this.getResponseProperty("AdditionalEmailClaimTypes");
22789
- this.additionalNameClaimTypes = this.getResponseProperty("AdditionalNameClaimTypes");
22790
- this.acrValues = this.getResponseProperty("AcrValues");
22791
- this.expectedReturnAcrValue = this.getResponseProperty("ExpectedReturnAcrValue");
22792
- this.spNameIdFormat = this.getResponseProperty("SpNameIdFormat");
22793
- this.spOutboundSigningAlgorithm = this.getResponseProperty("SpOutboundSigningAlgorithm");
22794
- this.spSigningBehavior = this.getResponseProperty("SpSigningBehavior");
22795
- this.spMinIncomingSigningAlgorithm = this.getResponseProperty("SpMinIncomingSigningAlgorithm");
22796
- this.spWantAssertionsSigned = this.getResponseProperty("SpWantAssertionsSigned");
22797
- this.spValidateCertificates = this.getResponseProperty("SpValidateCertificates");
22798
- this.idpEntityId = this.getResponseProperty("IdpEntityId");
22799
- this.idpBindingType = this.getResponseProperty("IdpBindingType");
22800
- this.idpSingleSignOnServiceUrl = this.getResponseProperty("IdpSingleSignOnServiceUrl");
22801
- this.idpSingleLogoutServiceUrl = this.getResponseProperty("IdpSingleLogoutServiceUrl");
22802
- this.idpX509PublicCert = this.getResponseProperty("IdpX509PublicCert");
22803
- this.idpOutboundSigningAlgorithm = this.getResponseProperty("IdpOutboundSigningAlgorithm");
22804
- this.idpAllowUnsolicitedAuthnResponse = this.getResponseProperty("IdpAllowUnsolicitedAuthnResponse");
22805
- this.idpDisableOutboundLogoutRequests = this.getResponseProperty("IdpDisableOutboundLogoutRequests");
22806
- this.idpWantAuthnRequestsSigned = this.getResponseProperty("IdpWantAuthnRequestsSigned");
22807
- }
22808
- static fromView(view, api = new SsoConfigApi()) {
22809
- api.configType = view.configType;
22810
- api.keyConnectorEnabled = view.keyConnectorEnabled;
22811
- api.keyConnectorUrl = view.keyConnectorUrl;
22812
- if (api.configType === SsoType.OpenIdConnect) {
22813
- api.authority = view.openId.authority;
22814
- api.clientId = view.openId.clientId;
22815
- api.clientSecret = view.openId.clientSecret;
22816
- api.metadataAddress = view.openId.metadataAddress;
22817
- api.redirectBehavior = view.openId.redirectBehavior;
22818
- api.getClaimsFromUserInfoEndpoint = view.openId.getClaimsFromUserInfoEndpoint;
22819
- api.additionalScopes = view.openId.additionalScopes;
22820
- api.additionalUserIdClaimTypes = view.openId.additionalUserIdClaimTypes;
22821
- api.additionalEmailClaimTypes = view.openId.additionalEmailClaimTypes;
22822
- api.additionalNameClaimTypes = view.openId.additionalNameClaimTypes;
22823
- api.acrValues = view.openId.acrValues;
22824
- api.expectedReturnAcrValue = view.openId.expectedReturnAcrValue;
22825
- }
22826
- else if (api.configType === SsoType.Saml2) {
22827
- api.spNameIdFormat = view.saml.spNameIdFormat;
22828
- api.spOutboundSigningAlgorithm = view.saml.spOutboundSigningAlgorithm;
22829
- api.spSigningBehavior = view.saml.spSigningBehavior;
22830
- api.spMinIncomingSigningAlgorithm = view.saml.spMinIncomingSigningAlgorithm;
22831
- api.spWantAssertionsSigned = view.saml.spWantAssertionsSigned;
22832
- api.spValidateCertificates = view.saml.spValidateCertificates;
22833
- api.idpEntityId = view.saml.idpEntityId;
22834
- api.idpBindingType = view.saml.idpBindingType;
22835
- api.idpSingleSignOnServiceUrl = view.saml.idpSingleSignOnServiceUrl;
22836
- api.idpSingleLogoutServiceUrl = view.saml.idpSingleLogoutServiceUrl;
22837
- api.idpX509PublicCert = view.saml.idpX509PublicCert;
22838
- api.idpOutboundSigningAlgorithm = view.saml.idpOutboundSigningAlgorithm;
22839
- api.idpAllowUnsolicitedAuthnResponse = view.saml.idpAllowUnsolicitedAuthnResponse;
22840
- api.idpWantAuthnRequestsSigned = view.saml.idpWantAuthnRequestsSigned;
22841
- // Value is inverted in the api model (disable instead of allow)
22842
- api.idpDisableOutboundLogoutRequests = !view.saml.idpAllowOutboundLogoutRequests;
22843
- }
22844
- return api;
22845
- }
22846
- }
22847
-
22848
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organization/organizationSsoResponse.ts
22849
-
22850
-
22851
- class OrganizationSsoResponse extends BaseResponse {
22852
- constructor(response) {
22853
- super(response);
22854
- this.enabled = this.getResponseProperty("Enabled");
22855
- this.data =
22856
- this.getResponseProperty("Data") != null
22857
- ? new SsoConfigApi(this.getResponseProperty("Data"))
22858
- : null;
22859
- this.urls = new SsoUrls(this.getResponseProperty("Urls"));
22860
- }
22861
- }
22862
- class SsoUrls extends BaseResponse {
22863
- constructor(response) {
22864
- super(response);
22865
- this.callbackPath = this.getResponseProperty("CallbackPath");
22866
- this.signedOutCallbackPath = this.getResponseProperty("SignedOutCallbackPath");
22867
- this.spEntityId = this.getResponseProperty("SpEntityId");
22868
- this.spMetadataUrl = this.getResponseProperty("SpMetadataUrl");
22869
- this.spAcsUrl = this.getResponseProperty("SpAcsUrl");
22870
- }
22871
- }
22872
-
22873
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organizationApiKeyInformationResponse.ts
22781
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organization-api-key-information.response.ts
22874
22782
 
22875
22783
  class OrganizationApiKeyInformationResponse extends BaseResponse {
22876
22784
  constructor(response) {
@@ -22879,7 +22787,7 @@ class OrganizationApiKeyInformationResponse extends BaseResponse {
22879
22787
  }
22880
22788
  }
22881
22789
 
22882
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organizationAutoEnrollStatusResponse.ts
22790
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organization-auto-enroll-status.response.ts
22883
22791
 
22884
22792
  class OrganizationAutoEnrollStatusResponse extends BaseResponse {
22885
22793
  constructor(response) {
@@ -22889,7 +22797,7 @@ class OrganizationAutoEnrollStatusResponse extends BaseResponse {
22889
22797
  }
22890
22798
  }
22891
22799
 
22892
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/keysResponse.ts
22800
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/keys.response.ts
22893
22801
 
22894
22802
  class KeysResponse extends BaseResponse {
22895
22803
  constructor(response) {
@@ -22899,7 +22807,7 @@ class KeysResponse extends BaseResponse {
22899
22807
  }
22900
22808
  }
22901
22809
 
22902
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organizationKeysResponse.ts
22810
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organization-keys.response.ts
22903
22811
 
22904
22812
  class OrganizationKeysResponse extends KeysResponse {
22905
22813
  constructor(response) {
@@ -22907,7 +22815,7 @@ class OrganizationKeysResponse extends KeysResponse {
22907
22815
  }
22908
22816
  }
22909
22817
 
22910
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/planResponse.ts
22818
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/plan.response.ts
22911
22819
 
22912
22820
  class PlanResponse extends BaseResponse {
22913
22821
  constructor(response) {
@@ -22955,7 +22863,7 @@ class PlanResponse extends BaseResponse {
22955
22863
  }
22956
22864
  }
22957
22865
 
22958
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organizationResponse.ts
22866
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organization.response.ts
22959
22867
 
22960
22868
 
22961
22869
  class OrganizationResponse extends BaseResponse {
@@ -22989,7 +22897,7 @@ class OrganizationResponse extends BaseResponse {
22989
22897
  }
22990
22898
  }
22991
22899
 
22992
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/subscriptionResponse.ts
22900
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/subscription.response.ts
22993
22901
 
22994
22902
  class SubscriptionResponse extends BaseResponse {
22995
22903
  constructor(response) {
@@ -23045,7 +22953,7 @@ class BillingSubscriptionUpcomingInvoiceResponse extends BaseResponse {
23045
22953
  }
23046
22954
  }
23047
22955
 
23048
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organizationSubscriptionResponse.ts
22956
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organization-subscription.response.ts
23049
22957
 
23050
22958
 
23051
22959
  class OrganizationSubscriptionResponse extends OrganizationResponse {
@@ -23064,7 +22972,149 @@ class OrganizationSubscriptionResponse extends OrganizationResponse {
23064
22972
  }
23065
22973
  }
23066
22974
 
23067
- ;// CONCATENATED MODULE: ../../libs/common/src/models/api/permissionsApi.ts
22975
+ ;// CONCATENATED MODULE: ../../libs/common/src/enums/ssoEnums.ts
22976
+ var SsoType;
22977
+ (function (SsoType) {
22978
+ SsoType[SsoType["None"] = 0] = "None";
22979
+ SsoType[SsoType["OpenIdConnect"] = 1] = "OpenIdConnect";
22980
+ SsoType[SsoType["Saml2"] = 2] = "Saml2";
22981
+ })(SsoType || (SsoType = {}));
22982
+ var OpenIdConnectRedirectBehavior;
22983
+ (function (OpenIdConnectRedirectBehavior) {
22984
+ OpenIdConnectRedirectBehavior[OpenIdConnectRedirectBehavior["RedirectGet"] = 0] = "RedirectGet";
22985
+ OpenIdConnectRedirectBehavior[OpenIdConnectRedirectBehavior["FormPost"] = 1] = "FormPost";
22986
+ })(OpenIdConnectRedirectBehavior || (OpenIdConnectRedirectBehavior = {}));
22987
+ var Saml2BindingType;
22988
+ (function (Saml2BindingType) {
22989
+ Saml2BindingType[Saml2BindingType["HttpRedirect"] = 1] = "HttpRedirect";
22990
+ Saml2BindingType[Saml2BindingType["HttpPost"] = 2] = "HttpPost";
22991
+ })(Saml2BindingType || (Saml2BindingType = {}));
22992
+ var Saml2NameIdFormat;
22993
+ (function (Saml2NameIdFormat) {
22994
+ Saml2NameIdFormat[Saml2NameIdFormat["NotConfigured"] = 0] = "NotConfigured";
22995
+ Saml2NameIdFormat[Saml2NameIdFormat["Unspecified"] = 1] = "Unspecified";
22996
+ Saml2NameIdFormat[Saml2NameIdFormat["EmailAddress"] = 2] = "EmailAddress";
22997
+ Saml2NameIdFormat[Saml2NameIdFormat["X509SubjectName"] = 3] = "X509SubjectName";
22998
+ Saml2NameIdFormat[Saml2NameIdFormat["WindowsDomainQualifiedName"] = 4] = "WindowsDomainQualifiedName";
22999
+ Saml2NameIdFormat[Saml2NameIdFormat["KerberosPrincipalName"] = 5] = "KerberosPrincipalName";
23000
+ Saml2NameIdFormat[Saml2NameIdFormat["EntityIdentifier"] = 6] = "EntityIdentifier";
23001
+ Saml2NameIdFormat[Saml2NameIdFormat["Persistent"] = 7] = "Persistent";
23002
+ Saml2NameIdFormat[Saml2NameIdFormat["Transient"] = 8] = "Transient";
23003
+ })(Saml2NameIdFormat || (Saml2NameIdFormat = {}));
23004
+ var Saml2SigningBehavior;
23005
+ (function (Saml2SigningBehavior) {
23006
+ Saml2SigningBehavior[Saml2SigningBehavior["IfIdpWantAuthnRequestsSigned"] = 0] = "IfIdpWantAuthnRequestsSigned";
23007
+ Saml2SigningBehavior[Saml2SigningBehavior["Always"] = 1] = "Always";
23008
+ Saml2SigningBehavior[Saml2SigningBehavior["Never"] = 3] = "Never";
23009
+ })(Saml2SigningBehavior || (Saml2SigningBehavior = {}));
23010
+
23011
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/api/sso-config.api.ts
23012
+
23013
+
23014
+ class SsoConfigApi extends BaseResponse {
23015
+ constructor(data = null) {
23016
+ super(data);
23017
+ if (data == null) {
23018
+ return;
23019
+ }
23020
+ this.configType = this.getResponseProperty("ConfigType");
23021
+ this.keyConnectorEnabled = this.getResponseProperty("KeyConnectorEnabled");
23022
+ this.keyConnectorUrl = this.getResponseProperty("KeyConnectorUrl");
23023
+ this.authority = this.getResponseProperty("Authority");
23024
+ this.clientId = this.getResponseProperty("ClientId");
23025
+ this.clientSecret = this.getResponseProperty("ClientSecret");
23026
+ this.metadataAddress = this.getResponseProperty("MetadataAddress");
23027
+ this.redirectBehavior = this.getResponseProperty("RedirectBehavior");
23028
+ this.getClaimsFromUserInfoEndpoint = this.getResponseProperty("GetClaimsFromUserInfoEndpoint");
23029
+ this.additionalScopes = this.getResponseProperty("AdditionalScopes");
23030
+ this.additionalUserIdClaimTypes = this.getResponseProperty("AdditionalUserIdClaimTypes");
23031
+ this.additionalEmailClaimTypes = this.getResponseProperty("AdditionalEmailClaimTypes");
23032
+ this.additionalNameClaimTypes = this.getResponseProperty("AdditionalNameClaimTypes");
23033
+ this.acrValues = this.getResponseProperty("AcrValues");
23034
+ this.expectedReturnAcrValue = this.getResponseProperty("ExpectedReturnAcrValue");
23035
+ this.spNameIdFormat = this.getResponseProperty("SpNameIdFormat");
23036
+ this.spOutboundSigningAlgorithm = this.getResponseProperty("SpOutboundSigningAlgorithm");
23037
+ this.spSigningBehavior = this.getResponseProperty("SpSigningBehavior");
23038
+ this.spMinIncomingSigningAlgorithm = this.getResponseProperty("SpMinIncomingSigningAlgorithm");
23039
+ this.spWantAssertionsSigned = this.getResponseProperty("SpWantAssertionsSigned");
23040
+ this.spValidateCertificates = this.getResponseProperty("SpValidateCertificates");
23041
+ this.idpEntityId = this.getResponseProperty("IdpEntityId");
23042
+ this.idpBindingType = this.getResponseProperty("IdpBindingType");
23043
+ this.idpSingleSignOnServiceUrl = this.getResponseProperty("IdpSingleSignOnServiceUrl");
23044
+ this.idpSingleLogoutServiceUrl = this.getResponseProperty("IdpSingleLogoutServiceUrl");
23045
+ this.idpX509PublicCert = this.getResponseProperty("IdpX509PublicCert");
23046
+ this.idpOutboundSigningAlgorithm = this.getResponseProperty("IdpOutboundSigningAlgorithm");
23047
+ this.idpAllowUnsolicitedAuthnResponse = this.getResponseProperty("IdpAllowUnsolicitedAuthnResponse");
23048
+ this.idpDisableOutboundLogoutRequests = this.getResponseProperty("IdpDisableOutboundLogoutRequests");
23049
+ this.idpWantAuthnRequestsSigned = this.getResponseProperty("IdpWantAuthnRequestsSigned");
23050
+ }
23051
+ static fromView(view, api = new SsoConfigApi()) {
23052
+ api.configType = view.configType;
23053
+ api.keyConnectorEnabled = view.keyConnectorEnabled;
23054
+ api.keyConnectorUrl = view.keyConnectorUrl;
23055
+ if (api.configType === SsoType.OpenIdConnect) {
23056
+ api.authority = view.openId.authority;
23057
+ api.clientId = view.openId.clientId;
23058
+ api.clientSecret = view.openId.clientSecret;
23059
+ api.metadataAddress = view.openId.metadataAddress;
23060
+ api.redirectBehavior = view.openId.redirectBehavior;
23061
+ api.getClaimsFromUserInfoEndpoint = view.openId.getClaimsFromUserInfoEndpoint;
23062
+ api.additionalScopes = view.openId.additionalScopes;
23063
+ api.additionalUserIdClaimTypes = view.openId.additionalUserIdClaimTypes;
23064
+ api.additionalEmailClaimTypes = view.openId.additionalEmailClaimTypes;
23065
+ api.additionalNameClaimTypes = view.openId.additionalNameClaimTypes;
23066
+ api.acrValues = view.openId.acrValues;
23067
+ api.expectedReturnAcrValue = view.openId.expectedReturnAcrValue;
23068
+ }
23069
+ else if (api.configType === SsoType.Saml2) {
23070
+ api.spNameIdFormat = view.saml.spNameIdFormat;
23071
+ api.spOutboundSigningAlgorithm = view.saml.spOutboundSigningAlgorithm;
23072
+ api.spSigningBehavior = view.saml.spSigningBehavior;
23073
+ api.spMinIncomingSigningAlgorithm = view.saml.spMinIncomingSigningAlgorithm;
23074
+ api.spWantAssertionsSigned = view.saml.spWantAssertionsSigned;
23075
+ api.spValidateCertificates = view.saml.spValidateCertificates;
23076
+ api.idpEntityId = view.saml.idpEntityId;
23077
+ api.idpBindingType = view.saml.idpBindingType;
23078
+ api.idpSingleSignOnServiceUrl = view.saml.idpSingleSignOnServiceUrl;
23079
+ api.idpSingleLogoutServiceUrl = view.saml.idpSingleLogoutServiceUrl;
23080
+ api.idpX509PublicCert = view.saml.idpX509PublicCert;
23081
+ api.idpOutboundSigningAlgorithm = view.saml.idpOutboundSigningAlgorithm;
23082
+ api.idpAllowUnsolicitedAuthnResponse = view.saml.idpAllowUnsolicitedAuthnResponse;
23083
+ api.idpWantAuthnRequestsSigned = view.saml.idpWantAuthnRequestsSigned;
23084
+ // Value is inverted in the api model (disable instead of allow)
23085
+ api.idpDisableOutboundLogoutRequests = !view.saml.idpAllowOutboundLogoutRequests;
23086
+ }
23087
+ return api;
23088
+ }
23089
+ }
23090
+
23091
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organization/organization-sso.response.ts
23092
+
23093
+
23094
+ class OrganizationSsoResponse extends BaseResponse {
23095
+ constructor(response) {
23096
+ super(response);
23097
+ this.enabled = this.getResponseProperty("Enabled");
23098
+ this.identifier = this.getResponseProperty("Identifier");
23099
+ this.data =
23100
+ this.getResponseProperty("Data") != null
23101
+ ? new SsoConfigApi(this.getResponseProperty("Data"))
23102
+ : null;
23103
+ this.urls = new SsoUrls(this.getResponseProperty("Urls"));
23104
+ }
23105
+ }
23106
+ class SsoUrls extends BaseResponse {
23107
+ constructor(response) {
23108
+ super(response);
23109
+ this.callbackPath = this.getResponseProperty("CallbackPath");
23110
+ this.signedOutCallbackPath = this.getResponseProperty("SignedOutCallbackPath");
23111
+ this.spEntityId = this.getResponseProperty("SpEntityId");
23112
+ this.spMetadataUrl = this.getResponseProperty("SpMetadataUrl");
23113
+ this.spAcsUrl = this.getResponseProperty("SpAcsUrl");
23114
+ }
23115
+ }
23116
+
23117
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/api/permissions.api.ts
23068
23118
 
23069
23119
  class PermissionsApi extends BaseResponse {
23070
23120
  constructor(data = null) {
@@ -23093,7 +23143,7 @@ class PermissionsApi extends BaseResponse {
23093
23143
  }
23094
23144
  }
23095
23145
 
23096
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/profileOrganizationResponse.ts
23146
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/profile-organization.response.ts
23097
23147
 
23098
23148
 
23099
23149
  class ProfileOrganizationResponse extends BaseResponse {
@@ -23147,7 +23197,7 @@ class ProfileOrganizationResponse extends BaseResponse {
23147
23197
  }
23148
23198
  }
23149
23199
 
23150
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/profileProviderOrganizationResponse.ts
23200
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/profile-provider-organization.response.ts
23151
23201
 
23152
23202
  class ProfileProviderOrganizationResponse extends ProfileOrganizationResponse {
23153
23203
  constructor(response) {
@@ -23156,7 +23206,7 @@ class ProfileProviderOrganizationResponse extends ProfileOrganizationResponse {
23156
23206
  }
23157
23207
  }
23158
23208
 
23159
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/profileProviderResponse.ts
23209
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/profile-provider.response.ts
23160
23210
 
23161
23211
 
23162
23212
  class ProfileProviderResponse extends BaseResponse {
@@ -23174,7 +23224,7 @@ class ProfileProviderResponse extends BaseResponse {
23174
23224
  }
23175
23225
  }
23176
23226
 
23177
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/profileResponse.ts
23227
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/profile.response.ts
23178
23228
 
23179
23229
 
23180
23230
 
@@ -23215,7 +23265,7 @@ class ProfileResponse extends BaseResponse {
23215
23265
  }
23216
23266
  }
23217
23267
 
23218
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/paymentResponse.ts
23268
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/payment.response.ts
23219
23269
 
23220
23270
 
23221
23271
  class PaymentResponse extends BaseResponse {
@@ -23230,7 +23280,7 @@ class PaymentResponse extends BaseResponse {
23230
23280
  }
23231
23281
  }
23232
23282
 
23233
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/taxInfoResponse.ts
23283
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/tax-info.response.ts
23234
23284
 
23235
23285
  class TaxInfoResponse extends BaseResponse {
23236
23286
  constructor(response) {
@@ -23268,8 +23318,9 @@ var organization_api_service_awaiter = (undefined && undefined.__awaiter) || fun
23268
23318
 
23269
23319
 
23270
23320
  class OrganizationApiService {
23271
- constructor(apiService) {
23321
+ constructor(apiService, syncService) {
23272
23322
  this.apiService = apiService;
23323
+ this.syncService = syncService;
23273
23324
  }
23274
23325
  get(id) {
23275
23326
  return organization_api_service_awaiter(this, void 0, void 0, function* () {
@@ -23303,6 +23354,8 @@ class OrganizationApiService {
23303
23354
  create(request) {
23304
23355
  return organization_api_service_awaiter(this, void 0, void 0, function* () {
23305
23356
  const r = yield this.apiService.send("POST", "/organizations", request, true, true);
23357
+ // Forcing a sync will notify organization service that they need to repull
23358
+ yield this.syncService.fullSync(true);
23306
23359
  return new OrganizationResponse(r);
23307
23360
  });
23308
23361
  }
@@ -23315,7 +23368,9 @@ class OrganizationApiService {
23315
23368
  save(id, request) {
23316
23369
  return organization_api_service_awaiter(this, void 0, void 0, function* () {
23317
23370
  const r = yield this.apiService.send("PUT", "/organizations/" + id, request, true, true);
23318
- return new OrganizationResponse(r);
23371
+ const data = new OrganizationResponse(r);
23372
+ yield this.syncService.fullSync(true);
23373
+ return data;
23319
23374
  });
23320
23375
  }
23321
23376
  updatePayment(id, request) {
@@ -23348,7 +23403,7 @@ class OrganizationApiService {
23348
23403
  }
23349
23404
  verifyBank(id, request) {
23350
23405
  return organization_api_service_awaiter(this, void 0, void 0, function* () {
23351
- return this.apiService.send("POST", "/organizations/" + id + "/verify-bank", request, true, false);
23406
+ yield this.apiService.send("POST", "/organizations/" + id + "/verify-bank", request, true, false);
23352
23407
  });
23353
23408
  }
23354
23409
  cancel(id) {
@@ -23363,17 +23418,19 @@ class OrganizationApiService {
23363
23418
  }
23364
23419
  leave(id) {
23365
23420
  return organization_api_service_awaiter(this, void 0, void 0, function* () {
23366
- return this.apiService.send("POST", "/organizations/" + id + "/leave", null, true, false);
23421
+ yield this.apiService.send("POST", "/organizations/" + id + "/leave", null, true, false);
23422
+ yield this.syncService.fullSync(true);
23367
23423
  });
23368
23424
  }
23369
23425
  delete(id, request) {
23370
23426
  return organization_api_service_awaiter(this, void 0, void 0, function* () {
23371
- return this.apiService.send("DELETE", "/organizations/" + id, request, true, false);
23427
+ yield this.apiService.send("DELETE", "/organizations/" + id, request, true, false);
23428
+ yield this.syncService.fullSync(true);
23372
23429
  });
23373
23430
  }
23374
23431
  updateLicense(id, data) {
23375
23432
  return organization_api_service_awaiter(this, void 0, void 0, function* () {
23376
- return this.apiService.send("POST", "/organizations/" + id + "/license", data, true, false);
23433
+ yield this.apiService.send("POST", "/organizations/" + id + "/license", data, true, false);
23377
23434
  });
23378
23435
  }
23379
23436
  importDirectory(organizationId, request) {
@@ -23410,6 +23467,7 @@ class OrganizationApiService {
23410
23467
  }
23411
23468
  updateTaxInfo(id, request) {
23412
23469
  return organization_api_service_awaiter(this, void 0, void 0, function* () {
23470
+ // Can't broadcast anything because the response doesn't have content
23413
23471
  return this.apiService.send("PUT", "/organizations/" + id + "/tax", request, true, false);
23414
23472
  });
23415
23473
  }
@@ -23422,6 +23480,7 @@ class OrganizationApiService {
23422
23480
  updateKeys(id, request) {
23423
23481
  return organization_api_service_awaiter(this, void 0, void 0, function* () {
23424
23482
  const r = yield this.apiService.send("POST", "/organizations/" + id + "/keys", request, true, true);
23483
+ // Not broadcasting anything because data on this response doesn't correspond to `Organization`
23425
23484
  return new OrganizationKeysResponse(r);
23426
23485
  });
23427
23486
  }
@@ -23434,11 +23493,254 @@ class OrganizationApiService {
23434
23493
  updateSso(id, request) {
23435
23494
  return organization_api_service_awaiter(this, void 0, void 0, function* () {
23436
23495
  const r = yield this.apiService.send("POST", "/organizations/" + id + "/sso", request, true, true);
23496
+ // Not broadcasting anything because data on this response doesn't correspond to `Organization`
23437
23497
  return new OrganizationSsoResponse(r);
23438
23498
  });
23439
23499
  }
23440
23500
  }
23441
23501
 
23502
+ ;// CONCATENATED MODULE: ../../libs/common/src/enums/organizationUserStatusType.ts
23503
+ var OrganizationUserStatusType;
23504
+ (function (OrganizationUserStatusType) {
23505
+ OrganizationUserStatusType[OrganizationUserStatusType["Invited"] = 0] = "Invited";
23506
+ OrganizationUserStatusType[OrganizationUserStatusType["Accepted"] = 1] = "Accepted";
23507
+ OrganizationUserStatusType[OrganizationUserStatusType["Confirmed"] = 2] = "Confirmed";
23508
+ OrganizationUserStatusType[OrganizationUserStatusType["Revoked"] = -1] = "Revoked";
23509
+ })(OrganizationUserStatusType || (OrganizationUserStatusType = {}));
23510
+
23511
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/organization.ts
23512
+
23513
+
23514
+ class Organization {
23515
+ constructor(obj) {
23516
+ if (obj == null) {
23517
+ return;
23518
+ }
23519
+ this.id = obj.id;
23520
+ this.name = obj.name;
23521
+ this.status = obj.status;
23522
+ this.type = obj.type;
23523
+ this.enabled = obj.enabled;
23524
+ this.usePolicies = obj.usePolicies;
23525
+ this.useGroups = obj.useGroups;
23526
+ this.useDirectory = obj.useDirectory;
23527
+ this.useEvents = obj.useEvents;
23528
+ this.useTotp = obj.useTotp;
23529
+ this.use2fa = obj.use2fa;
23530
+ this.useApi = obj.useApi;
23531
+ this.useSso = obj.useSso;
23532
+ this.useKeyConnector = obj.useKeyConnector;
23533
+ this.useScim = obj.useScim;
23534
+ this.useResetPassword = obj.useResetPassword;
23535
+ this.selfHost = obj.selfHost;
23536
+ this.usersGetPremium = obj.usersGetPremium;
23537
+ this.seats = obj.seats;
23538
+ this.maxCollections = obj.maxCollections;
23539
+ this.maxStorageGb = obj.maxStorageGb;
23540
+ this.ssoBound = obj.ssoBound;
23541
+ this.identifier = obj.identifier;
23542
+ this.permissions = obj.permissions;
23543
+ this.resetPasswordEnrolled = obj.resetPasswordEnrolled;
23544
+ this.userId = obj.userId;
23545
+ this.hasPublicAndPrivateKeys = obj.hasPublicAndPrivateKeys;
23546
+ this.providerId = obj.providerId;
23547
+ this.providerName = obj.providerName;
23548
+ this.isProviderUser = obj.isProviderUser;
23549
+ this.familySponsorshipFriendlyName = obj.familySponsorshipFriendlyName;
23550
+ this.familySponsorshipAvailable = obj.familySponsorshipAvailable;
23551
+ this.planProductType = obj.planProductType;
23552
+ this.keyConnectorEnabled = obj.keyConnectorEnabled;
23553
+ this.keyConnectorUrl = obj.keyConnectorUrl;
23554
+ this.familySponsorshipLastSyncDate = obj.familySponsorshipLastSyncDate;
23555
+ this.familySponsorshipValidUntil = obj.familySponsorshipValidUntil;
23556
+ this.familySponsorshipToDelete = obj.familySponsorshipToDelete;
23557
+ }
23558
+ get canAccess() {
23559
+ if (this.type === OrganizationUserType.Owner) {
23560
+ return true;
23561
+ }
23562
+ return this.enabled && this.status === OrganizationUserStatusType.Confirmed;
23563
+ }
23564
+ get isManager() {
23565
+ return (this.type === OrganizationUserType.Manager ||
23566
+ this.type === OrganizationUserType.Owner ||
23567
+ this.type === OrganizationUserType.Admin);
23568
+ }
23569
+ get isAdmin() {
23570
+ return this.type === OrganizationUserType.Owner || this.type === OrganizationUserType.Admin;
23571
+ }
23572
+ get isOwner() {
23573
+ return this.type === OrganizationUserType.Owner || this.isProviderUser;
23574
+ }
23575
+ get canAccessEventLogs() {
23576
+ return (this.isAdmin || this.permissions.accessEventLogs) && this.useEvents;
23577
+ }
23578
+ get canAccessImportExport() {
23579
+ return this.isAdmin || this.permissions.accessImportExport;
23580
+ }
23581
+ get canAccessReports() {
23582
+ return this.isAdmin || this.permissions.accessReports;
23583
+ }
23584
+ get canCreateNewCollections() {
23585
+ var _a;
23586
+ return (this.isManager ||
23587
+ ((_a = this.permissions.createNewCollections) !== null && _a !== void 0 ? _a : this.permissions.manageAllCollections));
23588
+ }
23589
+ get canEditAnyCollection() {
23590
+ var _a;
23591
+ return (this.isAdmin || ((_a = this.permissions.editAnyCollection) !== null && _a !== void 0 ? _a : this.permissions.manageAllCollections));
23592
+ }
23593
+ get canDeleteAnyCollection() {
23594
+ var _a;
23595
+ return (this.isAdmin ||
23596
+ ((_a = this.permissions.deleteAnyCollection) !== null && _a !== void 0 ? _a : this.permissions.manageAllCollections));
23597
+ }
23598
+ get canViewAllCollections() {
23599
+ return this.canCreateNewCollections || this.canEditAnyCollection || this.canDeleteAnyCollection;
23600
+ }
23601
+ get canEditAssignedCollections() {
23602
+ var _a;
23603
+ return (this.isManager ||
23604
+ ((_a = this.permissions.editAssignedCollections) !== null && _a !== void 0 ? _a : this.permissions.manageAssignedCollections));
23605
+ }
23606
+ get canDeleteAssignedCollections() {
23607
+ var _a;
23608
+ return (this.isManager ||
23609
+ ((_a = this.permissions.deleteAssignedCollections) !== null && _a !== void 0 ? _a : this.permissions.manageAssignedCollections));
23610
+ }
23611
+ get canViewAssignedCollections() {
23612
+ return this.canDeleteAssignedCollections || this.canEditAssignedCollections;
23613
+ }
23614
+ get canManageGroups() {
23615
+ return (this.isAdmin || this.permissions.manageGroups) && this.useGroups;
23616
+ }
23617
+ get canManageSso() {
23618
+ return (this.isAdmin || this.permissions.manageSso) && this.useSso;
23619
+ }
23620
+ get canManageScim() {
23621
+ return (this.isAdmin || this.permissions.manageScim) && this.useScim;
23622
+ }
23623
+ get canManagePolicies() {
23624
+ return (this.isAdmin || this.permissions.managePolicies) && this.usePolicies;
23625
+ }
23626
+ get canManageUsers() {
23627
+ return this.isAdmin || this.permissions.manageUsers;
23628
+ }
23629
+ get canManageUsersPassword() {
23630
+ return this.isAdmin || this.permissions.manageResetPassword;
23631
+ }
23632
+ get isExemptFromPolicies() {
23633
+ return this.canManagePolicies;
23634
+ }
23635
+ get canManageBilling() {
23636
+ return this.isOwner && (this.isProviderUser || !this.hasProvider);
23637
+ }
23638
+ get hasProvider() {
23639
+ return this.providerId != null || this.providerName != null;
23640
+ }
23641
+ }
23642
+
23643
+ ;// CONCATENATED MODULE: ../../libs/common/src/services/organization/organization.service.ts
23644
+ var organization_service_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
23645
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
23646
+ return new (P || (P = Promise))(function (resolve, reject) {
23647
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
23648
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
23649
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23650
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
23651
+ });
23652
+ };
23653
+
23654
+
23655
+ class OrganizationService {
23656
+ constructor(stateService) {
23657
+ this.stateService = stateService;
23658
+ this._organizations = new external_rxjs_namespaceObject.BehaviorSubject([]);
23659
+ this.organizations$ = this._organizations.asObservable();
23660
+ this.stateService.activeAccountUnlocked$
23661
+ .pipe((0,external_rxjs_namespaceObject.concatMap)((unlocked) => organization_service_awaiter(this, void 0, void 0, function* () {
23662
+ if (!unlocked) {
23663
+ this._organizations.next([]);
23664
+ return;
23665
+ }
23666
+ const data = yield this.stateService.getOrganizations();
23667
+ this.updateObservables(data);
23668
+ })))
23669
+ .subscribe();
23670
+ }
23671
+ getAll(userId) {
23672
+ return organization_service_awaiter(this, void 0, void 0, function* () {
23673
+ const organizationsMap = yield this.stateService.getOrganizations({ userId: userId });
23674
+ return Object.values(organizationsMap || {}).map((o) => new Organization(o));
23675
+ });
23676
+ }
23677
+ canManageSponsorships() {
23678
+ return organization_service_awaiter(this, void 0, void 0, function* () {
23679
+ const organizations = this._organizations.getValue();
23680
+ return organizations.some((o) => o.familySponsorshipAvailable || o.familySponsorshipFriendlyName !== null);
23681
+ });
23682
+ }
23683
+ hasOrganizations() {
23684
+ const organizations = this._organizations.getValue();
23685
+ return organizations.length > 0;
23686
+ }
23687
+ upsert(organization) {
23688
+ return organization_service_awaiter(this, void 0, void 0, function* () {
23689
+ let organizations = yield this.stateService.getOrganizations();
23690
+ if (organizations == null) {
23691
+ organizations = {};
23692
+ }
23693
+ organizations[organization.id] = organization;
23694
+ yield this.replace(organizations);
23695
+ });
23696
+ }
23697
+ delete(id) {
23698
+ return organization_service_awaiter(this, void 0, void 0, function* () {
23699
+ const organizations = yield this.stateService.getOrganizations();
23700
+ if (organizations == null) {
23701
+ return;
23702
+ }
23703
+ if (organizations[id] == null) {
23704
+ return;
23705
+ }
23706
+ delete organizations[id];
23707
+ yield this.replace(organizations);
23708
+ });
23709
+ }
23710
+ get(id) {
23711
+ const organizations = this._organizations.getValue();
23712
+ return organizations.find((organization) => organization.id === id);
23713
+ }
23714
+ /**
23715
+ * @deprecated For the CLI only
23716
+ * @param id id of the organization
23717
+ */
23718
+ getFromState(id) {
23719
+ return organization_service_awaiter(this, void 0, void 0, function* () {
23720
+ const organizationsMap = yield this.stateService.getOrganizations();
23721
+ const organization = organizationsMap[id];
23722
+ if (organization == null) {
23723
+ return null;
23724
+ }
23725
+ return new Organization(organization);
23726
+ });
23727
+ }
23728
+ getByIdentifier(identifier) {
23729
+ const organizations = this._organizations.getValue();
23730
+ return organizations.find((organization) => organization.identifier === identifier);
23731
+ }
23732
+ replace(organizations) {
23733
+ return organization_service_awaiter(this, void 0, void 0, function* () {
23734
+ yield this.stateService.setOrganizations(organizations);
23735
+ this.updateObservables(organizations);
23736
+ });
23737
+ }
23738
+ updateObservables(organizationsMap) {
23739
+ const organizations = Object.values(organizationsMap || {}).map((o) => new Organization(o));
23740
+ this._organizations.next(organizations);
23741
+ }
23742
+ }
23743
+
23442
23744
  ;// CONCATENATED MODULE: external "zxcvbn"
23443
23745
  const external_zxcvbn_namespaceObject = require("zxcvbn");
23444
23746
  ;// CONCATENATED MODULE: ../../libs/common/src/enums/policyType.ts
@@ -23457,7 +23759,7 @@ var PolicyType;
23457
23759
  PolicyType[PolicyType["DisablePersonalVaultExport"] = 10] = "DisablePersonalVaultExport";
23458
23760
  })(PolicyType || (PolicyType = {}));
23459
23761
 
23460
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/generatedPasswordHistory.ts
23762
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/generated-password-history.ts
23461
23763
  class GeneratedPasswordHistory {
23462
23764
  constructor(password, date) {
23463
23765
  this.password = password;
@@ -23465,7 +23767,7 @@ class GeneratedPasswordHistory {
23465
23767
  }
23466
23768
  }
23467
23769
 
23468
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/passwordGeneratorPolicyOptions.ts
23770
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/password-generator-policy-options.ts
23469
23771
 
23470
23772
  class PasswordGeneratorPolicyOptions extends Domain {
23471
23773
  constructor() {
@@ -23646,15 +23948,15 @@ class PasswordGenerationService {
23646
23948
  if (o.includeNumber == null) {
23647
23949
  o.includeNumber = false;
23648
23950
  }
23649
- const listLength = EEFLongWordList.length - 1;
23951
+ const listLength = EFFLongWordList.length - 1;
23650
23952
  const wordList = new Array(o.numWords);
23651
23953
  for (let i = 0; i < o.numWords; i++) {
23652
23954
  const wordIndex = yield this.cryptoService.randomNumber(0, listLength);
23653
23955
  if (o.capitalize) {
23654
- wordList[i] = this.capitalize(EEFLongWordList[wordIndex]);
23956
+ wordList[i] = this.capitalize(EFFLongWordList[wordIndex]);
23655
23957
  }
23656
23958
  else {
23657
- wordList[i] = EEFLongWordList[wordIndex];
23959
+ wordList[i] = EFFLongWordList[wordIndex];
23658
23960
  }
23659
23961
  }
23660
23962
  if (o.includeNumber) {
@@ -23730,10 +24032,9 @@ class PasswordGenerationService {
23730
24032
  });
23731
24033
  }
23732
24034
  getPasswordGeneratorPolicyOptions() {
24035
+ var _a;
23733
24036
  return passwordGeneration_service_awaiter(this, void 0, void 0, function* () {
23734
- const policies = this.policyService == null
23735
- ? null
23736
- : yield this.policyService.getAll(PolicyType.PasswordGenerator);
24037
+ const policies = yield ((_a = this.policyService) === null || _a === void 0 ? void 0 : _a.getAll(PolicyType.PasswordGenerator));
23737
24038
  let enforcedOptions = null;
23738
24039
  if (policies == null || policies.length === 0) {
23739
24040
  return enforcedOptions;
@@ -24003,7 +24304,7 @@ class PasswordGenerationService {
24003
24304
  }
24004
24305
  }
24005
24306
 
24006
- ;// CONCATENATED MODULE: ../../libs/common/src/models/data/policyData.ts
24307
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/data/policy.data.ts
24007
24308
  class PolicyData {
24008
24309
  constructor(response) {
24009
24310
  this.id = response.id;
@@ -24014,7 +24315,7 @@ class PolicyData {
24014
24315
  }
24015
24316
  }
24016
24317
 
24017
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/masterPasswordPolicyOptions.ts
24318
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/master-password-policy-options.ts
24018
24319
 
24019
24320
  class MasterPasswordPolicyOptions extends Domain {
24020
24321
  constructor() {
@@ -24044,7 +24345,7 @@ class Policy extends Domain {
24044
24345
  }
24045
24346
  }
24046
24347
 
24047
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/resetPasswordPolicyOptions.ts
24348
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/reset-password-policy-options.ts
24048
24349
 
24049
24350
  class ResetPasswordPolicyOptions extends Domain {
24050
24351
  constructor() {
@@ -24070,11 +24371,31 @@ var policy_service_awaiter = (undefined && undefined.__awaiter) || function (thi
24070
24371
 
24071
24372
 
24072
24373
 
24374
+
24375
+
24073
24376
  class PolicyService {
24074
24377
  constructor(stateService, organizationService) {
24075
24378
  this.stateService = stateService;
24076
24379
  this.organizationService = organizationService;
24380
+ this._policies = new external_rxjs_namespaceObject.BehaviorSubject([]);
24381
+ this.policies$ = this._policies.asObservable();
24382
+ this.stateService.activeAccountUnlocked$
24383
+ .pipe((0,external_rxjs_namespaceObject.concatMap)((unlocked) => policy_service_awaiter(this, void 0, void 0, function* () {
24384
+ if (Utils.global.bitwardenContainerService == null) {
24385
+ return;
24386
+ }
24387
+ if (!unlocked) {
24388
+ this._policies.next([]);
24389
+ return;
24390
+ }
24391
+ const data = yield this.stateService.getEncryptedPolicies();
24392
+ yield this.updateObservables(data);
24393
+ })))
24394
+ .subscribe();
24077
24395
  }
24396
+ /**
24397
+ * @deprecated Do not call this, use the policies$ observable collection
24398
+ */
24078
24399
  getAll(type, userId) {
24079
24400
  return policy_service_awaiter(this, void 0, void 0, function* () {
24080
24401
  let response = [];
@@ -24085,8 +24406,7 @@ class PolicyService {
24085
24406
  else {
24086
24407
  const diskPolicies = yield this.stateService.getEncryptedPolicies({ userId: userId });
24087
24408
  for (const id in diskPolicies) {
24088
- // eslint-disable-next-line
24089
- if (diskPolicies.hasOwnProperty(id)) {
24409
+ if (Object.prototype.hasOwnProperty.call(diskPolicies, id)) {
24090
24410
  response.push(new Policy(diskPolicies[id]));
24091
24411
  }
24092
24412
  }
@@ -24100,19 +24420,15 @@ class PolicyService {
24100
24420
  }
24101
24421
  });
24102
24422
  }
24103
- getMasterPasswordPolicyOptions(policies) {
24104
- return policy_service_awaiter(this, void 0, void 0, function* () {
24423
+ masterPasswordPolicyOptions$(policies) {
24424
+ const observable = policies ? (0,external_rxjs_namespaceObject.of)(policies) : this.policies$;
24425
+ return observable.pipe((0,external_rxjs_namespaceObject.map)((obsPolicies) => {
24105
24426
  let enforcedOptions = null;
24106
- if (policies == null) {
24107
- policies = yield this.getAll(PolicyType.MasterPassword);
24108
- }
24109
- else {
24110
- policies = policies.filter((p) => p.type === PolicyType.MasterPassword);
24111
- }
24112
- if (policies == null || policies.length === 0) {
24427
+ const filteredPolicies = obsPolicies.filter((p) => p.type === PolicyType.MasterPassword);
24428
+ if (filteredPolicies == null || filteredPolicies.length === 0) {
24113
24429
  return enforcedOptions;
24114
24430
  }
24115
- policies.forEach((currentPolicy) => {
24431
+ filteredPolicies.forEach((currentPolicy) => {
24116
24432
  if (!currentPolicy.enabled || currentPolicy.data == null) {
24117
24433
  return;
24118
24434
  }
@@ -24141,7 +24457,13 @@ class PolicyService {
24141
24457
  }
24142
24458
  });
24143
24459
  return enforcedOptions;
24144
- });
24460
+ }));
24461
+ }
24462
+ policyAppliesToActiveUser$(policyType, policyFilter) {
24463
+ return this.policies$.pipe((0,external_rxjs_namespaceObject.concatMap)((policies) => policy_service_awaiter(this, void 0, void 0, function* () {
24464
+ const userId = yield this.stateService.getUserId();
24465
+ return yield this.checkPoliciesThatApplyToUser(policies, policyType, policyFilter, userId);
24466
+ })));
24145
24467
  }
24146
24468
  evaluateMasterPassword(passwordStrength, newPassword, enforcedPolicyOptions) {
24147
24469
  if (enforcedPolicyOptions == null) {
@@ -24190,20 +24512,7 @@ class PolicyService {
24190
24512
  policyAppliesToUser(policyType, policyFilter, userId) {
24191
24513
  return policy_service_awaiter(this, void 0, void 0, function* () {
24192
24514
  const policies = yield this.getAll(policyType, userId);
24193
- const organizations = yield this.organizationService.getAll(userId);
24194
- let filteredPolicies;
24195
- if (policyFilter != null) {
24196
- filteredPolicies = policies.filter((p) => p.enabled && policyFilter(p));
24197
- }
24198
- else {
24199
- filteredPolicies = policies.filter((p) => p.enabled);
24200
- }
24201
- const policySet = new Set(filteredPolicies.map((p) => p.organizationId));
24202
- return organizations.some((o) => o.enabled &&
24203
- o.status >= OrganizationUserStatusType.Accepted &&
24204
- o.usePolicies &&
24205
- !this.isExcemptFromPolicies(o, policyType) &&
24206
- policySet.has(o.id));
24515
+ return this.checkPoliciesThatApplyToUser(policies, policyType, policyFilter, userId);
24207
24516
  });
24208
24517
  }
24209
24518
  upsert(policy) {
@@ -24213,18 +24522,23 @@ class PolicyService {
24213
24522
  policies = {};
24214
24523
  }
24215
24524
  policies[policy.id] = policy;
24525
+ yield this.updateObservables(policies);
24216
24526
  yield this.stateService.setDecryptedPolicies(null);
24217
24527
  yield this.stateService.setEncryptedPolicies(policies);
24218
24528
  });
24219
24529
  }
24220
24530
  replace(policies) {
24221
24531
  return policy_service_awaiter(this, void 0, void 0, function* () {
24532
+ yield this.updateObservables(policies);
24222
24533
  yield this.stateService.setDecryptedPolicies(null);
24223
24534
  yield this.stateService.setEncryptedPolicies(policies);
24224
24535
  });
24225
24536
  }
24226
24537
  clear(userId) {
24227
24538
  return policy_service_awaiter(this, void 0, void 0, function* () {
24539
+ if (userId == null || userId == (yield this.stateService.getUserId())) {
24540
+ this._policies.next([]);
24541
+ }
24228
24542
  yield this.stateService.setDecryptedPolicies(null, { userId: userId });
24229
24543
  yield this.stateService.setEncryptedPolicies(null, { userId: userId });
24230
24544
  });
@@ -24235,6 +24549,24 @@ class PolicyService {
24235
24549
  }
24236
24550
  return organization.isExemptFromPolicies;
24237
24551
  }
24552
+ updateObservables(policiesMap) {
24553
+ return policy_service_awaiter(this, void 0, void 0, function* () {
24554
+ const policies = Object.values(policiesMap || {}).map((f) => new Policy(f));
24555
+ this._policies.next(policies);
24556
+ });
24557
+ }
24558
+ checkPoliciesThatApplyToUser(policies, policyType, policyFilter, userId) {
24559
+ return policy_service_awaiter(this, void 0, void 0, function* () {
24560
+ const organizations = yield this.organizationService.getAll(userId);
24561
+ const filteredPolicies = policies.filter((p) => p.type === policyType && p.enabled && (policyFilter == null || policyFilter(p)));
24562
+ const policySet = new Set(filteredPolicies.map((p) => p.organizationId));
24563
+ return organizations.some((o) => o.enabled &&
24564
+ o.status >= OrganizationUserStatusType.Accepted &&
24565
+ o.usePolicies &&
24566
+ policySet.has(o.id) &&
24567
+ !this.isExcemptFromPolicies(o, policyType));
24568
+ });
24569
+ }
24238
24570
  }
24239
24571
 
24240
24572
  ;// CONCATENATED MODULE: ../../libs/common/src/enums/providerUserStatusType.ts
@@ -24646,7 +24978,7 @@ var SendType;
24646
24978
  SendType[SendType["File"] = 1] = "File";
24647
24979
  })(SendType || (SendType = {}));
24648
24980
 
24649
- ;// CONCATENATED MODULE: ../../libs/common/src/models/data/sendFileData.ts
24981
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/data/send-file.data.ts
24650
24982
  class SendFileData {
24651
24983
  constructor(data) {
24652
24984
  if (data == null) {
@@ -24659,7 +24991,7 @@ class SendFileData {
24659
24991
  }
24660
24992
  }
24661
24993
 
24662
- ;// CONCATENATED MODULE: ../../libs/common/src/models/data/sendTextData.ts
24994
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/data/send-text.data.ts
24663
24995
  class SendTextData {
24664
24996
  constructor(data) {
24665
24997
  if (data == null) {
@@ -24670,7 +25002,7 @@ class SendTextData {
24670
25002
  }
24671
25003
  }
24672
25004
 
24673
- ;// CONCATENATED MODULE: ../../libs/common/src/models/data/sendData.ts
25005
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/data/send.data.ts
24674
25006
 
24675
25007
 
24676
25008
 
@@ -24706,7 +25038,7 @@ class SendData {
24706
25038
  }
24707
25039
  }
24708
25040
 
24709
- ;// CONCATENATED MODULE: ../../libs/common/src/models/view/sendFileView.ts
25041
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/view/send-file.view.ts
24710
25042
  class SendFileView {
24711
25043
  constructor(f) {
24712
25044
  this.id = null;
@@ -24733,7 +25065,7 @@ class SendFileView {
24733
25065
  }
24734
25066
  }
24735
25067
 
24736
- ;// CONCATENATED MODULE: ../../libs/common/src/models/view/sendTextView.ts
25068
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/view/send-text.view.ts
24737
25069
  class SendTextView {
24738
25070
  constructor(t) {
24739
25071
  this.text = null;
@@ -24747,7 +25079,7 @@ class SendTextView {
24747
25079
  }
24748
25080
  }
24749
25081
 
24750
- ;// CONCATENATED MODULE: ../../libs/common/src/models/view/sendView.ts
25082
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/view/send.view.ts
24751
25083
 
24752
25084
 
24753
25085
 
@@ -24803,8 +25135,8 @@ class SendView {
24803
25135
  }
24804
25136
  }
24805
25137
 
24806
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/sendFile.ts
24807
- var sendFile_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
25138
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/send-file.ts
25139
+ var send_file_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
24808
25140
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
24809
25141
  return new (P || (P = Promise))(function (resolve, reject) {
24810
25142
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -24829,7 +25161,7 @@ class SendFile extends Domain {
24829
25161
  }, ["id", "sizeName"]);
24830
25162
  }
24831
25163
  decrypt(key) {
24832
- return sendFile_awaiter(this, void 0, void 0, function* () {
25164
+ return send_file_awaiter(this, void 0, void 0, function* () {
24833
25165
  const view = yield this.decryptObj(new SendFileView(this), {
24834
25166
  fileName: null,
24835
25167
  }, null, key);
@@ -24838,7 +25170,7 @@ class SendFile extends Domain {
24838
25170
  }
24839
25171
  }
24840
25172
 
24841
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/sendText.ts
25173
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/send-text.ts
24842
25174
 
24843
25175
 
24844
25176
  class SendText extends Domain {
@@ -24938,7 +25270,7 @@ class Send extends Domain {
24938
25270
  }
24939
25271
  }
24940
25272
 
24941
- ;// CONCATENATED MODULE: ../../libs/common/src/models/api/sendFileApi.ts
25273
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/api/send-file.api.ts
24942
25274
 
24943
25275
  class SendFileApi extends BaseResponse {
24944
25276
  constructor(data = null) {
@@ -24953,7 +25285,7 @@ class SendFileApi extends BaseResponse {
24953
25285
  }
24954
25286
  }
24955
25287
 
24956
- ;// CONCATENATED MODULE: ../../libs/common/src/models/api/sendTextApi.ts
25288
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/api/send-text.api.ts
24957
25289
 
24958
25290
  class SendTextApi extends BaseResponse {
24959
25291
  constructor(data = null) {
@@ -24966,7 +25298,7 @@ class SendTextApi extends BaseResponse {
24966
25298
  }
24967
25299
  }
24968
25300
 
24969
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/sendRequest.ts
25301
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/send.request.ts
24970
25302
 
24971
25303
 
24972
25304
 
@@ -25331,11 +25663,11 @@ var StorageLocation;
25331
25663
  StorageLocation["Memory"] = "memory";
25332
25664
  })(StorageLocation || (StorageLocation = {}));
25333
25665
 
25334
- ;// CONCATENATED MODULE: ../../libs/common/src/models/data/eventData.ts
25666
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/data/event.data.ts
25335
25667
  class EventData {
25336
25668
  }
25337
25669
 
25338
- ;// CONCATENATED MODULE: ../../libs/common/src/models/data/providerData.ts
25670
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/data/provider.data.ts
25339
25671
  class ProviderData {
25340
25672
  constructor(response) {
25341
25673
  this.id = response.id;
@@ -26318,19 +26650,6 @@ class StateService {
26318
26650
  yield this.saveAccount(account, this.reconcileOptions(options, yield this.defaultOnDiskLocalOptions()));
26319
26651
  });
26320
26652
  }
26321
- getEnableGravitars(options) {
26322
- var _a, _b, _c;
26323
- return state_service_awaiter(this, void 0, void 0, function* () {
26324
- return ((_c = (_b = (_a = (yield this.getAccount(this.reconcileOptions(options, yield this.defaultOnDiskLocalOptions())))) === null || _a === void 0 ? void 0 : _a.settings) === null || _b === void 0 ? void 0 : _b.enableGravitars) !== null && _c !== void 0 ? _c : false);
26325
- });
26326
- }
26327
- setEnableGravitars(value, options) {
26328
- return state_service_awaiter(this, void 0, void 0, function* () {
26329
- const account = yield this.getAccount(this.reconcileOptions(options, yield this.defaultOnDiskLocalOptions()));
26330
- account.settings.enableGravitars = value;
26331
- yield this.saveAccount(account, this.reconcileOptions(options, yield this.defaultOnDiskLocalOptions()));
26332
- });
26333
- }
26334
26653
  getEnableMinimizeToTray(options) {
26335
26654
  var _a, _b;
26336
26655
  return state_service_awaiter(this, void 0, void 0, function* () {
@@ -26820,12 +27139,18 @@ class StateService {
26820
27139
  yield this.saveGlobals(globals, this.reconcileOptions(options, yield this.defaultInMemoryOptions()));
26821
27140
  });
26822
27141
  }
27142
+ /**
27143
+ * @deprecated Do not call this directly, use OrganizationService
27144
+ */
26823
27145
  getOrganizations(options) {
26824
27146
  var _a, _b;
26825
27147
  return state_service_awaiter(this, void 0, void 0, function* () {
26826
27148
  return (_b = (_a = (yield this.getAccount(this.reconcileOptions(options, yield this.defaultOnDiskOptions())))) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.organizations;
26827
27149
  });
26828
27150
  }
27151
+ /**
27152
+ * @deprecated Do not call this directly, use OrganizationService
27153
+ */
26829
27154
  setOrganizations(value, options) {
26830
27155
  return state_service_awaiter(this, void 0, void 0, function* () {
26831
27156
  const account = yield this.getAccount(this.reconcileOptions(options, yield this.defaultOnDiskOptions()));
@@ -27971,7 +28296,6 @@ const v1Keys = {
27971
28296
  enableBrowserIntegrationFingerprint: "enableBrowserIntegrationFingerprint",
27972
28297
  enableCloseToTray: "enableCloseToTray",
27973
28298
  enableFullWidth: "enableFullWidth",
27974
- enableGravatars: "enableGravatars",
27975
28299
  enableMinimizeToTray: "enableMinimizeToTray",
27976
28300
  enableStartToTray: "enableStartToTrayKey",
27977
28301
  enableTray: "enableTray",
@@ -28089,7 +28413,7 @@ class StateMigrationService {
28089
28413
  });
28090
28414
  }
28091
28415
  migrateStateFrom1To2() {
28092
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23;
28416
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22;
28093
28417
  return stateMigration_service_awaiter(this, void 0, void 0, function* () {
28094
28418
  const clearV1Keys = (clearingUserId) => stateMigration_service_awaiter(this, void 0, void 0, function* () {
28095
28419
  for (const key in v1Keys) {
@@ -28169,12 +28493,11 @@ class StateMigrationService {
28169
28493
  enableAutoFillOnPageLoad: (_13 = (yield this.get(v1Keys.enableAutoFillOnPageLoad))) !== null && _13 !== void 0 ? _13 : defaultAccount.settings.enableAutoFillOnPageLoad,
28170
28494
  enableBiometric: (_14 = (yield this.get(v1Keys.enableBiometric))) !== null && _14 !== void 0 ? _14 : defaultAccount.settings.enableBiometric,
28171
28495
  enableFullWidth: (_15 = (yield this.get(v1Keys.enableFullWidth))) !== null && _15 !== void 0 ? _15 : defaultAccount.settings.enableFullWidth,
28172
- enableGravitars: (_16 = (yield this.get(v1Keys.enableGravatars))) !== null && _16 !== void 0 ? _16 : defaultAccount.settings.enableGravitars,
28173
- environmentUrls: (_17 = globals.environmentUrls) !== null && _17 !== void 0 ? _17 : defaultAccount.settings.environmentUrls,
28174
- equivalentDomains: (_18 = (yield this.get(v1Keys.equivalentDomains))) !== null && _18 !== void 0 ? _18 : defaultAccount.settings.equivalentDomains,
28175
- minimizeOnCopyToClipboard: (_19 = (yield this.get(v1Keys.minimizeOnCopyToClipboard))) !== null && _19 !== void 0 ? _19 : defaultAccount.settings.minimizeOnCopyToClipboard,
28176
- neverDomains: (_20 = (yield this.get(v1Keys.neverDomains))) !== null && _20 !== void 0 ? _20 : defaultAccount.settings.neverDomains,
28177
- passwordGenerationOptions: (_21 = (yield this.get(v1Keys.passwordGenerationOptions))) !== null && _21 !== void 0 ? _21 : defaultAccount.settings.passwordGenerationOptions,
28496
+ environmentUrls: (_16 = globals.environmentUrls) !== null && _16 !== void 0 ? _16 : defaultAccount.settings.environmentUrls,
28497
+ equivalentDomains: (_17 = (yield this.get(v1Keys.equivalentDomains))) !== null && _17 !== void 0 ? _17 : defaultAccount.settings.equivalentDomains,
28498
+ minimizeOnCopyToClipboard: (_18 = (yield this.get(v1Keys.minimizeOnCopyToClipboard))) !== null && _18 !== void 0 ? _18 : defaultAccount.settings.minimizeOnCopyToClipboard,
28499
+ neverDomains: (_19 = (yield this.get(v1Keys.neverDomains))) !== null && _19 !== void 0 ? _19 : defaultAccount.settings.neverDomains,
28500
+ passwordGenerationOptions: (_20 = (yield this.get(v1Keys.passwordGenerationOptions))) !== null && _20 !== void 0 ? _20 : defaultAccount.settings.passwordGenerationOptions,
28178
28501
  pinProtected: Object.assign(new EncryptionPair(), {
28179
28502
  decrypted: null,
28180
28503
  encrypted: yield this.get(v1Keys.pinProtected),
@@ -28183,8 +28506,8 @@ class StateMigrationService {
28183
28506
  settings: userId == null
28184
28507
  ? null
28185
28508
  : yield this.get(v1KeyPrefixes.settings + userId),
28186
- vaultTimeout: (_22 = (yield this.get(v1Keys.vaultTimeout))) !== null && _22 !== void 0 ? _22 : defaultAccount.settings.vaultTimeout,
28187
- vaultTimeoutAction: (_23 = (yield this.get(v1Keys.vaultTimeoutAction))) !== null && _23 !== void 0 ? _23 : defaultAccount.settings.vaultTimeoutAction,
28509
+ vaultTimeout: (_21 = (yield this.get(v1Keys.vaultTimeout))) !== null && _21 !== void 0 ? _21 : defaultAccount.settings.vaultTimeout,
28510
+ vaultTimeoutAction: (_22 = (yield this.get(v1Keys.vaultTimeoutAction))) !== null && _22 !== void 0 ? _22 : defaultAccount.settings.vaultTimeoutAction,
28188
28511
  };
28189
28512
  // (userId == null) = no logged in user (so no known userId) and we need to temporarily store account specific settings in state to migrate on first auth
28190
28513
  // (userId != null) = we have a currently authed user (so known userId) with encrypted data and other key settings we can move, no need to temporarily store account settings
@@ -28398,7 +28721,7 @@ class StateMigrationService {
28398
28721
  }
28399
28722
  }
28400
28723
 
28401
- ;// CONCATENATED MODULE: ../../libs/common/src/models/data/organizationData.ts
28724
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/data/organization.data.ts
28402
28725
  class OrganizationData {
28403
28726
  constructor(response) {
28404
28727
  this.id = response.id;
@@ -28468,9 +28791,8 @@ var sync_service_awaiter = (undefined && undefined.__awaiter) || function (thisA
28468
28791
 
28469
28792
 
28470
28793
 
28471
-
28472
28794
  class SyncService {
28473
- constructor(apiService, settingsService, folderService, cipherService, cryptoService, collectionService, messagingService, policyService, sendService, logService, keyConnectorService, stateService, organizationService, providerService, folderApiService, logoutCallback) {
28795
+ constructor(apiService, settingsService, folderService, cipherService, cryptoService, collectionService, messagingService, policyService, sendService, logService, keyConnectorService, stateService, providerService, folderApiService, organizationService, logoutCallback) {
28474
28796
  this.apiService = apiService;
28475
28797
  this.settingsService = settingsService;
28476
28798
  this.folderService = folderService;
@@ -28483,13 +28805,11 @@ class SyncService {
28483
28805
  this.logService = logService;
28484
28806
  this.keyConnectorService = keyConnectorService;
28485
28807
  this.stateService = stateService;
28486
- this.organizationService = organizationService;
28487
28808
  this.providerService = providerService;
28488
28809
  this.folderApiService = folderApiService;
28810
+ this.organizationService = organizationService;
28489
28811
  this.logoutCallback = logoutCallback;
28490
28812
  this.syncInProgress = false;
28491
- this._sync = new external_rxjs_namespaceObject.Subject();
28492
- this.sync$ = this._sync.asObservable();
28493
28813
  }
28494
28814
  getLastSync() {
28495
28815
  return sync_service_awaiter(this, void 0, void 0, function* () {
@@ -28698,12 +29018,10 @@ class SyncService {
28698
29018
  syncStarted() {
28699
29019
  this.syncInProgress = true;
28700
29020
  this.messagingService.send("syncStarted");
28701
- this._sync.next({ status: "Started" });
28702
29021
  }
28703
29022
  syncCompleted(successfully) {
28704
29023
  this.syncInProgress = false;
28705
29024
  this.messagingService.send("syncCompleted", { successfully: successfully });
28706
- this._sync.next({ status: successfully ? "SuccessfullyCompleted" : "UnsuccessfullyCompleted" });
28707
29025
  return successfully;
28708
29026
  }
28709
29027
  needsSyncing(forceSync) {
@@ -28755,7 +29073,7 @@ class SyncService {
28755
29073
  organizations[o.id].isProviderUser = true;
28756
29074
  }
28757
29075
  });
28758
- yield this.organizationService.save(organizations);
29076
+ yield this.organizationService.replace(organizations);
28759
29077
  yield this.providerService.save(providers);
28760
29078
  if (yield this.keyConnectorService.userNeedsMigration()) {
28761
29079
  yield this.keyConnectorService.setConvertAccountRequired(true);
@@ -28837,6 +29155,22 @@ sync_service_decorate([
28837
29155
  sync_service_metadata("design:returntype", Promise)
28838
29156
  ], SyncService.prototype, "fullSync", null);
28839
29157
 
29158
+ ;// CONCATENATED MODULE: ../../libs/common/src/services/sync/syncNotifier.service.ts
29159
+
29160
+ /**
29161
+ * This class should most likely have 0 dependencies because it will hopefully
29162
+ * be rolled into SyncService once upon a time.
29163
+ */
29164
+ class SyncNotifierService {
29165
+ constructor() {
29166
+ this._sync = new external_rxjs_namespaceObject.Subject();
29167
+ this.sync$ = this._sync.asObservable();
29168
+ }
29169
+ next(event) {
29170
+ this._sync.next(event);
29171
+ }
29172
+ }
29173
+
28840
29174
  ;// CONCATENATED MODULE: ../../libs/common/src/services/totp.service.ts
28841
29175
  var totp_service_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
28842
29176
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -29174,14 +29508,14 @@ var VerificationType;
29174
29508
  VerificationType[VerificationType["OTP"] = 1] = "OTP";
29175
29509
  })(VerificationType || (VerificationType = {}));
29176
29510
 
29177
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/account/verifyOTPRequest.ts
29511
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/account/verify-otp.request.ts
29178
29512
  class VerifyOTPRequest {
29179
29513
  constructor(OTP) {
29180
29514
  this.OTP = OTP;
29181
29515
  }
29182
29516
  }
29183
29517
 
29184
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/secretVerificationRequest.ts
29518
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/secret-verification.request.ts
29185
29519
  class SecretVerificationRequest {
29186
29520
  }
29187
29521
 
@@ -29633,7 +29967,7 @@ const external_https_proxy_agent_namespaceObject = require("https-proxy-agent");
29633
29967
  ;// CONCATENATED MODULE: external "node-fetch"
29634
29968
  const external_node_fetch_namespaceObject = require("node-fetch");
29635
29969
  var external_node_fetch_default = /*#__PURE__*/__webpack_require__.n(external_node_fetch_namespaceObject);
29636
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/attachmentResponse.ts
29970
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/attachment.response.ts
29637
29971
 
29638
29972
  class AttachmentResponse extends BaseResponse {
29639
29973
  constructor(response) {
@@ -29647,7 +29981,7 @@ class AttachmentResponse extends BaseResponse {
29647
29981
  }
29648
29982
  }
29649
29983
 
29650
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/passwordHistoryResponse.ts
29984
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/password-history.response.ts
29651
29985
 
29652
29986
  class PasswordHistoryResponse extends BaseResponse {
29653
29987
  constructor(response) {
@@ -29657,7 +29991,7 @@ class PasswordHistoryResponse extends BaseResponse {
29657
29991
  }
29658
29992
  }
29659
29993
 
29660
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/cipherResponse.ts
29994
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/cipher.response.ts
29661
29995
 
29662
29996
 
29663
29997
 
@@ -29687,6 +30021,7 @@ class CipherResponse extends BaseResponse {
29687
30021
  this.organizationUseTotp = this.getResponseProperty("OrganizationUseTotp");
29688
30022
  this.revisionDate = this.getResponseProperty("RevisionDate");
29689
30023
  this.collectionIds = this.getResponseProperty("CollectionIds");
30024
+ this.creationDate = this.getResponseProperty("CreationDate");
29690
30025
  this.deletedDate = this.getResponseProperty("DeletedDate");
29691
30026
  const login = this.getResponseProperty("Login");
29692
30027
  if (login != null) {
@@ -29720,7 +30055,7 @@ class CipherResponse extends BaseResponse {
29720
30055
  }
29721
30056
  }
29722
30057
 
29723
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/attachmentUploadDataResponse.ts
30058
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/attachment-upload-data.response.ts
29724
30059
 
29725
30060
 
29726
30061
  class AttachmentUploadDataResponse extends BaseResponse {
@@ -29738,7 +30073,7 @@ class AttachmentUploadDataResponse extends BaseResponse {
29738
30073
  }
29739
30074
  }
29740
30075
 
29741
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/authRequestResponse.ts
30076
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/auth-request.response.ts
29742
30077
 
29743
30078
  class AuthRequestResponse extends BaseResponse {
29744
30079
  constructor(response) {
@@ -29754,7 +30089,7 @@ class AuthRequestResponse extends BaseResponse {
29754
30089
  }
29755
30090
  }
29756
30091
 
29757
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/authentication/registerResponse.ts
30092
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/authentication/register.response.ts
29758
30093
 
29759
30094
  class RegisterResponse extends BaseResponse {
29760
30095
  constructor(response) {
@@ -29763,7 +30098,7 @@ class RegisterResponse extends BaseResponse {
29763
30098
  }
29764
30099
  }
29765
30100
 
29766
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/billingHistoryResponse.ts
30101
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/billing-history.response.ts
29767
30102
 
29768
30103
 
29769
30104
  class BillingHistoryResponse extends BaseResponse {
@@ -29785,7 +30120,7 @@ class BillingHistoryResponse extends BaseResponse {
29785
30120
  }
29786
30121
  }
29787
30122
 
29788
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/billingPaymentResponse.ts
30123
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/billing-payment.response.ts
29789
30124
 
29790
30125
 
29791
30126
  class BillingPaymentResponse extends BaseResponse {
@@ -29797,7 +30132,7 @@ class BillingPaymentResponse extends BaseResponse {
29797
30132
  }
29798
30133
  }
29799
30134
 
29800
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/breachAccountResponse.ts
30135
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/breach-account.response.ts
29801
30136
 
29802
30137
  class BreachAccountResponse extends BaseResponse {
29803
30138
  constructor(response) {
@@ -29817,7 +30152,7 @@ class BreachAccountResponse extends BaseResponse {
29817
30152
  }
29818
30153
  }
29819
30154
 
29820
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/selectionReadOnlyResponse.ts
30155
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/selection-read-only.response.ts
29821
30156
 
29822
30157
  class SelectionReadOnlyResponse extends BaseResponse {
29823
30158
  constructor(response) {
@@ -29828,7 +30163,7 @@ class SelectionReadOnlyResponse extends BaseResponse {
29828
30163
  }
29829
30164
  }
29830
30165
 
29831
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/collectionResponse.ts
30166
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/collection.response.ts
29832
30167
 
29833
30168
 
29834
30169
  class CollectionResponse extends BaseResponse {
@@ -29857,7 +30192,7 @@ class CollectionGroupDetailsResponse extends CollectionResponse {
29857
30192
  }
29858
30193
  }
29859
30194
 
29860
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/deviceVerificationResponse.ts
30195
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/device-verification.response.ts
29861
30196
 
29862
30197
  class DeviceVerificationResponse extends BaseResponse {
29863
30198
  constructor(response) {
@@ -29867,7 +30202,7 @@ class DeviceVerificationResponse extends BaseResponse {
29867
30202
  }
29868
30203
  }
29869
30204
 
29870
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/globalDomainResponse.ts
30205
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/global-domain.response.ts
29871
30206
 
29872
30207
  class GlobalDomainResponse extends BaseResponse {
29873
30208
  constructor(response) {
@@ -29878,7 +30213,7 @@ class GlobalDomainResponse extends BaseResponse {
29878
30213
  }
29879
30214
  }
29880
30215
 
29881
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/domainsResponse.ts
30216
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/domains.response.ts
29882
30217
 
29883
30218
 
29884
30219
  class DomainsResponse extends BaseResponse {
@@ -29896,7 +30231,7 @@ class DomainsResponse extends BaseResponse {
29896
30231
  }
29897
30232
  }
29898
30233
 
29899
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/emergencyAccessResponse.ts
30234
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/emergency-access.response.ts
29900
30235
 
29901
30236
 
29902
30237
  class EmergencyAccessGranteeDetailsResponse extends BaseResponse {
@@ -29945,7 +30280,7 @@ class EmergencyAccessViewResponse extends BaseResponse {
29945
30280
  }
29946
30281
  }
29947
30282
 
29948
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/eventResponse.ts
30283
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/event.response.ts
29949
30284
 
29950
30285
  class EventResponse extends BaseResponse {
29951
30286
  constructor(response) {
@@ -29966,10 +30301,11 @@ class EventResponse extends BaseResponse {
29966
30301
  this.deviceType = this.getResponseProperty("DeviceType");
29967
30302
  this.ipAddress = this.getResponseProperty("IpAddress");
29968
30303
  this.installationId = this.getResponseProperty("InstallationId");
30304
+ this.systemUser = this.getResponseProperty("SystemUser");
29969
30305
  }
29970
30306
  }
29971
30307
 
29972
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/groupResponse.ts
30308
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/group.response.ts
29973
30309
 
29974
30310
 
29975
30311
  class GroupResponse extends BaseResponse {
@@ -29993,7 +30329,7 @@ class GroupDetailsResponse extends GroupResponse {
29993
30329
  }
29994
30330
  }
29995
30331
 
29996
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/keyConnectorUserKeyResponse.ts
30332
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/key-connector-user-key.response.ts
29997
30333
 
29998
30334
  class KeyConnectorUserKeyResponse extends BaseResponse {
29999
30335
  constructor(response) {
@@ -30002,7 +30338,7 @@ class KeyConnectorUserKeyResponse extends BaseResponse {
30002
30338
  }
30003
30339
  }
30004
30340
 
30005
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organizationConnectionResponse.ts
30341
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organization-connection.response.ts
30006
30342
 
30007
30343
  class OrganizationConnectionResponse extends BaseResponse {
30008
30344
  constructor(response, configType) {
@@ -30016,7 +30352,7 @@ class OrganizationConnectionResponse extends BaseResponse {
30016
30352
  }
30017
30353
  }
30018
30354
 
30019
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organizationExportResponse.ts
30355
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organization-export.response.ts
30020
30356
 
30021
30357
  class OrganizationExportResponse extends BaseResponse {
30022
30358
  constructor(response) {
@@ -30026,7 +30362,7 @@ class OrganizationExportResponse extends BaseResponse {
30026
30362
  }
30027
30363
  }
30028
30364
 
30029
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organizationSponsorshipSyncStatusResponse.ts
30365
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organization-sponsorship-sync-status.response.ts
30030
30366
 
30031
30367
  class OrganizationSponsorshipSyncStatusResponse extends BaseResponse {
30032
30368
  constructor(response) {
@@ -30038,7 +30374,7 @@ class OrganizationSponsorshipSyncStatusResponse extends BaseResponse {
30038
30374
  }
30039
30375
  }
30040
30376
 
30041
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organizationUserBulkPublicKeyResponse.ts
30377
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organization-user-bulk-public-key.response.ts
30042
30378
 
30043
30379
  class OrganizationUserBulkPublicKeyResponse extends BaseResponse {
30044
30380
  constructor(response) {
@@ -30049,7 +30385,7 @@ class OrganizationUserBulkPublicKeyResponse extends BaseResponse {
30049
30385
  }
30050
30386
  }
30051
30387
 
30052
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organizationUserBulkResponse.ts
30388
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organization-user-bulk.response.ts
30053
30389
 
30054
30390
  class OrganizationUserBulkResponse extends BaseResponse {
30055
30391
  constructor(response) {
@@ -30059,7 +30395,7 @@ class OrganizationUserBulkResponse extends BaseResponse {
30059
30395
  }
30060
30396
  }
30061
30397
 
30062
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organizationUserResponse.ts
30398
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/organization-user.response.ts
30063
30399
 
30064
30400
 
30065
30401
 
@@ -30105,7 +30441,7 @@ class OrganizationUserResetPasswordDetailsReponse extends BaseResponse {
30105
30441
  }
30106
30442
  }
30107
30443
 
30108
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/policyResponse.ts
30444
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/policy.response.ts
30109
30445
 
30110
30446
  class PolicyResponse extends BaseResponse {
30111
30447
  constructor(response) {
@@ -30118,7 +30454,7 @@ class PolicyResponse extends BaseResponse {
30118
30454
  }
30119
30455
  }
30120
30456
 
30121
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/preloginResponse.ts
30457
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/prelogin.response.ts
30122
30458
 
30123
30459
  class PreloginResponse extends BaseResponse {
30124
30460
  constructor(response) {
@@ -30128,7 +30464,7 @@ class PreloginResponse extends BaseResponse {
30128
30464
  }
30129
30465
  }
30130
30466
 
30131
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/provider/providerOrganizationResponse.ts
30467
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/provider/provider-organization.response.ts
30132
30468
 
30133
30469
  class ProviderOrganizationResponse extends BaseResponse {
30134
30470
  constructor(response) {
@@ -30152,24 +30488,12 @@ class ProviderOrganizationOrganizationDetailsResponse extends ProviderOrganizati
30152
30488
  }
30153
30489
  }
30154
30490
 
30155
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/provider/providerResponse.ts
30156
-
30157
- class ProviderResponse extends BaseResponse {
30158
- constructor(response) {
30159
- super(response);
30160
- this.id = this.getResponseProperty("Id");
30161
- this.name = this.getResponseProperty("Name");
30162
- this.businessName = this.getResponseProperty("BusinessName");
30163
- this.billingEmail = this.getResponseProperty("BillingEmail");
30164
- }
30165
- }
30166
-
30167
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/provider/providerUserBulkPublicKeyResponse.ts
30491
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/provider/provider-user-bulk-public-key.response.ts
30168
30492
 
30169
30493
  class ProviderUserBulkPublicKeyResponse extends OrganizationUserBulkPublicKeyResponse {
30170
30494
  }
30171
30495
 
30172
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/provider/providerUserBulkResponse.ts
30496
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/provider/provider-user-bulk.response.ts
30173
30497
 
30174
30498
  class ProviderUserBulkResponse extends BaseResponse {
30175
30499
  constructor(response) {
@@ -30179,7 +30503,7 @@ class ProviderUserBulkResponse extends BaseResponse {
30179
30503
  }
30180
30504
  }
30181
30505
 
30182
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/provider/providerUserResponse.ts
30506
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/provider/provider-user.response.ts
30183
30507
 
30184
30508
 
30185
30509
  class ProviderUserResponse extends BaseResponse {
@@ -30200,7 +30524,19 @@ class ProviderUserUserDetailsResponse extends ProviderUserResponse {
30200
30524
  }
30201
30525
  }
30202
30526
 
30203
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/sendAccessResponse.ts
30527
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/provider/provider.response.ts
30528
+
30529
+ class ProviderResponse extends BaseResponse {
30530
+ constructor(response) {
30531
+ super(response);
30532
+ this.id = this.getResponseProperty("Id");
30533
+ this.name = this.getResponseProperty("Name");
30534
+ this.businessName = this.getResponseProperty("BusinessName");
30535
+ this.billingEmail = this.getResponseProperty("BillingEmail");
30536
+ }
30537
+ }
30538
+
30539
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/send-access.response.ts
30204
30540
 
30205
30541
 
30206
30542
 
@@ -30223,7 +30559,7 @@ class SendAccessResponse extends BaseResponse {
30223
30559
  }
30224
30560
  }
30225
30561
 
30226
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/sendFileDownloadDataResponse.ts
30562
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/send-file-download-data.response.ts
30227
30563
 
30228
30564
  class SendFileDownloadDataResponse extends BaseResponse {
30229
30565
  constructor(response) {
@@ -30235,7 +30571,7 @@ class SendFileDownloadDataResponse extends BaseResponse {
30235
30571
  }
30236
30572
  }
30237
30573
 
30238
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/sendResponse.ts
30574
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/send.response.ts
30239
30575
 
30240
30576
 
30241
30577
 
@@ -30267,7 +30603,7 @@ class SendResponse extends BaseResponse {
30267
30603
  }
30268
30604
  }
30269
30605
 
30270
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/sendFileUploadDataResponse.ts
30606
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/send-file-upload-data.response.ts
30271
30607
 
30272
30608
 
30273
30609
  class SendFileUploadDataResponse extends BaseResponse {
@@ -30281,7 +30617,7 @@ class SendFileUploadDataResponse extends BaseResponse {
30281
30617
  }
30282
30618
  }
30283
30619
 
30284
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/ssoPreValidateResponse.ts
30620
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/sso-pre-validate.response.ts
30285
30621
 
30286
30622
  class SsoPreValidateResponse extends BaseResponse {
30287
30623
  constructor(response) {
@@ -30290,7 +30626,7 @@ class SsoPreValidateResponse extends BaseResponse {
30290
30626
  }
30291
30627
  }
30292
30628
 
30293
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/syncResponse.ts
30629
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/sync.response.ts
30294
30630
 
30295
30631
 
30296
30632
 
@@ -30338,7 +30674,7 @@ class SyncResponse extends BaseResponse {
30338
30674
  }
30339
30675
  }
30340
30676
 
30341
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/taxRateResponse.ts
30677
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/tax-rate.response.ts
30342
30678
 
30343
30679
  class TaxRateResponse extends BaseResponse {
30344
30680
  constructor(response) {
@@ -30351,7 +30687,7 @@ class TaxRateResponse extends BaseResponse {
30351
30687
  }
30352
30688
  }
30353
30689
 
30354
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/twoFactorAuthenticatorResponse.ts
30690
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/two-factor-authenticator.response.ts
30355
30691
 
30356
30692
  class TwoFactorAuthenticatorResponse extends BaseResponse {
30357
30693
  constructor(response) {
@@ -30361,7 +30697,7 @@ class TwoFactorAuthenticatorResponse extends BaseResponse {
30361
30697
  }
30362
30698
  }
30363
30699
 
30364
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/twoFactorDuoResponse.ts
30700
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/two-factor-duo.response.ts
30365
30701
 
30366
30702
  class TwoFactorDuoResponse extends BaseResponse {
30367
30703
  constructor(response) {
@@ -30373,7 +30709,7 @@ class TwoFactorDuoResponse extends BaseResponse {
30373
30709
  }
30374
30710
  }
30375
30711
 
30376
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/twoFactorEmailResponse.ts
30712
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/two-factor-email.response.ts
30377
30713
 
30378
30714
  class TwoFactorEmailResponse extends BaseResponse {
30379
30715
  constructor(response) {
@@ -30383,7 +30719,7 @@ class TwoFactorEmailResponse extends BaseResponse {
30383
30719
  }
30384
30720
  }
30385
30721
 
30386
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/twoFactorProviderResponse.ts
30722
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/two-factor-provider.response.ts
30387
30723
 
30388
30724
  class TwoFactorProviderResponse extends BaseResponse {
30389
30725
  constructor(response) {
@@ -30393,7 +30729,7 @@ class TwoFactorProviderResponse extends BaseResponse {
30393
30729
  }
30394
30730
  }
30395
30731
 
30396
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/twoFactorRescoverResponse.ts
30732
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/two-factor-recover.response.ts
30397
30733
 
30398
30734
  class TwoFactorRecoverResponse extends BaseResponse {
30399
30735
  constructor(response) {
@@ -30402,7 +30738,7 @@ class TwoFactorRecoverResponse extends BaseResponse {
30402
30738
  }
30403
30739
  }
30404
30740
 
30405
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/twoFactorWebAuthnResponse.ts
30741
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/two-factor-web-authn.response.ts
30406
30742
 
30407
30743
 
30408
30744
  class TwoFactorWebAuthnResponse extends BaseResponse {
@@ -30441,7 +30777,7 @@ class ChallengeResponse extends BaseResponse {
30441
30777
  }
30442
30778
  }
30443
30779
 
30444
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/twoFactorYubiKeyResponse.ts
30780
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/two-factor-yubi-key.response.ts
30445
30781
 
30446
30782
  class TwoFactorYubiKeyResponse extends BaseResponse {
30447
30783
  constructor(response) {
@@ -30456,7 +30792,7 @@ class TwoFactorYubiKeyResponse extends BaseResponse {
30456
30792
  }
30457
30793
  }
30458
30794
 
30459
- ;// CONCATENATED MODULE: ../../libs/common/src/models/response/userKeyResponse.ts
30795
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/response/user-key.response.ts
30460
30796
 
30461
30797
  class UserKeyResponse extends BaseResponse {
30462
30798
  constructor(response) {
@@ -30660,9 +30996,7 @@ class ApiService {
30660
30996
  }
30661
30997
  postPrelogin(request) {
30662
30998
  return api_service_awaiter(this, void 0, void 0, function* () {
30663
- const r = yield this.send("POST", "/accounts/prelogin", request, false, true, this.platformUtilsService.isDev()
30664
- ? this.environmentService.getIdentityUrl()
30665
- : this.environmentService.getApiUrl());
30999
+ const r = yield this.send("POST", "/accounts/prelogin", request, false, true, this.environmentService.getIdentityUrl());
30666
31000
  return new PreloginResponse(r);
30667
31001
  });
30668
31002
  }
@@ -30695,9 +31029,7 @@ class ApiService {
30695
31029
  }
30696
31030
  postRegister(request) {
30697
31031
  return api_service_awaiter(this, void 0, void 0, function* () {
30698
- const r = yield this.send("POST", "/accounts/register", request, false, true, this.platformUtilsService.isDev()
30699
- ? this.environmentService.getIdentityUrl()
30700
- : this.environmentService.getApiUrl());
31032
+ const r = yield this.send("POST", "/accounts/register", request, false, true, this.environmentService.getIdentityUrl());
30701
31033
  return new RegisterResponse(r);
30702
31034
  });
30703
31035
  }
@@ -30921,6 +31253,12 @@ class ApiService {
30921
31253
  return new CipherResponse(r);
30922
31254
  });
30923
31255
  }
31256
+ putPartialCipher(id, request) {
31257
+ return api_service_awaiter(this, void 0, void 0, function* () {
31258
+ const r = yield this.send("PUT", "/ciphers/" + id + "/partial", request, true, true);
31259
+ return new CipherResponse(r);
31260
+ });
31261
+ }
30924
31262
  putCipherAdmin(id, request) {
30925
31263
  return api_service_awaiter(this, void 0, void 0, function* () {
30926
31264
  const r = yield this.send("PUT", "/ciphers/" + id + "/admin", request, true, true);
@@ -31426,6 +31764,13 @@ class ApiService {
31426
31764
  return new DeviceVerificationResponse(r);
31427
31765
  });
31428
31766
  }
31767
+ getKnownDevice(email, deviceIdentifier) {
31768
+ return api_service_awaiter(this, void 0, void 0, function* () {
31769
+ const path = `/devices/knowndevice/${email}/${deviceIdentifier}`;
31770
+ const r = yield this.send("GET", path, null, false, true);
31771
+ return r;
31772
+ });
31773
+ }
31429
31774
  // Emergency Access APIs
31430
31775
  getEmergencyAccessTrusted() {
31431
31776
  return api_service_awaiter(this, void 0, void 0, function* () {
@@ -31919,7 +32264,7 @@ class ApiService {
31919
32264
  const clientSecret = yield this.tokenService.getClientSecret();
31920
32265
  const appId = yield this.appIdService.getAppId();
31921
32266
  const deviceRequest = new DeviceRequest(appId, this.platformUtilsService);
31922
- const tokenRequest = new ApiTokenRequest(clientId, clientSecret, new TokenRequestTwoFactor(), deviceRequest);
32267
+ const tokenRequest = new ApiTokenRequest(clientId, clientSecret, new TokenTwoFactorRequest(), deviceRequest);
31923
32268
  const response = yield this.postIdentityToken(tokenRequest);
31924
32269
  if (!(response instanceof IdentityTokenResponse)) {
31925
32270
  throw new Error("Invalid response received when refreshing api token");
@@ -31987,13 +32332,6 @@ class ApiService {
31987
32332
  }
31988
32333
  handleError(response, tokenError, authed) {
31989
32334
  return api_service_awaiter(this, void 0, void 0, function* () {
31990
- if (authed &&
31991
- ((tokenError && response.status === 400) ||
31992
- response.status === 401 ||
31993
- response.status === 403)) {
31994
- yield this.logoutCallback(true);
31995
- return null;
31996
- }
31997
32335
  let responseJson = null;
31998
32336
  if (this.isJsonResponse(response)) {
31999
32337
  responseJson = yield response.json();
@@ -32001,6 +32339,17 @@ class ApiService {
32001
32339
  else if (this.isTextResponse(response)) {
32002
32340
  responseJson = { Message: yield response.text() };
32003
32341
  }
32342
+ if (authed) {
32343
+ if (response.status === 401 ||
32344
+ response.status === 403 ||
32345
+ (tokenError &&
32346
+ response.status === 400 &&
32347
+ responseJson != null &&
32348
+ responseJson.error === "invalid_grant")) {
32349
+ yield this.logoutCallback(true);
32350
+ return null;
32351
+ }
32352
+ }
32004
32353
  return new ErrorResponse(responseJson, response.status, tokenError);
32005
32354
  });
32006
32355
  }
@@ -32068,7 +32417,7 @@ class NodeApiService extends ApiService {
32068
32417
  const external_crypto_namespaceObject = require("crypto");
32069
32418
  ;// CONCATENATED MODULE: external "node-forge"
32070
32419
  const external_node_forge_namespaceObject = require("node-forge");
32071
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/decryptParameters.ts
32420
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/decrypt-parameters.ts
32072
32421
  class DecryptParameters {
32073
32422
  }
32074
32423
 
@@ -33194,7 +33543,7 @@ class LockCommand {
33194
33543
 
33195
33544
  ;// CONCATENATED MODULE: external "http"
33196
33545
  const external_http_namespaceObject = require("http");
33197
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/logInCredentials.ts
33546
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/log-in-credentials.ts
33198
33547
 
33199
33548
  class PasswordLogInCredentials {
33200
33549
  constructor(email, masterPassword, captchaToken, twoFactor) {
@@ -33234,16 +33583,16 @@ class PasswordlessLogInCredentials {
33234
33583
  }
33235
33584
  }
33236
33585
 
33237
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/twoFactorEmailRequest.ts
33586
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/two-factor-email.request.ts
33238
33587
 
33239
33588
  class TwoFactorEmailRequest extends SecretVerificationRequest {
33240
33589
  }
33241
33590
 
33242
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/organizationUserResetPasswordRequest.ts
33591
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/organization-user-reset-password.request.ts
33243
33592
  class OrganizationUserResetPasswordRequest {
33244
33593
  }
33245
33594
 
33246
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/updateTempPasswordRequest.ts
33595
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/update-temp-password.request.ts
33247
33596
 
33248
33597
  class UpdateTempPasswordRequest extends OrganizationUserResetPasswordRequest {
33249
33598
  }
@@ -33270,6 +33619,7 @@ var login_command_awaiter = (undefined && undefined.__awaiter) || function (this
33270
33619
 
33271
33620
 
33272
33621
 
33622
+
33273
33623
  class login_command_LoginCommand {
33274
33624
  constructor(authService, apiService, i18nService, environmentService, passwordGenerationService, cryptoFunctionService, platformUtilsService, stateService, cryptoService, policyService, twoFactorService, clientId) {
33275
33625
  this.authService = authService;
@@ -33374,7 +33724,7 @@ class login_command_LoginCommand {
33374
33724
  }
33375
33725
  const twoFactor = twoFactorToken == null
33376
33726
  ? null
33377
- : new TokenRequestTwoFactor(twoFactorMethod, twoFactorToken, false);
33727
+ : new TokenTwoFactorRequest(twoFactorMethod, twoFactorToken, false);
33378
33728
  try {
33379
33729
  if (this.validatedParams != null) {
33380
33730
  yield this.validatedParams();
@@ -33462,10 +33812,10 @@ class login_command_LoginCommand {
33462
33812
  return Response.badRequest("Code is required.");
33463
33813
  }
33464
33814
  }
33465
- response = yield this.authService.logInTwoFactor(new TokenRequestTwoFactor(selectedProvider.type, twoFactorToken), null);
33815
+ response = yield this.authService.logInTwoFactor(new TokenTwoFactorRequest(selectedProvider.type, twoFactorToken), null);
33466
33816
  }
33467
33817
  if (response.captchaSiteKey) {
33468
- const twoFactorRequest = new TokenRequestTwoFactor(selectedProvider.type, twoFactorToken);
33818
+ const twoFactorRequest = new TokenTwoFactorRequest(selectedProvider.type, twoFactorToken);
33469
33819
  const handledResponse = yield this.handleCaptchaRequired(twoFactorRequest);
33470
33820
  // Error Response
33471
33821
  if (handledResponse instanceof Response) {
@@ -33557,7 +33907,7 @@ class login_command_LoginCommand {
33557
33907
  });
33558
33908
  const masterPasswordHint = hint.input;
33559
33909
  // Retrieve details for key generation
33560
- const enforcedPolicyOptions = yield this.policyService.getMasterPasswordPolicyOptions();
33910
+ const enforcedPolicyOptions = yield (0,external_rxjs_namespaceObject.firstValueFrom)(this.policyService.masterPasswordPolicyOptions$());
33561
33911
  const kdf = yield this.stateService.getKdfType();
33562
33912
  const kdfIterations = yield this.stateService.getKdfIterations();
33563
33913
  if (enforcedPolicyOptions != null &&
@@ -33844,7 +34194,7 @@ class FileResponse {
33844
34194
  }
33845
34195
  }
33846
34196
 
33847
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/organizationUserConfirmRequest.ts
34197
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/organization-user-confirm.request.ts
33848
34198
  class OrganizationUserConfirmRequest {
33849
34199
  }
33850
34200
 
@@ -33920,7 +34270,7 @@ class confirm_command_Options {
33920
34270
  }
33921
34271
  }
33922
34272
 
33923
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/selectionReadOnlyRequest.ts
34273
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/selection-read-only.request.ts
33924
34274
  class SelectionReadOnlyRequest {
33925
34275
  constructor(id, readOnly, hidePasswords) {
33926
34276
  this.id = id;
@@ -33972,6 +34322,9 @@ class cipherResponse_CipherResponse extends CipherWithIdExport {
33972
34322
  this.attachments = o.attachments.map((a) => new attachmentResponse_AttachmentResponse(a));
33973
34323
  }
33974
34324
  this.revisionDate = o.revisionDate;
34325
+ if (o.creationDate != null) {
34326
+ this.creationDate = o.creationDate;
34327
+ }
33975
34328
  this.deletedDate = o.deletedDate;
33976
34329
  if (o.passwordHistory != null) {
33977
34330
  this.passwordHistory = o.passwordHistory.map((h) => new passwordHistoryResponse_PasswordHistoryResponse(h));
@@ -34086,7 +34439,7 @@ class CreateCommand {
34086
34439
  return create_command_awaiter(this, void 0, void 0, function* () {
34087
34440
  const cipher = yield this.cipherService.encrypt(CipherExport.toView(req));
34088
34441
  try {
34089
- yield this.cipherService.saveWithServer(cipher);
34442
+ yield this.cipherService.createWithServer(cipher);
34090
34443
  const newCipher = yield this.cipherService.get(cipher.id);
34091
34444
  const decCipher = yield newCipher.decrypt();
34092
34445
  const res = new cipherResponse_CipherResponse(decCipher);
@@ -34422,7 +34775,7 @@ class EditCommand {
34422
34775
  cipherView = CipherExport.toView(req, cipherView);
34423
34776
  const encCipher = yield this.cipherService.encrypt(cipherView);
34424
34777
  try {
34425
- yield this.cipherService.saveWithServer(encCipher);
34778
+ yield this.cipherService.updateWithServer(encCipher);
34426
34779
  const updatedCipher = yield this.cipherService.get(cipher.id);
34427
34780
  const decCipher = yield updatedCipher.decrypt();
34428
34781
  const res = new cipherResponse_CipherResponse(decCipher);
@@ -35154,7 +35507,7 @@ class GetCommand extends DownloadCommand {
35154
35507
  return get_command_awaiter(this, void 0, void 0, function* () {
35155
35508
  let org = null;
35156
35509
  if (Utils.isGuid(id)) {
35157
- org = yield this.organizationService.get(id);
35510
+ org = yield this.organizationService.getFromState(id);
35158
35511
  }
35159
35512
  else if (id.trim() !== "") {
35160
35513
  let orgs = yield this.organizationService.getAll();
@@ -35421,7 +35774,7 @@ class ListCommand {
35421
35774
  if (!Utils.isGuid(options.organizationId)) {
35422
35775
  return Response.badRequest("`" + options.organizationId + "` is not a GUID.");
35423
35776
  }
35424
- const organization = yield this.organizationService.get(options.organizationId);
35777
+ const organization = yield this.organizationService.getFromState(options.organizationId);
35425
35778
  if (organization == null) {
35426
35779
  return Response.error("Organization not found.");
35427
35780
  }
@@ -35456,7 +35809,7 @@ class ListCommand {
35456
35809
  if (!Utils.isGuid(options.organizationId)) {
35457
35810
  return Response.badRequest("`" + options.organizationId + "` is not a GUID.");
35458
35811
  }
35459
- const organization = yield this.organizationService.get(options.organizationId);
35812
+ const organization = yield this.organizationService.getFromState(options.organizationId);
35460
35813
  if (organization == null) {
35461
35814
  return Response.error("Organization not found.");
35462
35815
  }
@@ -36194,7 +36547,6 @@ class ConvertToKeyConnectorCommand {
36194
36547
  else if (answer.convert === "leave") {
36195
36548
  yield this.organizationApiService.leave(organization.id);
36196
36549
  yield this.keyConnectorService.removeConvertAccountRequired();
36197
- yield this.syncService.fullSync(true);
36198
36550
  return Response.success();
36199
36551
  }
36200
36552
  else {
@@ -37039,7 +37391,7 @@ class Program extends BaseProgram {
37039
37391
  }
37040
37392
  }
37041
37393
 
37042
- ;// CONCATENATED MODULE: ../../libs/common/src/models/view/sendAccessView.ts
37394
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/view/send-access.view.ts
37043
37395
 
37044
37396
 
37045
37397
  class SendAccessView {
@@ -37061,8 +37413,8 @@ class SendAccessView {
37061
37413
  }
37062
37414
  }
37063
37415
 
37064
- ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/sendAccess.ts
37065
- var sendAccess_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
37416
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/domain/send-access.ts
37417
+ var send_access_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
37066
37418
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37067
37419
  return new (P || (P = Promise))(function (resolve, reject) {
37068
37420
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -37101,7 +37453,7 @@ class SendAccess extends Domain {
37101
37453
  }
37102
37454
  }
37103
37455
  decrypt(key) {
37104
- return sendAccess_awaiter(this, void 0, void 0, function* () {
37456
+ return send_access_awaiter(this, void 0, void 0, function* () {
37105
37457
  const model = new SendAccessView(this);
37106
37458
  yield this.decryptObj(model, {
37107
37459
  name: null,
@@ -37121,7 +37473,7 @@ class SendAccess extends Domain {
37121
37473
  }
37122
37474
  }
37123
37475
 
37124
- ;// CONCATENATED MODULE: ../../libs/common/src/models/request/sendAccessRequest.ts
37476
+ ;// CONCATENATED MODULE: ../../libs/common/src/models/request/send-access.request.ts
37125
37477
  class SendAccessRequest {
37126
37478
  }
37127
37479
 
@@ -38191,7 +38543,7 @@ class ImportCommand {
38191
38543
  return import_command_awaiter(this, void 0, void 0, function* () {
38192
38544
  const organizationId = options.organizationid;
38193
38545
  if (organizationId != null) {
38194
- const organization = yield this.organizationService.get(organizationId);
38546
+ const organization = yield this.organizationService.getFromState(organizationId);
38195
38547
  if (organization == null) {
38196
38548
  return Response.badRequest(`You do not belong to an organization with the ID of ${organizationId}. Check the organization ID and sync your vault.`);
38197
38549
  }
@@ -38740,6 +39092,7 @@ var bw_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argum
38740
39092
 
38741
39093
 
38742
39094
 
39095
+
38743
39096
 
38744
39097
 
38745
39098
  // Polyfills
@@ -38772,7 +39125,7 @@ class Main {
38772
39125
  this.platformUtilsService = new CliPlatformUtilsService(ClientType.Cli, packageJson);
38773
39126
  this.logService = new ConsoleLogService(this.platformUtilsService.isDev(), (level) => process.env.BITWARDENCLI_DEBUG !== "true" && level <= LogLevelType.Info);
38774
39127
  this.cryptoFunctionService = new NodeCryptoFunctionService();
38775
- this.encryptService = new EncryptService(this.cryptoFunctionService, this.logService, true);
39128
+ this.encryptService = new EncryptServiceImplementation(this.cryptoFunctionService, this.logService, true);
38776
39129
  this.storageService = new LowdbStorageService(this.logService, null, p, false, true);
38777
39130
  this.secureStorageService = new NodeEnvSecureStorageService(this.storageService, this.logService, () => this.cryptoService);
38778
39131
  this.memoryStorageService = new MemoryStorageService();
@@ -38789,11 +39142,12 @@ class Main {
38789
39142
  this.platformUtilsService.getDeviceString().toUpperCase() +
38790
39143
  ")";
38791
39144
  this.apiService = new NodeApiService(this.tokenService, this.platformUtilsService, this.environmentService, this.appIdService, (expired) => bw_awaiter(this, void 0, void 0, function* () { return yield this.logout(); }), customUserAgent);
38792
- this.organizationApiService = new OrganizationApiService(this.apiService);
39145
+ this.syncNotifierService = new SyncNotifierService();
39146
+ this.organizationApiService = new OrganizationApiService(this.apiService, this.syncService);
38793
39147
  this.containerService = new ContainerService(this.cryptoService, this.encryptService);
38794
39148
  this.settingsService = new SettingsService(this.stateService);
38795
39149
  this.fileUploadService = new FileUploadService(this.logService, this.apiService);
38796
- this.cipherService = new CipherService(this.cryptoService, this.settingsService, this.apiService, this.fileUploadService, this.i18nService, null, this.logService, this.stateService);
39150
+ this.cipherService = new CipherService(this.cryptoService, this.settingsService, this.apiService, this.fileUploadService, this.i18nService, null, this.logService, this.stateService, this.encryptService);
38797
39151
  this.broadcasterService = new BroadcasterService();
38798
39152
  this.folderService = new FolderService(this.cryptoService, this.i18nService, this.cipherService, this.stateService);
38799
39153
  this.folderApiService = new FolderApiService(this.folderService, this.apiService);
@@ -38809,7 +39163,7 @@ class Main {
38809
39163
  const lockedCallback = () => bw_awaiter(this, void 0, void 0, function* () { return yield this.cryptoService.clearStoredKey(KeySuffixOptions.Auto); });
38810
39164
  this.vaultTimeoutSettingsService = new VaultTimeoutSettingsService(this.cryptoService, this.tokenService, this.policyService, this.stateService);
38811
39165
  this.vaultTimeoutService = new VaultTimeoutService(this.cipherService, this.folderService, this.collectionService, this.cryptoService, this.platformUtilsService, this.messagingService, this.searchService, this.keyConnectorService, this.stateService, this.authService, this.vaultTimeoutSettingsService, lockedCallback, null);
38812
- this.syncService = new SyncService(this.apiService, this.settingsService, this.folderService, this.cipherService, this.cryptoService, this.collectionService, this.messagingService, this.policyService, this.sendService, this.logService, this.keyConnectorService, this.stateService, this.organizationService, this.providerService, this.folderApiService, (expired) => bw_awaiter(this, void 0, void 0, function* () { return yield this.logout(); }));
39166
+ this.syncService = new SyncService(this.apiService, this.settingsService, this.folderService, this.cipherService, this.cryptoService, this.collectionService, this.messagingService, this.policyService, this.sendService, this.logService, this.keyConnectorService, this.stateService, this.providerService, this.folderApiService, this.organizationService, (expired) => bw_awaiter(this, void 0, void 0, function* () { return yield this.logout(); }));
38813
39167
  this.passwordGenerationService = new PasswordGenerationService(this.cryptoService, this.policyService, this.stateService);
38814
39168
  this.totpService = new TotpService(this.cryptoFunctionService, this.logService);
38815
39169
  this.importService = new ImportService(this.cipherService, this.folderService, this.apiService, this.i18nService, this.collectionService, this.cryptoService);