@lifeready/core 5.0.11 → 5.0.12

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.
@@ -3469,6 +3469,11 @@
3469
3469
  // merge the doc synchronously.
3470
3470
  this.lrMutations.forEach(function (lrMutation, idx) {
3471
3471
  var e_1, _a;
3472
+ // Sometimes typing won't catch everything. So need to dynamically check the
3473
+ // type to be sure.
3474
+ if (!(lrMutation instanceof LrMutationBase)) {
3475
+ throw new KcBadLogicException('An mutation in the array is not of type LrMutationBase.');
3476
+ }
3472
3477
  var _b = lrMutation.lrMutationData, mutation = _b.mutation, variables = _b.variables;
3473
3478
  var childMutationNode = getMutation(mutation);
3474
3479
  // Prefixing all mutation fields so they don't conflict.
@@ -7822,6 +7827,22 @@
7822
7827
  Auth2Service.prototype.debugClearUser = function () {
7823
7828
  this.user = null;
7824
7829
  };
7830
+ Auth2Service.prototype.getCurrentUserAttibutes = function () {
7831
+ return __awaiter(this, void 0, void 0, function () {
7832
+ var cognitoUser, userAttributes;
7833
+ return __generator(this, function (_b) {
7834
+ switch (_b.label) {
7835
+ case 0: return [4 /*yield*/, this.cognito.currentAuthenticatedUser()];
7836
+ case 1:
7837
+ cognitoUser = _b.sent();
7838
+ return [4 /*yield*/, this.cognito.userAttributes(cognitoUser)];
7839
+ case 2:
7840
+ userAttributes = _b.sent();
7841
+ return [2 /*return*/, userAttributes];
7842
+ }
7843
+ });
7844
+ });
7845
+ };
7825
7846
  return Auth2Service;
7826
7847
  }(LrService));
7827
7848
  exports.Auth2Service.CHALLENGE_TIMEOUT = 1000 * 60 * 5;