oro-sdk-apis 1.8.1 → 1.8.4

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.
@@ -2076,6 +2076,7 @@ var GuardService = /*#__PURE__*/function () {
2076
2076
  * without authentication
2077
2077
  *
2078
2078
  * @param identityID Unique id of the identity to retrieve
2079
+ * @param skipCache (default: false) will skip identity cache (not even update it)
2079
2080
  * @returns IdentityResponse
2080
2081
  */
2081
2082
  ;
@@ -2083,32 +2084,46 @@ var GuardService = /*#__PURE__*/function () {
2083
2084
  _proto.identityGet =
2084
2085
  /*#__PURE__*/
2085
2086
  function () {
2086
- var _identityGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(identityID) {
2087
+ var _identityGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(identityID, skipCache) {
2087
2088
  var _tokens$accessToken, _tokens$refreshToken;
2088
2089
 
2089
- var tokens, cacheKey;
2090
+ var tokens, cacheKey, identity;
2090
2091
  return runtime_1.wrap(function _callee6$(_context6) {
2091
2092
  while (1) {
2092
2093
  switch (_context6.prev = _context6.next) {
2093
2094
  case 0:
2095
+ if (skipCache === void 0) {
2096
+ skipCache = false;
2097
+ }
2098
+
2094
2099
  tokens = this.api.getTokens();
2095
2100
  cacheKey = ((_tokens$accessToken = tokens.accessToken) != null ? _tokens$accessToken : '') + ((_tokens$refreshToken = tokens.refreshToken) != null ? _tokens$refreshToken : '') + identityID;
2096
2101
 
2097
- if (!(!tokens.accessToken || !this.identityCache[cacheKey])) {
2098
- _context6.next = 6;
2102
+ if (!(skipCache || !tokens.accessToken || !this.identityCache[cacheKey])) {
2103
+ _context6.next = 10;
2099
2104
  break;
2100
2105
  }
2101
2106
 
2102
- _context6.next = 5;
2107
+ _context6.next = 6;
2103
2108
  return this.api.get(this.baseURL + "/v1/identities/" + identityID);
2104
2109
 
2105
- case 5:
2106
- this.identityCache[cacheKey] = _context6.sent;
2107
-
2108
2110
  case 6:
2111
+ identity = _context6.sent;
2112
+
2113
+ if (!skipCache) {
2114
+ _context6.next = 9;
2115
+ break;
2116
+ }
2117
+
2118
+ return _context6.abrupt("return", identity);
2119
+
2120
+ case 9:
2121
+ this.identityCache[cacheKey] = identity;
2122
+
2123
+ case 10:
2109
2124
  return _context6.abrupt("return", this.identityCache[cacheKey]);
2110
2125
 
2111
- case 7:
2126
+ case 11:
2112
2127
  case "end":
2113
2128
  return _context6.stop();
2114
2129
  }
@@ -2116,7 +2131,7 @@ var GuardService = /*#__PURE__*/function () {
2116
2131
  }, _callee6, this);
2117
2132
  }));
2118
2133
 
2119
- function identityGet(_x5) {
2134
+ function identityGet(_x5, _x6) {
2120
2135
  return _identityGet.apply(this, arguments);
2121
2136
  }
2122
2137
 
@@ -2169,7 +2184,7 @@ var GuardService = /*#__PURE__*/function () {
2169
2184
  }, _callee7, this);
2170
2185
  }));
2171
2186
 
2172
- function whoAmI(_x6) {
2187
+ function whoAmI(_x7) {
2173
2188
  return _whoAmI.apply(this, arguments);
2174
2189
  }
2175
2190
 
@@ -2202,7 +2217,7 @@ var GuardService = /*#__PURE__*/function () {
2202
2217
  }, _callee8, this);
2203
2218
  }));
2204
2219
 
2205
- function identityUpdate(_x7, _x8) {
2220
+ function identityUpdate(_x8, _x9) {
2206
2221
  return _identityUpdate.apply(this, arguments);
2207
2222
  }
2208
2223
 
@@ -2232,7 +2247,7 @@ var GuardService = /*#__PURE__*/function () {
2232
2247
  };
2233
2248
  return _context9.abrupt("return", this.api.post(this.baseURL + "/v1/identities/" + identityID + "/mfa", req, {
2234
2249
  headers: {
2235
- 'Accept': 'application/json'
2250
+ Accept: 'application/json'
2236
2251
  }
2237
2252
  }));
2238
2253
 
@@ -2244,7 +2259,7 @@ var GuardService = /*#__PURE__*/function () {
2244
2259
  }, _callee9, this);
2245
2260
  }));
2246
2261
 
2247
- function identityMFAQRCode(_x9, _x10) {
2262
+ function identityMFAQRCode(_x10, _x11) {
2248
2263
  return _identityMFAQRCode.apply(this, arguments);
2249
2264
  }
2250
2265
 
@@ -2276,7 +2291,7 @@ var GuardService = /*#__PURE__*/function () {
2276
2291
  }, _callee10, this);
2277
2292
  }));
2278
2293
 
2279
- function identitySendConfirmEmail(_x11) {
2294
+ function identitySendConfirmEmail(_x12) {
2280
2295
  return _identitySendConfirmEmail.apply(this, arguments);
2281
2296
  }
2282
2297