@lifeready/core 9.0.1 → 9.0.6

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.
@@ -3829,10 +3829,18 @@
3829
3829
  return connection.edges.map(function (edge) { return edge.node; });
3830
3830
  }
3831
3831
  function toIdKeyPair(t) {
3832
- return {
3833
- id: t.id,
3834
- keyId: t.keyId,
3835
- };
3832
+ if (t === undefined) {
3833
+ return undefined;
3834
+ }
3835
+ else if (t === null) {
3836
+ return null;
3837
+ }
3838
+ else {
3839
+ return {
3840
+ id: t.id,
3841
+ keyId: t.keyId,
3842
+ };
3843
+ }
3836
3844
  }
3837
3845
  (function (UserDeleteState) {
3838
3846
  UserDeleteState["REQUESTED"] = "REQUESTED";
@@ -3958,8 +3966,11 @@
3958
3966
  ScenarioLastClaimState["RESET"] = "RESET";
3959
3967
  })(exports.ScenarioLastClaimState || (exports.ScenarioLastClaimState = {}));
3960
3968
  (function (LinkTypeField) {
3969
+ // HARD links will persist the child as long as the parent exists
3961
3970
  LinkTypeField["HARD"] = "HARD";
3971
+ // SOFT links will provides permission inheritance but will not persist the child if the parent is deleted
3962
3972
  LinkTypeField["SOFT"] = "SOFT";
3973
+ // REFERENCE links do not provide permission inheritance and will not persist the child if the parent is deleted
3963
3974
  LinkTypeField["REFERENCE"] = "REFERENCE";
3964
3975
  })(exports.LinkTypeField || (exports.LinkTypeField = {}));
3965
3976
  (function (BillingPeriodField) {
@@ -10272,27 +10283,30 @@
10272
10283
  };
10273
10284
  RegisterService.prototype.hibpBreachedAccounts = function (account) {
10274
10285
  return __awaiter(this, void 0, void 0, function () {
10275
- var response, error_1;
10276
- return __generator(this, function (_a) {
10277
- switch (_a.label) {
10286
+ var response, _a, _b, _c, error_1;
10287
+ return __generator(this, function (_d) {
10288
+ switch (_d.label) {
10278
10289
  case 0:
10279
- _a.trys.push([0, 2, , 3]);
10280
- return [4 /*yield*/, this.http
10281
- .get(this.config.authUrl + "users/hibp/breachedaccount/" + account + "/?truncateResponse=false")
10282
- .toPromise()];
10283
- case 1:
10284
- response = _a.sent();
10285
- return [2 /*return*/, response];
10290
+ _d.trys.push([0, 3, , 4]);
10291
+ _b = (_a = this.http)
10292
+ .get;
10293
+ _c = [this.config.authUrl + "users/hibp/breachedaccount/" + account + "/?truncateResponse=false"];
10294
+ return [4 /*yield*/, httpOptions(this.auth, this.config)];
10295
+ case 1: return [4 /*yield*/, _b.apply(_a, _c.concat([_d.sent()]))
10296
+ .toPromise()];
10286
10297
  case 2:
10287
- error_1 = _a.sent();
10298
+ response = _d.sent();
10299
+ return [2 /*return*/, response];
10300
+ case 3:
10301
+ error_1 = _d.sent();
10288
10302
  if (error_1.status === 404) {
10289
10303
  return [2 /*return*/, null];
10290
10304
  }
10291
10305
  else {
10292
10306
  throw error_1;
10293
10307
  }
10294
- return [3 /*break*/, 3];
10295
- case 3: return [2 /*return*/];
10308
+ return [3 /*break*/, 4];
10309
+ case 4: return [2 /*return*/];
10296
10310
  }
10297
10311
  });
10298
10312
  });