oro-sdk-apis 1.11.1 → 1.13.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.
@@ -7,3 +7,4 @@ export * from './shared';
7
7
  export * from './vault';
8
8
  export * from './workflow';
9
9
  export * from './external';
10
+ export * from './user';
@@ -0,0 +1,15 @@
1
+ export interface User {
2
+ aud: string;
3
+ exp: number;
4
+ jti: string;
5
+ iat: number;
6
+ iss: string;
7
+ nbf?: number;
8
+ sub: string;
9
+ email: string;
10
+ practice: string;
11
+ scope: string;
12
+ data?: {
13
+ [val: string]: any;
14
+ };
15
+ }
@@ -2250,6 +2250,70 @@ var GuardService = /*#__PURE__*/function () {
2250
2250
  }
2251
2251
 
2252
2252
  return identitySendConfirmEmail;
2253
+ }()
2254
+ /**
2255
+ * Get an identity using a customer email (format: customer+[b64Hash]@orohealth.me)
2256
+ *
2257
+ * @param email the customer email
2258
+ * @returns IdentityResponse
2259
+ */
2260
+ ;
2261
+
2262
+ _proto.identityGetByCustomerEmail =
2263
+ /*#__PURE__*/
2264
+ function () {
2265
+ var _identityGetByCustomerEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(email) {
2266
+ return runtime_1.wrap(function _callee11$(_context11) {
2267
+ while (1) {
2268
+ switch (_context11.prev = _context11.next) {
2269
+ case 0:
2270
+ return _context11.abrupt("return", this.identityGetByHash(email.substring(email.indexOf('+') + 1, email.indexOf('@'))));
2271
+
2272
+ case 1:
2273
+ case "end":
2274
+ return _context11.stop();
2275
+ }
2276
+ }
2277
+ }, _callee11, this);
2278
+ }));
2279
+
2280
+ function identityGetByCustomerEmail(_x13) {
2281
+ return _identityGetByCustomerEmail.apply(this, arguments);
2282
+ }
2283
+
2284
+ return identityGetByCustomerEmail;
2285
+ }()
2286
+ /**
2287
+ * Get an identity using a base64 hash
2288
+ *
2289
+ * @param b64Hash base64 hash of the identity
2290
+ * @returns IdentityResponse
2291
+ */
2292
+ ;
2293
+
2294
+ _proto.identityGetByHash =
2295
+ /*#__PURE__*/
2296
+ function () {
2297
+ var _identityGetByHash = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(b64Hash) {
2298
+ return runtime_1.wrap(function _callee12$(_context12) {
2299
+ while (1) {
2300
+ switch (_context12.prev = _context12.next) {
2301
+ case 0:
2302
+ return _context12.abrupt("return", this.identityGet(b64Hash.replace('+', '-').replace('/', '_')));
2303
+
2304
+ case 1:
2305
+ case "end":
2306
+ return _context12.stop();
2307
+ }
2308
+ }
2309
+ }, _callee12, this);
2310
+ }));
2311
+
2312
+ function identityGetByHash(_x14) {
2313
+ return _identityGetByHash.apply(this, arguments);
2314
+ }
2315
+
2316
+ return identityGetByHash;
2253
2317
  }();
2254
2318
 
2255
2319
  return GuardService;