oro-sdk-apis 3.7.0-dev1.1 → 3.7.1

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.
@@ -8,433 +8,119 @@ import axios from 'axios';
8
8
  * @param value the string to hash
9
9
  * @returns a base64 string representation of a hashed value
10
10
  */
11
-
12
11
  function hashToBase64String(value) {
13
12
  return Buffer.from(sha256().update(value).digest('hex'), 'hex').toString('base64');
14
13
  }
15
14
 
16
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
17
- try {
18
- var info = gen[key](arg);
19
- var value = info.value;
20
- } catch (error) {
21
- reject(error);
22
- return;
23
- }
24
-
25
- if (info.done) {
26
- resolve(value);
27
- } else {
28
- Promise.resolve(value).then(_next, _throw);
29
- }
30
- }
31
-
32
- function _asyncToGenerator(fn) {
33
- return function () {
34
- var self = this,
35
- args = arguments;
36
- return new Promise(function (resolve, reject) {
37
- var gen = fn.apply(self, args);
38
-
39
- function _next(value) {
40
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
41
- }
42
-
43
- function _throw(err) {
44
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
45
- }
46
-
47
- _next(undefined);
48
- });
49
- };
50
- }
51
-
52
- function _extends() {
53
- _extends = Object.assign || function (target) {
54
- for (var i = 1; i < arguments.length; i++) {
55
- var source = arguments[i];
56
-
57
- for (var key in source) {
58
- if (Object.prototype.hasOwnProperty.call(source, key)) {
59
- target[key] = source[key];
60
- }
61
- }
62
- }
63
-
64
- return target;
65
- };
66
-
67
- return _extends.apply(this, arguments);
68
- }
69
-
70
- function _inheritsLoose(subClass, superClass) {
71
- subClass.prototype = Object.create(superClass.prototype);
72
- subClass.prototype.constructor = subClass;
73
-
74
- _setPrototypeOf(subClass, superClass);
75
- }
76
-
77
- function _getPrototypeOf(o) {
78
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
79
- return o.__proto__ || Object.getPrototypeOf(o);
80
- };
81
- return _getPrototypeOf(o);
82
- }
83
-
84
- function _setPrototypeOf(o, p) {
85
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
86
- o.__proto__ = p;
87
- return o;
88
- };
89
-
90
- return _setPrototypeOf(o, p);
91
- }
92
-
93
- function _isNativeReflectConstruct() {
94
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
95
- if (Reflect.construct.sham) return false;
96
- if (typeof Proxy === "function") return true;
97
-
98
- try {
99
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
100
- return true;
101
- } catch (e) {
102
- return false;
103
- }
104
- }
105
-
106
- function _construct(Parent, args, Class) {
107
- if (_isNativeReflectConstruct()) {
108
- _construct = Reflect.construct;
109
- } else {
110
- _construct = function _construct(Parent, args, Class) {
111
- var a = [null];
112
- a.push.apply(a, args);
113
- var Constructor = Function.bind.apply(Parent, a);
114
- var instance = new Constructor();
115
- if (Class) _setPrototypeOf(instance, Class.prototype);
116
- return instance;
117
- };
118
- }
119
-
120
- return _construct.apply(null, arguments);
121
- }
122
-
123
- function _isNativeFunction(fn) {
124
- return Function.toString.call(fn).indexOf("[native code]") !== -1;
125
- }
126
-
127
- function _wrapNativeSuper(Class) {
128
- var _cache = typeof Map === "function" ? new Map() : undefined;
129
-
130
- _wrapNativeSuper = function _wrapNativeSuper(Class) {
131
- if (Class === null || !_isNativeFunction(Class)) return Class;
132
-
133
- if (typeof Class !== "function") {
134
- throw new TypeError("Super expression must either be null or a function");
135
- }
136
-
137
- if (typeof _cache !== "undefined") {
138
- if (_cache.has(Class)) return _cache.get(Class);
139
-
140
- _cache.set(Class, Wrapper);
141
- }
142
-
143
- function Wrapper() {
144
- return _construct(Class, arguments, _getPrototypeOf(this).constructor);
145
- }
146
-
147
- Wrapper.prototype = Object.create(Class.prototype, {
148
- constructor: {
149
- value: Wrapper,
150
- enumerable: false,
151
- writable: true,
152
- configurable: true
153
- }
154
- });
155
- return _setPrototypeOf(Wrapper, Class);
15
+ function _regeneratorRuntime() {
16
+ _regeneratorRuntime = function () {
17
+ return exports;
156
18
  };
157
-
158
- return _wrapNativeSuper(Class);
159
- }
160
-
161
- function _assertThisInitialized(self) {
162
- if (self === void 0) {
163
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
164
- }
165
-
166
- return self;
167
- }
168
-
169
- function createCommonjsModule(fn, module) {
170
- return module = { exports: {} }, fn(module, module.exports), module.exports;
171
- }
172
-
173
- var runtime_1 = createCommonjsModule(function (module) {
174
- /**
175
- * Copyright (c) 2014-present, Facebook, Inc.
176
- *
177
- * This source code is licensed under the MIT license found in the
178
- * LICENSE file in the root directory of this source tree.
179
- */
180
-
181
- var runtime = (function (exports) {
182
-
183
- var Op = Object.prototype;
184
- var hasOwn = Op.hasOwnProperty;
185
- var undefined$1; // More compressible than void 0.
186
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
187
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
188
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
189
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
190
-
19
+ var exports = {},
20
+ Op = Object.prototype,
21
+ hasOwn = Op.hasOwnProperty,
22
+ defineProperty = Object.defineProperty || function (obj, key, desc) {
23
+ obj[key] = desc.value;
24
+ },
25
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
26
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
27
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
28
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
191
29
  function define(obj, key, value) {
192
- Object.defineProperty(obj, key, {
30
+ return Object.defineProperty(obj, key, {
193
31
  value: value,
194
- enumerable: true,
195
- configurable: true,
196
- writable: true
197
- });
198
- return obj[key];
32
+ enumerable: !0,
33
+ configurable: !0,
34
+ writable: !0
35
+ }), obj[key];
199
36
  }
200
37
  try {
201
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
202
38
  define({}, "");
203
39
  } catch (err) {
204
- define = function(obj, key, value) {
40
+ define = function (obj, key, value) {
205
41
  return obj[key] = value;
206
42
  };
207
43
  }
208
-
209
44
  function wrap(innerFn, outerFn, self, tryLocsList) {
210
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
211
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
212
- var generator = Object.create(protoGenerator.prototype);
213
- var context = new Context(tryLocsList || []);
214
-
215
- // The ._invoke method unifies the implementations of the .next,
216
- // .throw, and .return methods.
217
- generator._invoke = makeInvokeMethod(innerFn, self, context);
218
-
219
- return generator;
45
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
46
+ generator = Object.create(protoGenerator.prototype),
47
+ context = new Context(tryLocsList || []);
48
+ return defineProperty(generator, "_invoke", {
49
+ value: makeInvokeMethod(innerFn, self, context)
50
+ }), generator;
220
51
  }
221
- exports.wrap = wrap;
222
-
223
- // Try/catch helper to minimize deoptimizations. Returns a completion
224
- // record like context.tryEntries[i].completion. This interface could
225
- // have been (and was previously) designed to take a closure to be
226
- // invoked without arguments, but in all the cases we care about we
227
- // already have an existing method we want to call, so there's no need
228
- // to create a new function object. We can even get away with assuming
229
- // the method takes exactly one argument, since that happens to be true
230
- // in every case, so we don't have to touch the arguments object. The
231
- // only additional allocation required is the completion record, which
232
- // has a stable shape and so hopefully should be cheap to allocate.
233
52
  function tryCatch(fn, obj, arg) {
234
53
  try {
235
- return { type: "normal", arg: fn.call(obj, arg) };
54
+ return {
55
+ type: "normal",
56
+ arg: fn.call(obj, arg)
57
+ };
236
58
  } catch (err) {
237
- return { type: "throw", arg: err };
59
+ return {
60
+ type: "throw",
61
+ arg: err
62
+ };
238
63
  }
239
64
  }
240
-
241
- var GenStateSuspendedStart = "suspendedStart";
242
- var GenStateSuspendedYield = "suspendedYield";
243
- var GenStateExecuting = "executing";
244
- var GenStateCompleted = "completed";
245
-
246
- // Returning this object from the innerFn has the same effect as
247
- // breaking out of the dispatch switch statement.
65
+ exports.wrap = wrap;
248
66
  var ContinueSentinel = {};
249
-
250
- // Dummy constructor functions that we use as the .constructor and
251
- // .constructor.prototype properties for functions that return Generator
252
- // objects. For full spec compliance, you may wish to configure your
253
- // minifier not to mangle the names of these two functions.
254
67
  function Generator() {}
255
68
  function GeneratorFunction() {}
256
69
  function GeneratorFunctionPrototype() {}
257
-
258
- // This is a polyfill for %IteratorPrototype% for environments that
259
- // don't natively support it.
260
70
  var IteratorPrototype = {};
261
71
  define(IteratorPrototype, iteratorSymbol, function () {
262
72
  return this;
263
73
  });
264
-
265
- var getProto = Object.getPrototypeOf;
266
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
267
- if (NativeIteratorPrototype &&
268
- NativeIteratorPrototype !== Op &&
269
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
270
- // This environment has a native %IteratorPrototype%; use it instead
271
- // of the polyfill.
272
- IteratorPrototype = NativeIteratorPrototype;
273
- }
274
-
275
- var Gp = GeneratorFunctionPrototype.prototype =
276
- Generator.prototype = Object.create(IteratorPrototype);
277
- GeneratorFunction.prototype = GeneratorFunctionPrototype;
278
- define(Gp, "constructor", GeneratorFunctionPrototype);
279
- define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
280
- GeneratorFunction.displayName = define(
281
- GeneratorFunctionPrototype,
282
- toStringTagSymbol,
283
- "GeneratorFunction"
284
- );
285
-
286
- // Helper for defining the .next, .throw, and .return methods of the
287
- // Iterator interface in terms of a single ._invoke method.
74
+ var getProto = Object.getPrototypeOf,
75
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
76
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
77
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
288
78
  function defineIteratorMethods(prototype) {
289
- ["next", "throw", "return"].forEach(function(method) {
290
- define(prototype, method, function(arg) {
79
+ ["next", "throw", "return"].forEach(function (method) {
80
+ define(prototype, method, function (arg) {
291
81
  return this._invoke(method, arg);
292
82
  });
293
83
  });
294
84
  }
295
-
296
- exports.isGeneratorFunction = function(genFun) {
297
- var ctor = typeof genFun === "function" && genFun.constructor;
298
- return ctor
299
- ? ctor === GeneratorFunction ||
300
- // For the native GeneratorFunction constructor, the best we can
301
- // do is to check its .name property.
302
- (ctor.displayName || ctor.name) === "GeneratorFunction"
303
- : false;
304
- };
305
-
306
- exports.mark = function(genFun) {
307
- if (Object.setPrototypeOf) {
308
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
309
- } else {
310
- genFun.__proto__ = GeneratorFunctionPrototype;
311
- define(genFun, toStringTagSymbol, "GeneratorFunction");
312
- }
313
- genFun.prototype = Object.create(Gp);
314
- return genFun;
315
- };
316
-
317
- // Within the body of any async function, `await x` is transformed to
318
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
319
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
320
- // meant to be awaited.
321
- exports.awrap = function(arg) {
322
- return { __await: arg };
323
- };
324
-
325
85
  function AsyncIterator(generator, PromiseImpl) {
326
86
  function invoke(method, arg, resolve, reject) {
327
87
  var record = tryCatch(generator[method], generator, arg);
328
- if (record.type === "throw") {
329
- reject(record.arg);
330
- } else {
331
- var result = record.arg;
332
- var value = result.value;
333
- if (value &&
334
- typeof value === "object" &&
335
- hasOwn.call(value, "__await")) {
336
- return PromiseImpl.resolve(value.__await).then(function(value) {
337
- invoke("next", value, resolve, reject);
338
- }, function(err) {
339
- invoke("throw", err, resolve, reject);
340
- });
341
- }
342
-
343
- return PromiseImpl.resolve(value).then(function(unwrapped) {
344
- // When a yielded Promise is resolved, its final value becomes
345
- // the .value of the Promise<{value,done}> result for the
346
- // current iteration.
347
- result.value = unwrapped;
348
- resolve(result);
349
- }, function(error) {
350
- // If a rejected Promise was yielded, throw the rejection back
351
- // into the async generator function so it can be handled there.
88
+ if ("throw" !== record.type) {
89
+ var result = record.arg,
90
+ value = result.value;
91
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
92
+ invoke("next", value, resolve, reject);
93
+ }, function (err) {
94
+ invoke("throw", err, resolve, reject);
95
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
96
+ result.value = unwrapped, resolve(result);
97
+ }, function (error) {
352
98
  return invoke("throw", error, resolve, reject);
353
99
  });
354
100
  }
101
+ reject(record.arg);
355
102
  }
356
-
357
103
  var previousPromise;
358
-
359
- function enqueue(method, arg) {
360
- function callInvokeWithMethodAndArg() {
361
- return new PromiseImpl(function(resolve, reject) {
362
- invoke(method, arg, resolve, reject);
363
- });
104
+ defineProperty(this, "_invoke", {
105
+ value: function (method, arg) {
106
+ function callInvokeWithMethodAndArg() {
107
+ return new PromiseImpl(function (resolve, reject) {
108
+ invoke(method, arg, resolve, reject);
109
+ });
110
+ }
111
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
364
112
  }
365
-
366
- return previousPromise =
367
- // If enqueue has been called before, then we want to wait until
368
- // all previous Promises have been resolved before calling invoke,
369
- // so that results are always delivered in the correct order. If
370
- // enqueue has not been called before, then it is important to
371
- // call invoke immediately, without waiting on a callback to fire,
372
- // so that the async generator function has the opportunity to do
373
- // any necessary setup in a predictable way. This predictability
374
- // is why the Promise constructor synchronously invokes its
375
- // executor callback, and why async functions synchronously
376
- // execute code before the first await. Since we implement simple
377
- // async functions in terms of async generators, it is especially
378
- // important to get this right, even though it requires care.
379
- previousPromise ? previousPromise.then(
380
- callInvokeWithMethodAndArg,
381
- // Avoid propagating failures to Promises returned by later
382
- // invocations of the iterator.
383
- callInvokeWithMethodAndArg
384
- ) : callInvokeWithMethodAndArg();
385
- }
386
-
387
- // Define the unified helper method that is used to implement .next,
388
- // .throw, and .return (see defineIteratorMethods).
389
- this._invoke = enqueue;
113
+ });
390
114
  }
391
-
392
- defineIteratorMethods(AsyncIterator.prototype);
393
- define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
394
- return this;
395
- });
396
- exports.AsyncIterator = AsyncIterator;
397
-
398
- // Note that simple async functions are implemented on top of
399
- // AsyncIterator objects; they just return a Promise for the value of
400
- // the final result produced by the iterator.
401
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
402
- if (PromiseImpl === void 0) PromiseImpl = Promise;
403
-
404
- var iter = new AsyncIterator(
405
- wrap(innerFn, outerFn, self, tryLocsList),
406
- PromiseImpl
407
- );
408
-
409
- return exports.isGeneratorFunction(outerFn)
410
- ? iter // If outerFn is a generator, return the full iterator.
411
- : iter.next().then(function(result) {
412
- return result.done ? result.value : iter.next();
413
- });
414
- };
415
-
416
115
  function makeInvokeMethod(innerFn, self, context) {
417
- var state = GenStateSuspendedStart;
418
-
419
- return function invoke(method, arg) {
420
- if (state === GenStateExecuting) {
421
- throw new Error("Generator is already running");
422
- }
423
-
424
- if (state === GenStateCompleted) {
425
- if (method === "throw") {
426
- throw arg;
427
- }
428
-
429
- // Be forgiving, per 25.3.3.3.3 of the spec:
430
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
116
+ var state = "suspendedStart";
117
+ return function (method, arg) {
118
+ if ("executing" === state) throw new Error("Generator is already running");
119
+ if ("completed" === state) {
120
+ if ("throw" === method) throw arg;
431
121
  return doneResult();
432
122
  }
433
-
434
- context.method = method;
435
- context.arg = arg;
436
-
437
- while (true) {
123
+ for (context.method = method, context.arg = arg;;) {
438
124
  var delegate = context.delegate;
439
125
  if (delegate) {
440
126
  var delegateResult = maybeInvokeDelegate(delegate, context);
@@ -443,500 +129,328 @@ var runtime = (function (exports) {
443
129
  return delegateResult;
444
130
  }
445
131
  }
446
-
447
- if (context.method === "next") {
448
- // Setting context._sent for legacy support of Babel's
449
- // function.sent implementation.
450
- context.sent = context._sent = context.arg;
451
-
452
- } else if (context.method === "throw") {
453
- if (state === GenStateSuspendedStart) {
454
- state = GenStateCompleted;
455
- throw context.arg;
456
- }
457
-
132
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
133
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
458
134
  context.dispatchException(context.arg);
459
-
460
- } else if (context.method === "return") {
461
- context.abrupt("return", context.arg);
462
- }
463
-
464
- state = GenStateExecuting;
465
-
135
+ } else "return" === context.method && context.abrupt("return", context.arg);
136
+ state = "executing";
466
137
  var record = tryCatch(innerFn, self, context);
467
- if (record.type === "normal") {
468
- // If an exception is thrown from innerFn, we leave state ===
469
- // GenStateExecuting and loop back for another invocation.
470
- state = context.done
471
- ? GenStateCompleted
472
- : GenStateSuspendedYield;
473
-
474
- if (record.arg === ContinueSentinel) {
475
- continue;
476
- }
477
-
138
+ if ("normal" === record.type) {
139
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
478
140
  return {
479
141
  value: record.arg,
480
142
  done: context.done
481
143
  };
482
-
483
- } else if (record.type === "throw") {
484
- state = GenStateCompleted;
485
- // Dispatch the exception by looping back around to the
486
- // context.dispatchException(context.arg) call above.
487
- context.method = "throw";
488
- context.arg = record.arg;
489
144
  }
145
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
490
146
  }
491
147
  };
492
148
  }
493
-
494
- // Call delegate.iterator[context.method](context.arg) and handle the
495
- // result, either by returning a { value, done } result from the
496
- // delegate iterator, or by modifying context.method and context.arg,
497
- // setting context.delegate to null, and returning the ContinueSentinel.
498
149
  function maybeInvokeDelegate(delegate, context) {
499
150
  var method = delegate.iterator[context.method];
500
- if (method === undefined$1) {
501
- // A .throw or .return when the delegate iterator has no .throw
502
- // method always terminates the yield* loop.
503
- context.delegate = null;
504
-
505
- if (context.method === "throw") {
506
- // Note: ["return"] must be used for ES3 parsing compatibility.
507
- if (delegate.iterator["return"]) {
508
- // If the delegate iterator has a return method, give it a
509
- // chance to clean up.
510
- context.method = "return";
511
- context.arg = undefined$1;
512
- maybeInvokeDelegate(delegate, context);
513
-
514
- if (context.method === "throw") {
515
- // If maybeInvokeDelegate(context) changed context.method from
516
- // "return" to "throw", let that override the TypeError below.
517
- return ContinueSentinel;
518
- }
519
- }
520
-
521
- context.method = "throw";
522
- context.arg = new TypeError(
523
- "The iterator does not provide a 'throw' method");
151
+ if (undefined === method) {
152
+ if (context.delegate = null, "throw" === context.method) {
153
+ if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
154
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
524
155
  }
525
-
526
156
  return ContinueSentinel;
527
157
  }
528
-
529
158
  var record = tryCatch(method, delegate.iterator, context.arg);
530
-
531
- if (record.type === "throw") {
532
- context.method = "throw";
533
- context.arg = record.arg;
534
- context.delegate = null;
535
- return ContinueSentinel;
536
- }
537
-
159
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
538
160
  var info = record.arg;
539
-
540
- if (! info) {
541
- context.method = "throw";
542
- context.arg = new TypeError("iterator result is not an object");
543
- context.delegate = null;
544
- return ContinueSentinel;
545
- }
546
-
547
- if (info.done) {
548
- // Assign the result of the finished delegate to the temporary
549
- // variable specified by delegate.resultName (see delegateYield).
550
- context[delegate.resultName] = info.value;
551
-
552
- // Resume execution at the desired location (see delegateYield).
553
- context.next = delegate.nextLoc;
554
-
555
- // If context.method was "throw" but the delegate handled the
556
- // exception, let the outer generator proceed normally. If
557
- // context.method was "next", forget context.arg since it has been
558
- // "consumed" by the delegate iterator. If context.method was
559
- // "return", allow the original .return call to continue in the
560
- // outer generator.
561
- if (context.method !== "return") {
562
- context.method = "next";
563
- context.arg = undefined$1;
564
- }
565
-
566
- } else {
567
- // Re-yield the result returned by the delegate method.
568
- return info;
569
- }
570
-
571
- // The delegate iterator is finished, so forget it and continue with
572
- // the outer generator.
573
- context.delegate = null;
574
- return ContinueSentinel;
161
+ return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
575
162
  }
576
-
577
- // Define Generator.prototype.{next,throw,return} in terms of the
578
- // unified ._invoke helper method.
579
- defineIteratorMethods(Gp);
580
-
581
- define(Gp, toStringTagSymbol, "Generator");
582
-
583
- // A Generator should always return itself as the iterator object when the
584
- // @@iterator function is called on it. Some browsers' implementations of the
585
- // iterator prototype chain incorrectly implement this, causing the Generator
586
- // object to not be returned from this call. This ensures that doesn't happen.
587
- // See https://github.com/facebook/regenerator/issues/274 for more details.
588
- define(Gp, iteratorSymbol, function() {
589
- return this;
590
- });
591
-
592
- define(Gp, "toString", function() {
593
- return "[object Generator]";
594
- });
595
-
596
163
  function pushTryEntry(locs) {
597
- var entry = { tryLoc: locs[0] };
598
-
599
- if (1 in locs) {
600
- entry.catchLoc = locs[1];
601
- }
602
-
603
- if (2 in locs) {
604
- entry.finallyLoc = locs[2];
605
- entry.afterLoc = locs[3];
606
- }
607
-
608
- this.tryEntries.push(entry);
164
+ var entry = {
165
+ tryLoc: locs[0]
166
+ };
167
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
609
168
  }
610
-
611
169
  function resetTryEntry(entry) {
612
170
  var record = entry.completion || {};
613
- record.type = "normal";
614
- delete record.arg;
615
- entry.completion = record;
171
+ record.type = "normal", delete record.arg, entry.completion = record;
616
172
  }
617
-
618
173
  function Context(tryLocsList) {
619
- // The root entry object (effectively a try statement without a catch
620
- // or a finally block) gives us a place to store values thrown from
621
- // locations where there is no enclosing try statement.
622
- this.tryEntries = [{ tryLoc: "root" }];
623
- tryLocsList.forEach(pushTryEntry, this);
624
- this.reset(true);
174
+ this.tryEntries = [{
175
+ tryLoc: "root"
176
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
625
177
  }
626
-
627
- exports.keys = function(object) {
628
- var keys = [];
629
- for (var key in object) {
630
- keys.push(key);
631
- }
632
- keys.reverse();
633
-
634
- // Rather than returning an object with a next method, we keep
635
- // things simple and return the next function itself.
636
- return function next() {
637
- while (keys.length) {
638
- var key = keys.pop();
639
- if (key in object) {
640
- next.value = key;
641
- next.done = false;
642
- return next;
643
- }
644
- }
645
-
646
- // To avoid creating an additional object, we just hang the .value
647
- // and .done properties off the next function object itself. This
648
- // also ensures that the minifier will not anonymize the function.
649
- next.done = true;
650
- return next;
651
- };
652
- };
653
-
654
178
  function values(iterable) {
655
179
  if (iterable) {
656
180
  var iteratorMethod = iterable[iteratorSymbol];
657
- if (iteratorMethod) {
658
- return iteratorMethod.call(iterable);
659
- }
660
-
661
- if (typeof iterable.next === "function") {
662
- return iterable;
663
- }
664
-
181
+ if (iteratorMethod) return iteratorMethod.call(iterable);
182
+ if ("function" == typeof iterable.next) return iterable;
665
183
  if (!isNaN(iterable.length)) {
666
- var i = -1, next = function next() {
667
- while (++i < iterable.length) {
668
- if (hasOwn.call(iterable, i)) {
669
- next.value = iterable[i];
670
- next.done = false;
671
- return next;
672
- }
673
- }
674
-
675
- next.value = undefined$1;
676
- next.done = true;
677
-
678
- return next;
679
- };
680
-
184
+ var i = -1,
185
+ next = function next() {
186
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
187
+ return next.value = undefined, next.done = !0, next;
188
+ };
681
189
  return next.next = next;
682
190
  }
683
191
  }
684
-
685
- // Return an iterator with no values.
686
- return { next: doneResult };
192
+ return {
193
+ next: doneResult
194
+ };
687
195
  }
688
- exports.values = values;
689
-
690
196
  function doneResult() {
691
- return { value: undefined$1, done: true };
197
+ return {
198
+ value: undefined,
199
+ done: !0
200
+ };
692
201
  }
693
-
694
- Context.prototype = {
695
- constructor: Context,
696
-
697
- reset: function(skipTempReset) {
698
- this.prev = 0;
699
- this.next = 0;
700
- // Resetting context._sent for legacy support of Babel's
701
- // function.sent implementation.
702
- this.sent = this._sent = undefined$1;
703
- this.done = false;
704
- this.delegate = null;
705
-
706
- this.method = "next";
707
- this.arg = undefined$1;
708
-
709
- this.tryEntries.forEach(resetTryEntry);
710
-
711
- if (!skipTempReset) {
712
- for (var name in this) {
713
- // Not sure about the optimal order of these conditions:
714
- if (name.charAt(0) === "t" &&
715
- hasOwn.call(this, name) &&
716
- !isNaN(+name.slice(1))) {
717
- this[name] = undefined$1;
718
- }
719
- }
202
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
203
+ value: GeneratorFunctionPrototype,
204
+ configurable: !0
205
+ }), defineProperty(GeneratorFunctionPrototype, "constructor", {
206
+ value: GeneratorFunction,
207
+ configurable: !0
208
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
209
+ var ctor = "function" == typeof genFun && genFun.constructor;
210
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
211
+ }, exports.mark = function (genFun) {
212
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
213
+ }, exports.awrap = function (arg) {
214
+ return {
215
+ __await: arg
216
+ };
217
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
218
+ return this;
219
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
220
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
221
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
222
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
223
+ return result.done ? result.value : iter.next();
224
+ });
225
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
226
+ return this;
227
+ }), define(Gp, "toString", function () {
228
+ return "[object Generator]";
229
+ }), exports.keys = function (val) {
230
+ var object = Object(val),
231
+ keys = [];
232
+ for (var key in object) keys.push(key);
233
+ return keys.reverse(), function next() {
234
+ for (; keys.length;) {
235
+ var key = keys.pop();
236
+ if (key in object) return next.value = key, next.done = !1, next;
720
237
  }
238
+ return next.done = !0, next;
239
+ };
240
+ }, exports.values = values, Context.prototype = {
241
+ constructor: Context,
242
+ reset: function (skipTempReset) {
243
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
721
244
  },
722
-
723
- stop: function() {
724
- this.done = true;
725
-
726
- var rootEntry = this.tryEntries[0];
727
- var rootRecord = rootEntry.completion;
728
- if (rootRecord.type === "throw") {
729
- throw rootRecord.arg;
730
- }
731
-
245
+ stop: function () {
246
+ this.done = !0;
247
+ var rootRecord = this.tryEntries[0].completion;
248
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
732
249
  return this.rval;
733
250
  },
734
-
735
- dispatchException: function(exception) {
736
- if (this.done) {
737
- throw exception;
738
- }
739
-
251
+ dispatchException: function (exception) {
252
+ if (this.done) throw exception;
740
253
  var context = this;
741
254
  function handle(loc, caught) {
742
- record.type = "throw";
743
- record.arg = exception;
744
- context.next = loc;
745
-
746
- if (caught) {
747
- // If the dispatched exception was caught by a catch block,
748
- // then let that catch block handle the exception normally.
749
- context.method = "next";
750
- context.arg = undefined$1;
751
- }
752
-
753
- return !! caught;
255
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
754
256
  }
755
-
756
257
  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
757
- var entry = this.tryEntries[i];
758
- var record = entry.completion;
759
-
760
- if (entry.tryLoc === "root") {
761
- // Exception thrown outside of any try block that could handle
762
- // it, so set the completion value of the entire function to
763
- // throw the exception.
764
- return handle("end");
765
- }
766
-
258
+ var entry = this.tryEntries[i],
259
+ record = entry.completion;
260
+ if ("root" === entry.tryLoc) return handle("end");
767
261
  if (entry.tryLoc <= this.prev) {
768
- var hasCatch = hasOwn.call(entry, "catchLoc");
769
- var hasFinally = hasOwn.call(entry, "finallyLoc");
770
-
262
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
263
+ hasFinally = hasOwn.call(entry, "finallyLoc");
771
264
  if (hasCatch && hasFinally) {
772
- if (this.prev < entry.catchLoc) {
773
- return handle(entry.catchLoc, true);
774
- } else if (this.prev < entry.finallyLoc) {
775
- return handle(entry.finallyLoc);
776
- }
777
-
265
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
266
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
778
267
  } else if (hasCatch) {
779
- if (this.prev < entry.catchLoc) {
780
- return handle(entry.catchLoc, true);
781
- }
782
-
783
- } else if (hasFinally) {
784
- if (this.prev < entry.finallyLoc) {
785
- return handle(entry.finallyLoc);
786
- }
787
-
268
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
788
269
  } else {
789
- throw new Error("try statement without catch or finally");
270
+ if (!hasFinally) throw new Error("try statement without catch or finally");
271
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
790
272
  }
791
273
  }
792
274
  }
793
275
  },
794
-
795
- abrupt: function(type, arg) {
276
+ abrupt: function (type, arg) {
796
277
  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
797
278
  var entry = this.tryEntries[i];
798
- if (entry.tryLoc <= this.prev &&
799
- hasOwn.call(entry, "finallyLoc") &&
800
- this.prev < entry.finallyLoc) {
279
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
801
280
  var finallyEntry = entry;
802
281
  break;
803
282
  }
804
283
  }
805
-
806
- if (finallyEntry &&
807
- (type === "break" ||
808
- type === "continue") &&
809
- finallyEntry.tryLoc <= arg &&
810
- arg <= finallyEntry.finallyLoc) {
811
- // Ignore the finally entry if control is not jumping to a
812
- // location outside the try/catch block.
813
- finallyEntry = null;
814
- }
815
-
284
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
816
285
  var record = finallyEntry ? finallyEntry.completion : {};
817
- record.type = type;
818
- record.arg = arg;
819
-
820
- if (finallyEntry) {
821
- this.method = "next";
822
- this.next = finallyEntry.finallyLoc;
823
- return ContinueSentinel;
824
- }
825
-
826
- return this.complete(record);
286
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
827
287
  },
828
-
829
- complete: function(record, afterLoc) {
830
- if (record.type === "throw") {
831
- throw record.arg;
832
- }
833
-
834
- if (record.type === "break" ||
835
- record.type === "continue") {
836
- this.next = record.arg;
837
- } else if (record.type === "return") {
838
- this.rval = this.arg = record.arg;
839
- this.method = "return";
840
- this.next = "end";
841
- } else if (record.type === "normal" && afterLoc) {
842
- this.next = afterLoc;
843
- }
844
-
845
- return ContinueSentinel;
288
+ complete: function (record, afterLoc) {
289
+ if ("throw" === record.type) throw record.arg;
290
+ return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
846
291
  },
847
-
848
- finish: function(finallyLoc) {
292
+ finish: function (finallyLoc) {
849
293
  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
850
294
  var entry = this.tryEntries[i];
851
- if (entry.finallyLoc === finallyLoc) {
852
- this.complete(entry.completion, entry.afterLoc);
853
- resetTryEntry(entry);
854
- return ContinueSentinel;
855
- }
295
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
856
296
  }
857
297
  },
858
-
859
- "catch": function(tryLoc) {
298
+ catch: function (tryLoc) {
860
299
  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
861
300
  var entry = this.tryEntries[i];
862
301
  if (entry.tryLoc === tryLoc) {
863
302
  var record = entry.completion;
864
- if (record.type === "throw") {
303
+ if ("throw" === record.type) {
865
304
  var thrown = record.arg;
866
305
  resetTryEntry(entry);
867
306
  }
868
307
  return thrown;
869
308
  }
870
309
  }
871
-
872
- // The context.catch method must only be called with a location
873
- // argument that corresponds to a known catch block.
874
310
  throw new Error("illegal catch attempt");
875
311
  },
876
-
877
- delegateYield: function(iterable, resultName, nextLoc) {
878
- this.delegate = {
312
+ delegateYield: function (iterable, resultName, nextLoc) {
313
+ return this.delegate = {
879
314
  iterator: values(iterable),
880
315
  resultName: resultName,
881
316
  nextLoc: nextLoc
882
- };
883
-
884
- if (this.method === "next") {
885
- // Deliberately forget the last sent value so that we don't
886
- // accidentally pass it on to the delegate.
887
- this.arg = undefined$1;
317
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
318
+ }
319
+ }, exports;
320
+ }
321
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
322
+ try {
323
+ var info = gen[key](arg);
324
+ var value = info.value;
325
+ } catch (error) {
326
+ reject(error);
327
+ return;
328
+ }
329
+ if (info.done) {
330
+ resolve(value);
331
+ } else {
332
+ Promise.resolve(value).then(_next, _throw);
333
+ }
334
+ }
335
+ function _asyncToGenerator(fn) {
336
+ return function () {
337
+ var self = this,
338
+ args = arguments;
339
+ return new Promise(function (resolve, reject) {
340
+ var gen = fn.apply(self, args);
341
+ function _next(value) {
342
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
888
343
  }
889
-
890
- return ContinueSentinel;
344
+ function _throw(err) {
345
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
346
+ }
347
+ _next(undefined);
348
+ });
349
+ };
350
+ }
351
+ function _extends() {
352
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
353
+ for (var i = 1; i < arguments.length; i++) {
354
+ var source = arguments[i];
355
+ for (var key in source) {
356
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
357
+ target[key] = source[key];
358
+ }
359
+ }
360
+ }
361
+ return target;
362
+ };
363
+ return _extends.apply(this, arguments);
364
+ }
365
+ function _inheritsLoose(subClass, superClass) {
366
+ subClass.prototype = Object.create(superClass.prototype);
367
+ subClass.prototype.constructor = subClass;
368
+ _setPrototypeOf(subClass, superClass);
369
+ }
370
+ function _getPrototypeOf(o) {
371
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
372
+ return o.__proto__ || Object.getPrototypeOf(o);
373
+ };
374
+ return _getPrototypeOf(o);
375
+ }
376
+ function _setPrototypeOf(o, p) {
377
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
378
+ o.__proto__ = p;
379
+ return o;
380
+ };
381
+ return _setPrototypeOf(o, p);
382
+ }
383
+ function _isNativeReflectConstruct() {
384
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
385
+ if (Reflect.construct.sham) return false;
386
+ if (typeof Proxy === "function") return true;
387
+ try {
388
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
389
+ return true;
390
+ } catch (e) {
391
+ return false;
392
+ }
393
+ }
394
+ function _construct(Parent, args, Class) {
395
+ if (_isNativeReflectConstruct()) {
396
+ _construct = Reflect.construct.bind();
397
+ } else {
398
+ _construct = function _construct(Parent, args, Class) {
399
+ var a = [null];
400
+ a.push.apply(a, args);
401
+ var Constructor = Function.bind.apply(Parent, a);
402
+ var instance = new Constructor();
403
+ if (Class) _setPrototypeOf(instance, Class.prototype);
404
+ return instance;
405
+ };
406
+ }
407
+ return _construct.apply(null, arguments);
408
+ }
409
+ function _isNativeFunction(fn) {
410
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
411
+ }
412
+ function _wrapNativeSuper(Class) {
413
+ var _cache = typeof Map === "function" ? new Map() : undefined;
414
+ _wrapNativeSuper = function _wrapNativeSuper(Class) {
415
+ if (Class === null || !_isNativeFunction(Class)) return Class;
416
+ if (typeof Class !== "function") {
417
+ throw new TypeError("Super expression must either be null or a function");
418
+ }
419
+ if (typeof _cache !== "undefined") {
420
+ if (_cache.has(Class)) return _cache.get(Class);
421
+ _cache.set(Class, Wrapper);
422
+ }
423
+ function Wrapper() {
424
+ return _construct(Class, arguments, _getPrototypeOf(this).constructor);
891
425
  }
426
+ Wrapper.prototype = Object.create(Class.prototype, {
427
+ constructor: {
428
+ value: Wrapper,
429
+ enumerable: false,
430
+ writable: true,
431
+ configurable: true
432
+ }
433
+ });
434
+ return _setPrototypeOf(Wrapper, Class);
892
435
  };
893
-
894
- // Regardless of whether this script is executing as a CommonJS module
895
- // or not, return the runtime object so that we can declare the variable
896
- // regeneratorRuntime in the outer scope, which allows this module to be
897
- // injected easily by `bin/regenerator --include-runtime script.js`.
898
- return exports;
899
-
900
- }(
901
- // If this script is executing as a CommonJS module, use module.exports
902
- // as the regeneratorRuntime namespace. Otherwise create a new empty
903
- // object. Either way, the resulting object will be used to initialize
904
- // the regeneratorRuntime variable at the top of this file.
905
- module.exports
906
- ));
907
-
908
- try {
909
- regeneratorRuntime = runtime;
910
- } catch (accidentalStrictMode) {
911
- // This module should not be running in strict mode, so the above
912
- // assignment should always work unless something is misconfigured. Just
913
- // in case runtime.js accidentally runs in strict mode, in modern engines
914
- // we can explicitly access globalThis. In older engines we can escape
915
- // strict mode using a global Function call. This could conceivably fail
916
- // if a Content Security Policy forbids using Function, but in that case
917
- // the proper solution is to fix the accidental strict mode problem. If
918
- // you've misconfigured your bundler to force strict mode and applied a
919
- // CSP to forbid Function, and you're not willing to fix either of those
920
- // problems, please detail your unique predicament in a GitHub issue.
921
- if (typeof globalThis === "object") {
922
- globalThis.regeneratorRuntime = runtime;
923
- } else {
924
- Function("r", "regeneratorRuntime = r")(runtime);
436
+ return _wrapNativeSuper(Class);
437
+ }
438
+ function _assertThisInitialized(self) {
439
+ if (self === void 0) {
440
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
925
441
  }
442
+ return self;
926
443
  }
927
- });
928
444
 
929
445
  var AxiosService = /*#__PURE__*/function () {
930
446
  function AxiosService(config) {
931
447
  if (!config) config = {};
932
448
  this.axios = axios.create(config);
933
449
  }
934
-
935
450
  var _proto = AxiosService.prototype;
936
-
937
451
  _proto.apiRequest = /*#__PURE__*/function () {
938
- var _apiRequest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(config, url, data) {
939
- return runtime_1.wrap(function _callee$(_context) {
452
+ var _apiRequest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(config, url, data) {
453
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
940
454
  while (1) {
941
455
  switch (_context.prev = _context.next) {
942
456
  case 0:
@@ -948,7 +462,6 @@ var AxiosService = /*#__PURE__*/function () {
948
462
  })).then(function (res) {
949
463
  return res.data;
950
464
  }));
951
-
952
465
  case 3:
953
466
  case "end":
954
467
  return _context.stop();
@@ -956,17 +469,14 @@ var AxiosService = /*#__PURE__*/function () {
956
469
  }
957
470
  }, _callee, this);
958
471
  }));
959
-
960
472
  function apiRequest(_x, _x2, _x3) {
961
473
  return _apiRequest.apply(this, arguments);
962
474
  }
963
-
964
475
  return apiRequest;
965
476
  }();
966
-
967
477
  _proto.apiRequestHeader = /*#__PURE__*/function () {
968
- var _apiRequestHeader = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(config, url, headerToRetrieve, data) {
969
- return runtime_1.wrap(function _callee2$(_context2) {
478
+ var _apiRequestHeader = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(config, url, headerToRetrieve, data) {
479
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
970
480
  while (1) {
971
481
  switch (_context2.prev = _context2.next) {
972
482
  case 0:
@@ -978,13 +488,10 @@ var AxiosService = /*#__PURE__*/function () {
978
488
  })).then(function (res) {
979
489
  if (headerToRetrieve) {
980
490
  var _res$headers$headerTo;
981
-
982
491
  return (_res$headers$headerTo = res.headers[headerToRetrieve]) != null ? _res$headers$headerTo : res.headers[headerToRetrieve.toLowerCase()];
983
492
  }
984
-
985
493
  return res.headers;
986
494
  }));
987
-
988
495
  case 3:
989
496
  case "end":
990
497
  return _context2.stop();
@@ -992,56 +499,46 @@ var AxiosService = /*#__PURE__*/function () {
992
499
  }
993
500
  }, _callee2, this);
994
501
  }));
995
-
996
502
  function apiRequestHeader(_x4, _x5, _x6, _x7) {
997
503
  return _apiRequestHeader.apply(this, arguments);
998
504
  }
999
-
1000
505
  return apiRequestHeader;
1001
506
  }();
1002
-
1003
507
  _proto.get = function get(url, config) {
1004
508
  return this.apiRequest(_extends({}, config, {
1005
509
  method: 'get'
1006
510
  }), url);
1007
511
  };
1008
-
1009
512
  _proto.deleteRequest = function deleteRequest(url, config) {
1010
513
  return this.apiRequest(_extends({}, config, {
1011
514
  method: 'delete'
1012
515
  }), url);
1013
516
  };
1014
-
1015
517
  _proto.post = function post(url, data, config) {
1016
518
  return this.apiRequest(_extends({}, config, {
1017
519
  method: 'post'
1018
520
  }), url, data);
1019
521
  };
1020
-
1021
522
  _proto.put = function put(url, data, config) {
1022
523
  return this.apiRequest(_extends({}, config, {
1023
524
  method: 'put'
1024
525
  }), url, data);
1025
526
  };
1026
-
1027
527
  _proto.patch = function patch(url, data, config) {
1028
528
  return this.apiRequest(_extends({}, config, {
1029
529
  method: 'patch'
1030
530
  }), url, data);
1031
531
  };
1032
-
1033
532
  _proto.head = function head(url, config, headerToRetrieve, data) {
1034
533
  return this.apiRequestHeader(_extends({}, config, {
1035
534
  method: 'head'
1036
535
  }), url, headerToRetrieve, data);
1037
536
  };
1038
-
1039
537
  return AxiosService;
1040
538
  }();
1041
539
 
1042
540
  var APIService = /*#__PURE__*/function (_AxiosService) {
1043
541
  _inheritsLoose(APIService, _AxiosService);
1044
-
1045
542
  /**
1046
543
  * The API Service lets you use an axios API and handles oro backend services authentification via JWT tokens
1047
544
  * @param useLocalStorage if set to true, tokens will be stored in localStorage
@@ -1050,14 +547,11 @@ var APIService = /*#__PURE__*/function (_AxiosService) {
1050
547
  */
1051
548
  function APIService(useLocalStorage, config, tokenRefreshFailureCallback) {
1052
549
  var _this;
1053
-
1054
550
  _this = _AxiosService.call(this, config) || this;
1055
551
  _this.useLocalStorage = useLocalStorage;
1056
552
  _this.tokenRefreshFailureCallback = tokenRefreshFailureCallback;
1057
553
  _this.tokens = {};
1058
-
1059
554
  var self = _assertThisInitialized(_this);
1060
-
1061
555
  _this.axios.interceptors.request.use(function (config) {
1062
556
  var token = config.useRefreshToken ? self.getTokens().refreshToken : self.getTokens().accessToken;
1063
557
  config.headers = _extends({}, config.headers, {
@@ -1067,11 +561,10 @@ var APIService = /*#__PURE__*/function (_AxiosService) {
1067
561
  }, function (error) {
1068
562
  Promise.reject(error);
1069
563
  });
1070
-
1071
564
  createAuthRefreshInterceptor(_this.axios, /*#__PURE__*/function () {
1072
- var _ref = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(failedRequest) {
565
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(failedRequest) {
1073
566
  var tokenResp;
1074
- return runtime_1.wrap(function _callee$(_context) {
567
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1075
568
  while (1) {
1076
569
  switch (_context.prev = _context.next) {
1077
570
  case 0:
@@ -1079,11 +572,9 @@ var APIService = /*#__PURE__*/function (_AxiosService) {
1079
572
  _context.next = 15;
1080
573
  break;
1081
574
  }
1082
-
1083
575
  _context.prev = 1;
1084
576
  _context.next = 4;
1085
577
  return self.authRefreshFn(self.getTokens().refreshToken);
1086
-
1087
578
  case 4:
1088
579
  tokenResp = _context.sent;
1089
580
  self.setTokens({
@@ -1092,18 +583,15 @@ var APIService = /*#__PURE__*/function (_AxiosService) {
1092
583
  });
1093
584
  failedRequest.response.config.headers['Authorization'] = "Bearer " + self.getTokens().accessToken;
1094
585
  return _context.abrupt("return", Promise.resolve());
1095
-
1096
586
  case 10:
1097
587
  _context.prev = 10;
1098
588
  _context.t0 = _context["catch"](1);
1099
589
  console.error('an error occured while refreshing tokens (notifying callback)', _context.t0);
1100
590
  if (self.tokenRefreshFailureCallback) self.tokenRefreshFailureCallback(failedRequest);
1101
591
  return _context.abrupt("return", Promise.resolve());
1102
-
1103
592
  case 15:
1104
593
  console.error('The request could not refresh the token (authRefreshFn was not set)', failedRequest);
1105
594
  return _context.abrupt("return", Promise.resolve());
1106
-
1107
595
  case 17:
1108
596
  case "end":
1109
597
  return _context.stop();
@@ -1111,7 +599,6 @@ var APIService = /*#__PURE__*/function (_AxiosService) {
1111
599
  }
1112
600
  }, _callee, null, [[1, 10]]);
1113
601
  }));
1114
-
1115
602
  return function (_x) {
1116
603
  return _ref.apply(this, arguments);
1117
604
  };
@@ -1120,43 +607,34 @@ var APIService = /*#__PURE__*/function (_AxiosService) {
1120
607
  });
1121
608
  return _this;
1122
609
  }
1123
-
1124
610
  var _proto = APIService.prototype;
1125
-
1126
611
  _proto.setAuthRefreshFn = function setAuthRefreshFn(fn) {
1127
612
  this.authRefreshFn = fn;
1128
613
  };
1129
-
1130
614
  _proto.setTokens = function setTokens(tokens) {
1131
615
  if (this.useLocalStorage) {
1132
616
  localStorage.setItem('tokens', JSON.stringify(tokens));
1133
617
  }
1134
-
1135
618
  this.tokens = tokens;
1136
619
  };
1137
-
1138
620
  _proto.getTokens = function getTokens() {
1139
621
  if (this.useLocalStorage) {
1140
622
  var tokens = {};
1141
623
  var item = localStorage.getItem('tokens');
1142
-
1143
624
  if (item) {
1144
625
  tokens = JSON.parse(item);
1145
626
  }
1146
-
1147
627
  return tokens;
1148
628
  } else {
1149
629
  return this.tokens;
1150
630
  }
1151
631
  };
1152
-
1153
632
  return APIService;
1154
633
  }(AxiosService);
1155
634
 
1156
635
  /**
1157
636
  * This service enables you to handle one authentication token per practice
1158
637
  */
1159
-
1160
638
  var ApisPracticeManager = /*#__PURE__*/function () {
1161
639
  /**
1162
640
  * The constructor
@@ -1169,7 +647,6 @@ var ApisPracticeManager = /*#__PURE__*/function () {
1169
647
  if (useLocalStorage === void 0) {
1170
648
  useLocalStorage = false;
1171
649
  }
1172
-
1173
650
  this.serviceCollReq = serviceCollReq;
1174
651
  this.getAuthTokenCbk = getAuthTokenCbk;
1175
652
  this.useLocalStorage = useLocalStorage;
@@ -1180,37 +657,29 @@ var ApisPracticeManager = /*#__PURE__*/function () {
1180
657
  * @param practiceUuid the uuid of the practice
1181
658
  * @returns a promise holding a `ServiceCollection`
1182
659
  */
1183
-
1184
-
1185
660
  var _proto = ApisPracticeManager.prototype;
1186
-
1187
661
  _proto.get =
1188
662
  /*#__PURE__*/
1189
663
  function () {
1190
- var _get = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(practiceUuid) {
664
+ var _get = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(practiceUuid) {
1191
665
  var _this = this;
1192
-
1193
666
  var cacheKey, practiceInstance, newPracticeInstance, authTokenFunc;
1194
- return runtime_1.wrap(function _callee2$(_context2) {
667
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1195
668
  while (1) {
1196
669
  switch (_context2.prev = _context2.next) {
1197
670
  case 0:
1198
671
  cacheKey = practiceUuid != null ? practiceUuid : 'none';
1199
672
  practiceInstance = this.practiceInstances.get(cacheKey);
1200
-
1201
673
  if (!practiceInstance) {
1202
674
  _context2.next = 4;
1203
675
  break;
1204
676
  }
1205
-
1206
677
  return _context2.abrupt("return", practiceInstance);
1207
-
1208
678
  case 4:
1209
679
  newPracticeInstance = init(this.serviceCollReq, undefined, this.useLocalStorage); // Create one auth token callback per practice since the practice uuid needs to change
1210
-
1211
680
  authTokenFunc = /*#__PURE__*/function () {
1212
- var _ref = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
1213
- return runtime_1.wrap(function _callee$(_context) {
681
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
682
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1214
683
  while (1) {
1215
684
  switch (_context.prev = _context.next) {
1216
685
  case 0:
@@ -1218,17 +687,13 @@ var ApisPracticeManager = /*#__PURE__*/function () {
1218
687
  _context.next = 7;
1219
688
  break;
1220
689
  }
1221
-
1222
690
  console.log("\x1B[36m[Auth] Refresh auth called (practiceUuid: " + practiceUuid + ")\x1B[36m");
1223
691
  _context.next = 4;
1224
692
  return _this.getAuthTokenCbk(newPracticeInstance.guardService, practiceUuid);
1225
-
1226
693
  case 4:
1227
694
  return _context.abrupt("return", _context.sent);
1228
-
1229
695
  case 7:
1230
696
  throw Error('[Auth] Unable to refresh token guard service is undefined');
1231
-
1232
697
  case 8:
1233
698
  case "end":
1234
699
  return _context.stop();
@@ -1236,22 +701,17 @@ var ApisPracticeManager = /*#__PURE__*/function () {
1236
701
  }
1237
702
  }, _callee);
1238
703
  }));
1239
-
1240
704
  return function authTokenFunc() {
1241
705
  return _ref.apply(this, arguments);
1242
706
  };
1243
707
  }(); // Initialize the M2M token
1244
-
1245
-
1246
708
  _context2.next = 8;
1247
709
  return authTokenFunc();
1248
-
1249
710
  case 8:
1250
711
  // Set the refresh tokens callback
1251
712
  newPracticeInstance.apiService.setAuthRefreshFn(authTokenFunc);
1252
713
  this.practiceInstances.set(cacheKey, newPracticeInstance);
1253
714
  return _context2.abrupt("return", newPracticeInstance);
1254
-
1255
715
  case 11:
1256
716
  case "end":
1257
717
  return _context2.stop();
@@ -1259,19 +719,15 @@ var ApisPracticeManager = /*#__PURE__*/function () {
1259
719
  }
1260
720
  }, _callee2, this);
1261
721
  }));
1262
-
1263
722
  function get(_x) {
1264
723
  return _get.apply(this, arguments);
1265
724
  }
1266
-
1267
725
  return get;
1268
726
  }();
1269
-
1270
727
  return ApisPracticeManager;
1271
728
  }();
1272
729
 
1273
730
  var AssistantType;
1274
-
1275
731
  (function (AssistantType) {
1276
732
  AssistantType["MedicalSecretary"] = "MedicalSecretary";
1277
733
  AssistantType["Nurse"] = "Nurse";
@@ -1279,9 +735,7 @@ var AssistantType;
1279
735
  AssistantType["Administrative"] = "Administrative";
1280
736
  AssistantType["Other"] = "Other";
1281
737
  })(AssistantType || (AssistantType = {}));
1282
-
1283
738
  var TransmissionKind;
1284
-
1285
739
  (function (TransmissionKind) {
1286
740
  TransmissionKind["Fax"] = "Fax";
1287
741
  TransmissionKind["Email"] = "Email";
@@ -1291,9 +745,7 @@ var TransmissionKind;
1291
745
  TransmissionKind["API"] = "API";
1292
746
  TransmissionKind["Other"] = "Other";
1293
747
  })(TransmissionKind || (TransmissionKind = {}));
1294
-
1295
748
  var TransmissionStatus;
1296
-
1297
749
  (function (TransmissionStatus) {
1298
750
  TransmissionStatus["Preparing"] = "Preparing";
1299
751
  TransmissionStatus["Sending"] = "Sending";
@@ -1306,16 +758,12 @@ var TransmissionStatus;
1306
758
  TransmissionStatus["ReceiverNotAnswering"] = "ReceiverNotAnswering";
1307
759
  TransmissionStatus["ReceiverIncompatible"] = "ReceiverIncompatible";
1308
760
  })(TransmissionStatus || (TransmissionStatus = {}));
1309
-
1310
761
  var ConsultType;
1311
-
1312
762
  (function (ConsultType) {
1313
763
  ConsultType["Onboard"] = "Onboard";
1314
764
  ConsultType["Refill"] = "Refill";
1315
765
  })(ConsultType || (ConsultType = {}));
1316
-
1317
766
  var FeeStatus;
1318
-
1319
767
  (function (FeeStatus) {
1320
768
  FeeStatus["NoFee"] = "NoFee";
1321
769
  FeeStatus["Pending"] = "Pending";
@@ -1324,9 +772,7 @@ var FeeStatus;
1324
772
  FeeStatus["Cancelled"] = "Cancelled";
1325
773
  FeeStatus["Contested"] = "Contested";
1326
774
  })(FeeStatus || (FeeStatus = {}));
1327
-
1328
775
  var MedicalStatus;
1329
-
1330
776
  (function (MedicalStatus) {
1331
777
  MedicalStatus["Creating"] = "Creating";
1332
778
  MedicalStatus["New"] = "New";
@@ -1337,9 +783,7 @@ var MedicalStatus;
1337
783
  MedicalStatus["Archived"] = "Archived";
1338
784
  MedicalStatus["Failed"] = "Failed";
1339
785
  })(MedicalStatus || (MedicalStatus = {}));
1340
-
1341
786
  var TaskStatus;
1342
-
1343
787
  (function (TaskStatus) {
1344
788
  TaskStatus["None"] = "None";
1345
789
  TaskStatus["ToDo"] = "ToDo";
@@ -1347,9 +791,7 @@ var TaskStatus;
1347
791
  TaskStatus["Blocked"] = "Blocked";
1348
792
  TaskStatus["Done"] = "Done";
1349
793
  })(TaskStatus || (TaskStatus = {}));
1350
-
1351
794
  var ClosedReasonType;
1352
-
1353
795
  (function (ClosedReasonType) {
1354
796
  /**
1355
797
  * A completed consultation
@@ -1358,35 +800,28 @@ var ClosedReasonType;
1358
800
  /**
1359
801
  * The conclusion was that what the patient submitted was not a disease
1360
802
  */
1361
-
1362
803
  ClosedReasonType["NotADisease"] = "NotADisease";
1363
804
  /**
1364
805
  * The consultation was not appropriate for virtual
1365
806
  */
1366
-
1367
807
  ClosedReasonType["NotAppropriateForVirtual"] = "NotAppropriateForVirtual";
1368
808
  /**
1369
809
  * Any other reason why the consultation was closed
1370
810
  */
1371
-
1372
811
  ClosedReasonType["Other"] = "Other";
1373
812
  /**
1374
813
  * A consultation that is required to be done in person
1375
814
  */
1376
-
1377
815
  ClosedReasonType["RequiresInPerson"] = "RequiresInPerson";
1378
816
  })(ClosedReasonType || (ClosedReasonType = {}));
1379
817
 
1380
818
  var VisibilityType;
1381
-
1382
819
  (function (VisibilityType) {
1383
820
  VisibilityType["Generic"] = "Generic";
1384
821
  VisibilityType["Private"] = "Private";
1385
822
  VisibilityType["Instance"] = "Instance";
1386
823
  })(VisibilityType || (VisibilityType = {}));
1387
-
1388
824
  var DrugType;
1389
-
1390
825
  (function (DrugType) {
1391
826
  DrugType["Generic"] = "Generic";
1392
827
  DrugType["Instance"] = "Instance";
@@ -1395,17 +830,12 @@ var DrugType;
1395
830
  * Status of the prescription
1396
831
  * Right now, it only serves a soft delete flag
1397
832
  */
1398
-
1399
-
1400
833
  var PrescriptionStatus;
1401
-
1402
834
  (function (PrescriptionStatus) {
1403
835
  PrescriptionStatus["Existing"] = "Existing";
1404
836
  PrescriptionStatus["Deleted"] = "Deleted";
1405
837
  })(PrescriptionStatus || (PrescriptionStatus = {}));
1406
-
1407
838
  var PlanStatus;
1408
-
1409
839
  (function (PlanStatus) {
1410
840
  PlanStatus["Pending"] = "Pending";
1411
841
  PlanStatus["Accepted"] = "Accepted";
@@ -1415,88 +845,69 @@ var PlanStatus;
1415
845
 
1416
846
  var AuthenticationFailed = /*#__PURE__*/function (_Error) {
1417
847
  _inheritsLoose(AuthenticationFailed, _Error);
1418
-
1419
848
  function AuthenticationFailed() {
1420
849
  return _Error.apply(this, arguments) || this;
1421
850
  }
1422
-
1423
851
  return AuthenticationFailed;
1424
852
  }( /*#__PURE__*/_wrapNativeSuper(Error));
1425
853
  var AuthenticationBadRequest = /*#__PURE__*/function (_Error2) {
1426
854
  _inheritsLoose(AuthenticationBadRequest, _Error2);
1427
-
1428
855
  function AuthenticationBadRequest() {
1429
856
  return _Error2.apply(this, arguments) || this;
1430
857
  }
1431
-
1432
858
  return AuthenticationBadRequest;
1433
859
  }( /*#__PURE__*/_wrapNativeSuper(Error));
1434
860
  var AuthenticationServerError = /*#__PURE__*/function (_Error3) {
1435
861
  _inheritsLoose(AuthenticationServerError, _Error3);
1436
-
1437
862
  function AuthenticationServerError() {
1438
863
  return _Error3.apply(this, arguments) || this;
1439
864
  }
1440
-
1441
865
  return AuthenticationServerError;
1442
866
  }( /*#__PURE__*/_wrapNativeSuper(Error));
1443
867
  var AuthenticationUnconfirmedEmail = /*#__PURE__*/function (_Error4) {
1444
868
  _inheritsLoose(AuthenticationUnconfirmedEmail, _Error4);
1445
-
1446
869
  function AuthenticationUnconfirmedEmail() {
1447
870
  return _Error4.apply(this, arguments) || this;
1448
871
  }
1449
-
1450
872
  return AuthenticationUnconfirmedEmail;
1451
873
  }( /*#__PURE__*/_wrapNativeSuper(Error));
1452
874
  var IdentityCreationFailed = /*#__PURE__*/function (_Error5) {
1453
875
  _inheritsLoose(IdentityCreationFailed, _Error5);
1454
-
1455
876
  function IdentityCreationFailed() {
1456
877
  return _Error5.apply(this, arguments) || this;
1457
878
  }
1458
-
1459
879
  return IdentityCreationFailed;
1460
880
  }( /*#__PURE__*/_wrapNativeSuper(Error));
1461
881
  var IdentityCreationBadRequest = /*#__PURE__*/function (_Error6) {
1462
882
  _inheritsLoose(IdentityCreationBadRequest, _Error6);
1463
-
1464
883
  function IdentityCreationBadRequest() {
1465
884
  return _Error6.apply(this, arguments) || this;
1466
885
  }
1467
-
1468
886
  return IdentityCreationBadRequest;
1469
887
  }( /*#__PURE__*/_wrapNativeSuper(Error));
1470
888
  var IdentityCreationConflict = /*#__PURE__*/function (_Error7) {
1471
889
  _inheritsLoose(IdentityCreationConflict, _Error7);
1472
-
1473
890
  function IdentityCreationConflict() {
1474
891
  return _Error7.apply(this, arguments) || this;
1475
892
  }
1476
-
1477
893
  return IdentityCreationConflict;
1478
894
  }( /*#__PURE__*/_wrapNativeSuper(Error));
1479
895
  var VaultDataMissing = /*#__PURE__*/function (_Error8) {
1480
896
  _inheritsLoose(VaultDataMissing, _Error8);
1481
-
1482
897
  function VaultDataMissing() {
1483
898
  return _Error8.apply(this, arguments) || this;
1484
899
  }
1485
-
1486
900
  return VaultDataMissing;
1487
901
  }( /*#__PURE__*/_wrapNativeSuper(Error));
1488
902
 
1489
903
  var WorkflowType;
1490
-
1491
904
  (function (WorkflowType) {
1492
905
  WorkflowType["Onboard"] = "Onboard";
1493
906
  WorkflowType["Followup"] = "Followup";
1494
907
  WorkflowType["Renew"] = "Renew";
1495
908
  WorkflowType["DataRetrieve"] = "DataRetrieve";
1496
909
  })(WorkflowType || (WorkflowType = {}));
1497
-
1498
910
  var RateDimension;
1499
-
1500
911
  (function (RateDimension) {
1501
912
  RateDimension["RatioOnTotal"] = "RatioOnTotal";
1502
913
  RateDimension["FixedOnTotal"] = "FixedOnTotal";
@@ -1507,27 +918,21 @@ var RateDimension;
1507
918
  RateDimension["RatioOnItem"] = "RatioOnItem";
1508
919
  RateDimension["FixedOnItem"] = "FixedOnItem";
1509
920
  })(RateDimension || (RateDimension = {}));
1510
-
1511
921
  var PlanType;
1512
-
1513
922
  (function (PlanType) {
1514
923
  PlanType["Onboard"] = "Onboard";
1515
924
  PlanType["Followup"] = "Followup";
1516
925
  PlanType["Renew"] = "Renew";
1517
926
  PlanType["DataRetrieve"] = "DataRetrieve";
1518
927
  })(PlanType || (PlanType = {}));
1519
-
1520
928
  var PaymentStatus;
1521
-
1522
929
  (function (PaymentStatus) {
1523
930
  PaymentStatus["Pending"] = "Pending";
1524
931
  PaymentStatus["Success"] = "Success";
1525
932
  PaymentStatus["Failure"] = "Failure";
1526
933
  PaymentStatus["Canceled"] = "Canceled";
1527
934
  })(PaymentStatus || (PaymentStatus = {}));
1528
-
1529
935
  var PractitionerStatus;
1530
-
1531
936
  (function (PractitionerStatus) {
1532
937
  PractitionerStatus["Practicing"] = "Practicing";
1533
938
  PractitionerStatus["Retired"] = "Retired";
@@ -1537,17 +942,13 @@ var PractitionerStatus;
1537
942
  PractitionerStatus["InConflict"] = "InConflict";
1538
943
  PractitionerStatus["Delicensed"] = "Delicensed";
1539
944
  })(PractitionerStatus || (PractitionerStatus = {}));
1540
-
1541
945
  var AssignmentStatus;
1542
-
1543
946
  (function (AssignmentStatus) {
1544
947
  AssignmentStatus["Assigned"] = "Assigned";
1545
948
  AssignmentStatus["Reassigned"] = "Reassigned";
1546
949
  AssignmentStatus["Cancelled"] = "Cancelled";
1547
950
  })(AssignmentStatus || (AssignmentStatus = {}));
1548
-
1549
951
  var PractitionnerRoleType;
1550
-
1551
952
  (function (PractitionnerRoleType) {
1552
953
  PractitionnerRoleType["Doctor"] = "Doctor";
1553
954
  PractitionnerRoleType["MedicalAssistant"] = "MedicalAssistant";
@@ -1559,17 +960,13 @@ var PractitionnerRoleType;
1559
960
  PractitionnerRoleType["ManualDispatcher"] = "ManualDispatcher";
1560
961
  PractitionnerRoleType["Other"] = "Other";
1561
962
  })(PractitionnerRoleType || (PractitionnerRoleType = {}));
1562
-
1563
963
  var OtherRoleType;
1564
-
1565
964
  (function (OtherRoleType) {
1566
965
  OtherRoleType["Patient"] = "Patient";
1567
966
  OtherRoleType["User"] = "User";
1568
967
  OtherRoleType["System"] = "System";
1569
968
  })(OtherRoleType || (OtherRoleType = {}));
1570
-
1571
969
  var LicenseStatus;
1572
-
1573
970
  (function (LicenseStatus) {
1574
971
  LicenseStatus["Valid"] = "Valid";
1575
972
  LicenseStatus["Invalid"] = "Invalid";
@@ -1577,9 +974,7 @@ var LicenseStatus;
1577
974
  LicenseStatus["NA"] = "NA";
1578
975
  LicenseStatus["Removed"] = "Removed";
1579
976
  })(LicenseStatus || (LicenseStatus = {}));
1580
-
1581
977
  var PeriodType;
1582
-
1583
978
  (function (PeriodType) {
1584
979
  PeriodType["PerYear"] = "PerYear";
1585
980
  PeriodType["PerQuarter"] = "PerQuarter";
@@ -1589,9 +984,7 @@ var PeriodType;
1589
984
  PeriodType["PerDay"] = "PerDay";
1590
985
  PeriodType["PerHour"] = "PerHour";
1591
986
  })(PeriodType || (PeriodType = {}));
1592
-
1593
987
  var SyncStatus;
1594
-
1595
988
  (function (SyncStatus) {
1596
989
  SyncStatus["Requested"] = "Requested";
1597
990
  SyncStatus["Started"] = "Started";
@@ -1599,9 +992,7 @@ var SyncStatus;
1599
992
  SyncStatus["Failed"] = "Failed";
1600
993
  SyncStatus["Cancelled"] = "Cancelled";
1601
994
  })(SyncStatus || (SyncStatus = {}));
1602
-
1603
995
  var PracticeEmailKind;
1604
-
1605
996
  (function (PracticeEmailKind) {
1606
997
  PracticeEmailKind["SignedUp"] = "SignedUp";
1607
998
  PracticeEmailKind["Onboarded"] = "Onboarded";
@@ -1631,10 +1022,7 @@ var PracticeEmailKind;
1631
1022
  * To be extra explicit, if you want to show a functionnality only in one practice, you will have to add a practice configs in all other practice to hide it (yes it is cumbersome).
1632
1023
  *
1633
1024
  */
1634
-
1635
-
1636
1025
  var PracticeConfigKind;
1637
-
1638
1026
  (function (PracticeConfigKind) {
1639
1027
  PracticeConfigKind["PatientConsultCard"] = "PatientConsultCard";
1640
1028
  PracticeConfigKind["PracticeCloseConsultationTypes"] = "PracticeCloseConsultationTypes";
@@ -1655,9 +1043,7 @@ var PracticeConfigKind;
1655
1043
  PracticeConfigKind["PracticeAddressField"] = "PracticeAddressField";
1656
1044
  PracticeConfigKind["PracticeDiagnosisAndTreatment"] = "PracticeDiagnosisAndTreatment";
1657
1045
  })(PracticeConfigKind || (PracticeConfigKind = {}));
1658
-
1659
1046
  var StripePriceType;
1660
-
1661
1047
  (function (StripePriceType) {
1662
1048
  StripePriceType["Default"] = "Default";
1663
1049
  StripePriceType["Discount"] = "Discount";
@@ -1665,25 +1051,19 @@ var StripePriceType;
1665
1051
  /**
1666
1052
  * All the PaymentIntentRequestMetadata Kind available
1667
1053
  */
1668
-
1669
-
1670
1054
  var PaymentIntentRequestMetadataKind;
1671
-
1672
1055
  (function (PaymentIntentRequestMetadataKind) {
1673
1056
  PaymentIntentRequestMetadataKind["ConsultRequestMetadata"] = "ConsultRequestMetadata";
1674
1057
  PaymentIntentRequestMetadataKind["RefillTreatmentRequestMetadata"] = "RefillTreatmentRequestMetadata";
1675
1058
  })(PaymentIntentRequestMetadataKind || (PaymentIntentRequestMetadataKind = {}));
1676
1059
 
1677
1060
  var IndexKey;
1678
-
1679
1061
  (function (IndexKey) {
1680
1062
  IndexKey["Consultation"] = "Consultation";
1681
1063
  IndexKey["IndexSnapshot"] = "IndexSnapshot";
1682
1064
  IndexKey["ConsultationLockbox"] = "ConsultationLockbox";
1683
1065
  })(IndexKey || (IndexKey = {}));
1684
-
1685
1066
  var DocumentType;
1686
-
1687
1067
  (function (DocumentType) {
1688
1068
  DocumentType["Message"] = "Message";
1689
1069
  DocumentType["Note"] = "Note";
@@ -1702,15 +1082,12 @@ var DocumentType;
1702
1082
  })(DocumentType || (DocumentType = {}));
1703
1083
 
1704
1084
  var InputApplyFunctions;
1705
-
1706
1085
  (function (InputApplyFunctions) {
1707
- InputApplyFunctions["MakeUpperCase"] = "MakeUpperCase";
1708
- InputApplyFunctions["MakeLowerCase"] = "MakeLowerCase";
1709
- InputApplyFunctions["RemoveAllSpaces"] = "RemoveAllSpaces";
1086
+ InputApplyFunctions["AllUpperCase"] = "AllUpperCase";
1087
+ InputApplyFunctions["AllLowerCase"] = "AllLowerCase";
1088
+ InputApplyFunctions["NoSpaces"] = "NoSpaces";
1710
1089
  })(InputApplyFunctions || (InputApplyFunctions = {}));
1711
-
1712
1090
  var MetadataCategory;
1713
-
1714
1091
  (function (MetadataCategory) {
1715
1092
  MetadataCategory["ChildPersonal"] = "ChildPersonal";
1716
1093
  MetadataCategory["Consultation"] = "Consultation";
@@ -1727,7 +1104,6 @@ var MetadataCategory;
1727
1104
  })(MetadataCategory || (MetadataCategory = {}));
1728
1105
 
1729
1106
  var IndexKind;
1730
-
1731
1107
  (function (IndexKind) {
1732
1108
  IndexKind[IndexKind["consultUuid"] = 0] = "consultUuid";
1733
1109
  IndexKind[IndexKind["consultShortid"] = 1] = "consultShortid";
@@ -1742,9 +1118,7 @@ var ConsultService = /*#__PURE__*/function () {
1742
1118
  this.api = api;
1743
1119
  this.baseURL = baseURL;
1744
1120
  }
1745
-
1746
1121
  var _proto = ConsultService.prototype;
1747
-
1748
1122
  _proto.consultCreate = function consultCreate(c) {
1749
1123
  return this.api.post(this.baseURL + "/v1/consults", c);
1750
1124
  }
@@ -1764,9 +1138,7 @@ var ConsultService = /*#__PURE__*/function () {
1764
1138
  * @param filterIsoLocality the of isoLocality to filter with
1765
1139
  * @param filterAssignee array of practitioner uuids with which you want to filter the consultations
1766
1140
  * @returns a number of consult
1767
- */
1768
- ;
1769
-
1141
+ */;
1770
1142
  _proto.countConsults = function countConsults(uuidPractice, uuidRequester, statusesMedical, statusesExclude, shortId, columnToSortTo, orderToSortTo, perPage, indexPage, filterAssignedDoctor, filterCurrentPractitioner, filterIsoLocality, filterAssignee, typesConsult, uuidParent) {
1771
1143
  return this.api.head(this.baseURL + "/v1/consults", {
1772
1144
  params: {
@@ -1790,11 +1162,9 @@ var ConsultService = /*#__PURE__*/function () {
1790
1162
  if (!resContentRange || typeof resContentRange !== 'string' && typeof resContentRange !== 'number') {
1791
1163
  return 0;
1792
1164
  }
1793
-
1794
1165
  if (typeof resContentRange === 'number') {
1795
1166
  return resContentRange;
1796
1167
  }
1797
-
1798
1168
  return parseInt(resContentRange);
1799
1169
  });
1800
1170
  }
@@ -1813,9 +1183,7 @@ var ConsultService = /*#__PURE__*/function () {
1813
1183
  * @param filterCurrentPractitioner the uuid of the current assistant assigned to filter with
1814
1184
  * @param filterIsoLocality the of isoLocality to filter with
1815
1185
  * @returns a list of consult
1816
- */
1817
- ;
1818
-
1186
+ */;
1819
1187
  _proto.getConsults = function getConsults(uuidPractice, uuidRequester, statusesMedical, statusesExclude, shortId, columnToSortTo, orderToSortTo, perPage, indexPage, filterAssignedDoctor, filterCurrentPractitioner, filterIsoLocality, filterAssignee, uuidParent, typesConsult) {
1820
1188
  return this.api.get(this.baseURL + "/v1/consults", {
1821
1189
  params: {
@@ -1837,7 +1205,6 @@ var ConsultService = /*#__PURE__*/function () {
1837
1205
  }
1838
1206
  });
1839
1207
  };
1840
-
1841
1208
  _proto.getConsultByUUID = function getConsultByUUID(uuidConsult, uuidPractice) {
1842
1209
  return this.api.get(this.baseURL + "/v1/consults/" + uuidConsult, {
1843
1210
  params: {
@@ -1845,7 +1212,6 @@ var ConsultService = /*#__PURE__*/function () {
1845
1212
  }
1846
1213
  });
1847
1214
  };
1848
-
1849
1215
  _proto.updateConsultByUUID = function updateConsultByUUID(uuidConsult, consult, uuidPractice, uuidRequester) {
1850
1216
  return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult, consult, {
1851
1217
  params: {
@@ -1854,7 +1220,6 @@ var ConsultService = /*#__PURE__*/function () {
1854
1220
  }
1855
1221
  });
1856
1222
  };
1857
-
1858
1223
  _proto.getConsultFaxStatuses = function getConsultFaxStatuses(uuidConsult) {
1859
1224
  return this.api.get(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions", {
1860
1225
  params: {
@@ -1862,64 +1227,52 @@ var ConsultService = /*#__PURE__*/function () {
1862
1227
  }
1863
1228
  });
1864
1229
  };
1865
-
1866
- _proto.postConsultTransmission = function postConsultTransmission(uuidConsult, nameDriver, addressOrPhoneToSendTo, file, nameReceiver, txtTransmissionTitle, txtTransmissionNotes // numTry ?: number,
1230
+ _proto.postConsultTransmission = function postConsultTransmission(uuidConsult, nameDriver, addressOrPhoneToSendTo, file, nameReceiver, txtTransmissionTitle, txtTransmissionNotes
1231
+ // numTry ?: number,
1867
1232
  // delay ?: number,
1868
1233
  ) {
1869
1234
  if (nameDriver === void 0) {
1870
1235
  nameDriver = 'Documo';
1871
1236
  }
1872
-
1873
1237
  var data = new FormData();
1874
1238
  data.append('nameDriverReceiver', nameDriver);
1875
-
1876
1239
  if (addressOrPhoneToSendTo) {
1877
1240
  data.append('addressReceiver', addressOrPhoneToSendTo);
1878
1241
  }
1879
-
1880
1242
  if (file) {
1881
1243
  data.append('file', file);
1882
1244
  }
1883
-
1884
1245
  if (nameReceiver) {
1885
1246
  data.append('nameReceiver', nameReceiver);
1886
1247
  }
1887
-
1888
1248
  if (txtTransmissionTitle) {
1889
1249
  data.append('txtTransmissionTitle', txtTransmissionTitle);
1890
1250
  }
1891
-
1892
1251
  if (txtTransmissionNotes) {
1893
1252
  data.append('txtTransmissionNotes', txtTransmissionNotes);
1894
1253
  }
1895
-
1896
1254
  return this.api.post(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions", data, {
1897
1255
  headers: {
1898
1256
  'Content-Type': 'multipart/form-data;'
1899
1257
  }
1900
1258
  });
1901
1259
  };
1902
-
1903
1260
  _proto.postConsultFax = function postConsultFax(uuidConsult, addressReceiver, file) {
1904
1261
  return this.postConsultTransmission(uuidConsult, 'Documo', addressReceiver, file);
1905
1262
  };
1906
-
1907
1263
  _proto.postConsultEmail = function postConsultEmail(uuidConsult, file) {
1908
1264
  return this.postConsultTransmission(uuidConsult, 'Pharmacierge', undefined, file);
1909
1265
  };
1910
-
1911
1266
  _proto.retryConsultFax = function retryConsultFax(uuidConsult, transmissionId) {
1912
1267
  return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions/" + transmissionId, {
1913
1268
  status: TransmissionStatus.Retrying
1914
1269
  });
1915
1270
  };
1916
-
1917
1271
  _proto.updateConsultTransmissionStatus = function updateConsultTransmissionStatus(transmissionId, uuidConsult, newStatus) {
1918
1272
  return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions/" + transmissionId, {
1919
1273
  status: newStatus
1920
1274
  });
1921
1275
  };
1922
-
1923
1276
  return ConsultService;
1924
1277
  }();
1925
1278
 
@@ -1928,9 +1281,7 @@ var DiagnosisService = /*#__PURE__*/function () {
1928
1281
  this.api = api;
1929
1282
  this.baseURL = baseURL;
1930
1283
  }
1931
-
1932
1284
  var _proto = DiagnosisService.prototype;
1933
-
1934
1285
  _proto.getDiagnoses = function getDiagnoses() {
1935
1286
  return this.api.get(this.baseURL + "/v1/diagnoses");
1936
1287
  }
@@ -1938,21 +1289,16 @@ var DiagnosisService = /*#__PURE__*/function () {
1938
1289
  * Get a diagnosis by uuid that belongs to your practice
1939
1290
  * @param uuidDiagnosis the uuid of the diagnosis
1940
1291
  * @returns a diagnosis
1941
- */
1942
- ;
1943
-
1292
+ */;
1944
1293
  _proto.getDiagnosisByUuid = function getDiagnosisByUuid(uuidDiagnosis) {
1945
1294
  return this.api.get(this.baseURL + "/v1/diagnoses/" + uuidDiagnosis);
1946
1295
  };
1947
-
1948
1296
  _proto.createDiagnosis = function createDiagnosis(diagnosis) {
1949
1297
  return this.api.post(this.baseURL + "/v1/diagnoses", diagnosis);
1950
1298
  };
1951
-
1952
1299
  _proto.updateDiagnosis = function updateDiagnosis(uuid, diagnosis) {
1953
1300
  return this.api.put(this.baseURL + "/v1/diagnoses/" + uuid, diagnosis);
1954
1301
  };
1955
-
1956
1302
  _proto.getTreatmentsFromDiagnosisUuid = function getTreatmentsFromDiagnosisUuid(diagnosisUuid) {
1957
1303
  return this.api.get(this.baseURL + "/v1/diagnoses/" + diagnosisUuid + "/treatments");
1958
1304
  }
@@ -1960,9 +1306,7 @@ var DiagnosisService = /*#__PURE__*/function () {
1960
1306
  * This function returns treatment plans associated to a consult
1961
1307
  * @param uuidConsult the consult uuid to fetch
1962
1308
  * @returns an array of TreatmentPlan
1963
- */
1964
- ;
1965
-
1309
+ */;
1966
1310
  _proto.getTreatmentPlansFromConsultUuid = function getTreatmentPlansFromConsultUuid(uuidConsult) {
1967
1311
  return this.api.get(this.baseURL + "/v1/treatment-plans/", {
1968
1312
  params: {
@@ -1974,9 +1318,7 @@ var DiagnosisService = /*#__PURE__*/function () {
1974
1318
  * creates a new treatment for the specified diagnosis
1975
1319
  * @param diagnosisUuid uuid of the diagnosis that the treatment is linked to
1976
1320
  * @param treatmentRequest the treatment to be inserted
1977
- */
1978
- ;
1979
-
1321
+ */;
1980
1322
  _proto.createTreatment = function createTreatment(diagnosisUuid, treatmentRequest) {
1981
1323
  return this.api.post(this.baseURL + "/v1/diagnoses/" + diagnosisUuid + "/treatments", treatmentRequest);
1982
1324
  }
@@ -1984,9 +1326,7 @@ var DiagnosisService = /*#__PURE__*/function () {
1984
1326
  * This function returns populated treatment plans associated to a consult
1985
1327
  * @param uuidConsult the consult uuid to fetch
1986
1328
  * @returns a TreatmentPlans object
1987
- */
1988
- ;
1989
-
1329
+ */;
1990
1330
  _proto.getTreatmentPlansPopulatedFromConsultUuid = function getTreatmentPlansPopulatedFromConsultUuid(uuidConsult) {
1991
1331
  return this.api.get(this.baseURL + "/v1/treatment-plans/", {
1992
1332
  params: {
@@ -1995,11 +1335,9 @@ var DiagnosisService = /*#__PURE__*/function () {
1995
1335
  }
1996
1336
  });
1997
1337
  };
1998
-
1999
1338
  _proto.postPlans = function postPlans(plans) {
2000
1339
  return this.api.post(this.baseURL + "/v1/treatment-plans", plans);
2001
1340
  };
2002
-
2003
1341
  _proto.updateTreatmentPlan = function updateTreatmentPlan(uuidPlan, uuidConsult, diagnosisRequest, plan, refill) {
2004
1342
  return this.api.put(this.baseURL + "/v1/treatment-plans/" + uuidPlan, {
2005
1343
  uuidConsult: uuidConsult,
@@ -2008,7 +1346,6 @@ var DiagnosisService = /*#__PURE__*/function () {
2008
1346
  refill: refill
2009
1347
  });
2010
1348
  };
2011
-
2012
1349
  _proto.acceptTreatmentPlan = function acceptTreatmentPlan(uuidPlan, uuidConsult) {
2013
1350
  return this.api.put(this.baseURL + "/v1/treatment-plans/" + uuidPlan + "/accept", {
2014
1351
  uuidConsult: uuidConsult
@@ -2017,34 +1354,27 @@ var DiagnosisService = /*#__PURE__*/function () {
2017
1354
  /**
2018
1355
  * retrieves all the drugs of the specified practice
2019
1356
  * @param uuidPractice
2020
- */
2021
- ;
2022
-
1357
+ */;
2023
1358
  _proto.getAllDrugs =
2024
1359
  /*#__PURE__*/
2025
1360
  function () {
2026
- var _getAllDrugs = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(uuidPractice) {
1361
+ var _getAllDrugs = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(uuidPractice) {
2027
1362
  var res;
2028
- return runtime_1.wrap(function _callee$(_context) {
1363
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
2029
1364
  while (1) {
2030
1365
  switch (_context.prev = _context.next) {
2031
1366
  case 0:
2032
1367
  _context.next = 2;
2033
1368
  return this.api.get(this.baseURL + "/v1/drugs/practice/" + uuidPractice);
2034
-
2035
1369
  case 2:
2036
1370
  res = _context.sent;
2037
-
2038
1371
  if (!(res && res.foundDrugs)) {
2039
1372
  _context.next = 5;
2040
1373
  break;
2041
1374
  }
2042
-
2043
1375
  return _context.abrupt("return", res.foundDrugs);
2044
-
2045
1376
  case 5:
2046
1377
  return _context.abrupt("return", undefined);
2047
-
2048
1378
  case 6:
2049
1379
  case "end":
2050
1380
  return _context.stop();
@@ -2052,14 +1382,11 @@ var DiagnosisService = /*#__PURE__*/function () {
2052
1382
  }
2053
1383
  }, _callee, this);
2054
1384
  }));
2055
-
2056
1385
  function getAllDrugs(_x) {
2057
1386
  return _getAllDrugs.apply(this, arguments);
2058
1387
  }
2059
-
2060
1388
  return getAllDrugs;
2061
1389
  }();
2062
-
2063
1390
  return DiagnosisService;
2064
1391
  }();
2065
1392
 
@@ -2068,7 +1395,6 @@ var GuardService = /*#__PURE__*/function () {
2068
1395
  this.api = api;
2069
1396
  this.baseURL = baseURL;
2070
1397
  this.api.setAuthRefreshFn(this.authRefresh.bind(this)); // This is the default behavior for User JWT tokens. If you want other kind of refresh you shall overwrite this call
2071
-
2072
1398
  this.identityCache = {};
2073
1399
  this.whoAmICache = {};
2074
1400
  }
@@ -2083,10 +1409,7 @@ var GuardService = /*#__PURE__*/function () {
2083
1409
  * ```
2084
1410
  * @param tokens
2085
1411
  */
2086
-
2087
-
2088
1412
  var _proto = GuardService.prototype;
2089
-
2090
1413
  _proto.setTokens = function setTokens(tokens) {
2091
1414
  this.api.setTokens(_extends({}, this.api.getTokens(), tokens));
2092
1415
  }
@@ -2095,16 +1418,13 @@ var GuardService = /*#__PURE__*/function () {
2095
1418
  *
2096
1419
  * @param req The credentials required to get an access token
2097
1420
  * @returns AuthTokenResponse
2098
- */
2099
- ;
2100
-
1421
+ */;
2101
1422
  _proto.m2mToken =
2102
1423
  /*#__PURE__*/
2103
1424
  function () {
2104
- var _m2mToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(req) {
1425
+ var _m2mToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(req) {
2105
1426
  var resp, config, _e$response, code;
2106
-
2107
- return runtime_1.wrap(function _callee$(_context) {
1427
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
2108
1428
  while (1) {
2109
1429
  switch (_context.prev = _context.next) {
2110
1430
  case 0:
@@ -2114,7 +1434,6 @@ var GuardService = /*#__PURE__*/function () {
2114
1434
  };
2115
1435
  _context.next = 4;
2116
1436
  return this.api.post(this.baseURL + "/v1/m2m/token", req, config);
2117
-
2118
1437
  case 4:
2119
1438
  resp = _context.sent;
2120
1439
  this.api.setTokens({
@@ -2122,37 +1441,28 @@ var GuardService = /*#__PURE__*/function () {
2122
1441
  });
2123
1442
  _context.next = 20;
2124
1443
  break;
2125
-
2126
1444
  case 8:
2127
1445
  _context.prev = 8;
2128
1446
  _context.t0 = _context["catch"](0);
2129
1447
  console.error('Error while posting m2m token:', _context.t0);
2130
-
2131
1448
  if (!_context.t0.isAxiosError) {
2132
1449
  _context.next = 19;
2133
1450
  break;
2134
1451
  }
2135
-
2136
1452
  code = (_e$response = _context.t0.response) == null ? void 0 : _e$response.status;
2137
1453
  _context.t1 = code;
2138
1454
  _context.next = _context.t1 === 400 ? 16 : _context.t1 === 500 ? 17 : _context.t1 === 401 ? 18 : 18;
2139
1455
  break;
2140
-
2141
1456
  case 16:
2142
1457
  throw new AuthenticationBadRequest();
2143
-
2144
1458
  case 17:
2145
1459
  throw new AuthenticationServerError();
2146
-
2147
1460
  case 18:
2148
1461
  throw new AuthenticationFailed();
2149
-
2150
1462
  case 19:
2151
1463
  throw new AuthenticationFailed();
2152
-
2153
1464
  case 20:
2154
1465
  return _context.abrupt("return", resp);
2155
-
2156
1466
  case 21:
2157
1467
  case "end":
2158
1468
  return _context.stop();
@@ -2160,11 +1470,9 @@ var GuardService = /*#__PURE__*/function () {
2160
1470
  }
2161
1471
  }, _callee, this, [[0, 8]]);
2162
1472
  }));
2163
-
2164
1473
  function m2mToken(_x) {
2165
1474
  return _m2mToken.apply(this, arguments);
2166
1475
  }
2167
-
2168
1476
  return m2mToken;
2169
1477
  }()
2170
1478
  /**
@@ -2175,14 +1483,12 @@ var GuardService = /*#__PURE__*/function () {
2175
1483
  * @returns AuthTokenResponse
2176
1484
  */
2177
1485
  ;
2178
-
2179
1486
  _proto.authToken =
2180
1487
  /*#__PURE__*/
2181
1488
  function () {
2182
- var _authToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(req) {
1489
+ var _authToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(req) {
2183
1490
  var resp, config, _e$response2, code;
2184
-
2185
- return runtime_1.wrap(function _callee2$(_context2) {
1491
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
2186
1492
  while (1) {
2187
1493
  switch (_context2.prev = _context2.next) {
2188
1494
  case 0:
@@ -2192,7 +1498,6 @@ var GuardService = /*#__PURE__*/function () {
2192
1498
  };
2193
1499
  _context2.next = 4;
2194
1500
  return this.api.post(this.baseURL + "/v1/auth/token", req, config);
2195
-
2196
1501
  case 4:
2197
1502
  resp = _context2.sent;
2198
1503
  this.api.setTokens({
@@ -2201,40 +1506,30 @@ var GuardService = /*#__PURE__*/function () {
2201
1506
  });
2202
1507
  _context2.next = 21;
2203
1508
  break;
2204
-
2205
1509
  case 8:
2206
1510
  _context2.prev = 8;
2207
1511
  _context2.t0 = _context2["catch"](0);
2208
1512
  console.error('Error while posting auth token:', _context2.t0);
2209
-
2210
1513
  if (!_context2.t0.isAxiosError) {
2211
1514
  _context2.next = 20;
2212
1515
  break;
2213
1516
  }
2214
-
2215
1517
  code = (_e$response2 = _context2.t0.response) == null ? void 0 : _e$response2.status;
2216
1518
  _context2.t1 = code;
2217
1519
  _context2.next = _context2.t1 === 400 ? 16 : _context2.t1 === 424 ? 17 : _context2.t1 === 500 ? 18 : _context2.t1 === 401 ? 19 : 19;
2218
1520
  break;
2219
-
2220
1521
  case 16:
2221
1522
  throw new AuthenticationBadRequest();
2222
-
2223
1523
  case 17:
2224
1524
  throw new AuthenticationUnconfirmedEmail();
2225
-
2226
1525
  case 18:
2227
1526
  throw new AuthenticationServerError();
2228
-
2229
1527
  case 19:
2230
1528
  throw new AuthenticationFailed();
2231
-
2232
1529
  case 20:
2233
1530
  throw new AuthenticationFailed();
2234
-
2235
1531
  case 21:
2236
1532
  return _context2.abrupt("return", resp);
2237
-
2238
1533
  case 22:
2239
1534
  case "end":
2240
1535
  return _context2.stop();
@@ -2242,11 +1537,9 @@ var GuardService = /*#__PURE__*/function () {
2242
1537
  }
2243
1538
  }, _callee2, this, [[0, 8]]);
2244
1539
  }));
2245
-
2246
1540
  function authToken(_x2) {
2247
1541
  return _authToken.apply(this, arguments);
2248
1542
  }
2249
-
2250
1543
  return authToken;
2251
1544
  }()
2252
1545
  /**
@@ -2255,13 +1548,12 @@ var GuardService = /*#__PURE__*/function () {
2255
1548
  * @returns AuthTokenResponse
2256
1549
  */
2257
1550
  ;
2258
-
2259
1551
  _proto.authRefresh =
2260
1552
  /*#__PURE__*/
2261
1553
  function () {
2262
- var _authRefresh = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(refreshToken) {
1554
+ var _authRefresh = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(refreshToken) {
2263
1555
  var config;
2264
- return runtime_1.wrap(function _callee3$(_context3) {
1556
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
2265
1557
  while (1) {
2266
1558
  switch (_context3.prev = _context3.next) {
2267
1559
  case 0:
@@ -2270,7 +1562,6 @@ var GuardService = /*#__PURE__*/function () {
2270
1562
  useRefreshToken: true
2271
1563
  };
2272
1564
  return _context3.abrupt("return", this.api.put(this.baseURL + "/v1/auth/token", null, config));
2273
-
2274
1565
  case 2:
2275
1566
  case "end":
2276
1567
  return _context3.stop();
@@ -2278,11 +1569,9 @@ var GuardService = /*#__PURE__*/function () {
2278
1569
  }
2279
1570
  }, _callee3, this);
2280
1571
  }));
2281
-
2282
1572
  function authRefresh(_x3) {
2283
1573
  return _authRefresh.apply(this, arguments);
2284
1574
  }
2285
-
2286
1575
  return authRefresh;
2287
1576
  }()
2288
1577
  /**
@@ -2291,17 +1580,15 @@ var GuardService = /*#__PURE__*/function () {
2291
1580
  * @returns void
2292
1581
  */
2293
1582
  ;
2294
-
2295
1583
  _proto.authLogout =
2296
1584
  /*#__PURE__*/
2297
1585
  function () {
2298
- var _authLogout = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4() {
2299
- return runtime_1.wrap(function _callee4$(_context4) {
1586
+ var _authLogout = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
1587
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
2300
1588
  while (1) {
2301
1589
  switch (_context4.prev = _context4.next) {
2302
1590
  case 0:
2303
1591
  return _context4.abrupt("return", this.api.get(this.baseURL + "/v1/auth/logout"));
2304
-
2305
1592
  case 1:
2306
1593
  case "end":
2307
1594
  return _context4.stop();
@@ -2309,11 +1596,9 @@ var GuardService = /*#__PURE__*/function () {
2309
1596
  }
2310
1597
  }, _callee4, this);
2311
1598
  }));
2312
-
2313
1599
  function authLogout() {
2314
1600
  return _authLogout.apply(this, arguments);
2315
1601
  }
2316
-
2317
1602
  return authLogout;
2318
1603
  }()
2319
1604
  /**
@@ -2323,17 +1608,15 @@ var GuardService = /*#__PURE__*/function () {
2323
1608
  * @returns void
2324
1609
  */
2325
1610
  ;
2326
-
2327
1611
  _proto.authRecover =
2328
1612
  /*#__PURE__*/
2329
1613
  function () {
2330
- var _authRecover = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(req) {
2331
- return runtime_1.wrap(function _callee5$(_context5) {
1614
+ var _authRecover = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(req) {
1615
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
2332
1616
  while (1) {
2333
1617
  switch (_context5.prev = _context5.next) {
2334
1618
  case 0:
2335
1619
  return _context5.abrupt("return", this.api.post(this.baseURL + "/v1/auth/recover", req));
2336
-
2337
1620
  case 1:
2338
1621
  case "end":
2339
1622
  return _context5.stop();
@@ -2341,11 +1624,9 @@ var GuardService = /*#__PURE__*/function () {
2341
1624
  }
2342
1625
  }, _callee5, this);
2343
1626
  }));
2344
-
2345
1627
  function authRecover(_x4) {
2346
1628
  return _authRecover.apply(this, arguments);
2347
1629
  }
2348
-
2349
1630
  return authRecover;
2350
1631
  }()
2351
1632
  /**
@@ -2356,21 +1637,18 @@ var GuardService = /*#__PURE__*/function () {
2356
1637
  * @returns IdentityResponse
2357
1638
  */
2358
1639
  ;
2359
-
2360
1640
  _proto.identityCreate =
2361
1641
  /*#__PURE__*/
2362
1642
  function () {
2363
- var _identityCreate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(req) {
1643
+ var _identityCreate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(req) {
2364
1644
  var resp, _e$response3, code;
2365
-
2366
- return runtime_1.wrap(function _callee6$(_context6) {
1645
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
2367
1646
  while (1) {
2368
1647
  switch (_context6.prev = _context6.next) {
2369
1648
  case 0:
2370
1649
  _context6.prev = 0;
2371
1650
  _context6.next = 3;
2372
1651
  return this.api.post(this.baseURL + "/v1/identities", req);
2373
-
2374
1652
  case 3:
2375
1653
  resp = _context6.sent;
2376
1654
  this.api.setTokens({
@@ -2378,36 +1656,27 @@ var GuardService = /*#__PURE__*/function () {
2378
1656
  });
2379
1657
  _context6.next = 18;
2380
1658
  break;
2381
-
2382
1659
  case 7:
2383
1660
  _context6.prev = 7;
2384
1661
  _context6.t0 = _context6["catch"](0);
2385
-
2386
1662
  if (!_context6.t0.isAxiosError) {
2387
1663
  _context6.next = 17;
2388
1664
  break;
2389
1665
  }
2390
-
2391
1666
  code = (_e$response3 = _context6.t0.response) == null ? void 0 : _e$response3.status;
2392
1667
  _context6.t1 = code;
2393
1668
  _context6.next = _context6.t1 === 400 ? 14 : _context6.t1 === 409 ? 15 : _context6.t1 === 500 ? 16 : 16;
2394
1669
  break;
2395
-
2396
1670
  case 14:
2397
1671
  throw new IdentityCreationBadRequest();
2398
-
2399
1672
  case 15:
2400
1673
  throw new IdentityCreationConflict();
2401
-
2402
1674
  case 16:
2403
1675
  throw new IdentityCreationFailed();
2404
-
2405
1676
  case 17:
2406
1677
  throw new IdentityCreationFailed();
2407
-
2408
1678
  case 18:
2409
1679
  return _context6.abrupt("return", resp);
2410
-
2411
1680
  case 19:
2412
1681
  case "end":
2413
1682
  return _context6.stop();
@@ -2415,11 +1684,9 @@ var GuardService = /*#__PURE__*/function () {
2415
1684
  }
2416
1685
  }, _callee6, this, [[0, 7]]);
2417
1686
  }));
2418
-
2419
1687
  function identityCreate(_x5) {
2420
1688
  return _identityCreate.apply(this, arguments);
2421
1689
  }
2422
-
2423
1690
  return identityCreate;
2424
1691
  }()
2425
1692
  /**
@@ -2431,49 +1698,38 @@ var GuardService = /*#__PURE__*/function () {
2431
1698
  * @returns IdentityResponse
2432
1699
  */
2433
1700
  ;
2434
-
2435
1701
  _proto.identityGet =
2436
1702
  /*#__PURE__*/
2437
1703
  function () {
2438
- var _identityGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(identityID, skipCache) {
1704
+ var _identityGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(identityID, skipCache) {
2439
1705
  var _tokens$accessToken, _tokens$refreshToken;
2440
-
2441
1706
  var tokens, cacheKey, identity;
2442
- return runtime_1.wrap(function _callee7$(_context7) {
1707
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
2443
1708
  while (1) {
2444
1709
  switch (_context7.prev = _context7.next) {
2445
1710
  case 0:
2446
1711
  if (skipCache === void 0) {
2447
1712
  skipCache = false;
2448
1713
  }
2449
-
2450
1714
  tokens = this.api.getTokens();
2451
1715
  cacheKey = ((_tokens$accessToken = tokens.accessToken) != null ? _tokens$accessToken : '') + ((_tokens$refreshToken = tokens.refreshToken) != null ? _tokens$refreshToken : '') + identityID;
2452
-
2453
1716
  if (!(skipCache || !tokens.accessToken || !this.identityCache[cacheKey])) {
2454
1717
  _context7.next = 10;
2455
1718
  break;
2456
1719
  }
2457
-
2458
1720
  _context7.next = 6;
2459
1721
  return this.api.get(this.baseURL + "/v1/identities/" + identityID);
2460
-
2461
1722
  case 6:
2462
1723
  identity = _context7.sent;
2463
-
2464
1724
  if (!skipCache) {
2465
1725
  _context7.next = 9;
2466
1726
  break;
2467
1727
  }
2468
-
2469
1728
  return _context7.abrupt("return", identity);
2470
-
2471
1729
  case 9:
2472
1730
  this.identityCache[cacheKey] = identity;
2473
-
2474
1731
  case 10:
2475
1732
  return _context7.abrupt("return", this.identityCache[cacheKey]);
2476
-
2477
1733
  case 11:
2478
1734
  case "end":
2479
1735
  return _context7.stop();
@@ -2481,11 +1737,9 @@ var GuardService = /*#__PURE__*/function () {
2481
1737
  }
2482
1738
  }, _callee7, this);
2483
1739
  }));
2484
-
2485
1740
  function identityGet(_x6, _x7) {
2486
1741
  return _identityGet.apply(this, arguments);
2487
1742
  }
2488
-
2489
1743
  return identityGet;
2490
1744
  }()
2491
1745
  /**
@@ -2495,38 +1749,30 @@ var GuardService = /*#__PURE__*/function () {
2495
1749
  * @returns WhoAmIResponse
2496
1750
  */
2497
1751
  ;
2498
-
2499
1752
  _proto.whoAmI =
2500
1753
  /*#__PURE__*/
2501
1754
  function () {
2502
- var _whoAmI = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(refreshCache) {
1755
+ var _whoAmI = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(refreshCache) {
2503
1756
  var _this$api$getTokens$a;
2504
-
2505
1757
  var cacheKey;
2506
- return runtime_1.wrap(function _callee8$(_context8) {
1758
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
2507
1759
  while (1) {
2508
1760
  switch (_context8.prev = _context8.next) {
2509
1761
  case 0:
2510
1762
  if (refreshCache === void 0) {
2511
1763
  refreshCache = false;
2512
1764
  }
2513
-
2514
1765
  cacheKey = (_this$api$getTokens$a = this.api.getTokens().accessToken) != null ? _this$api$getTokens$a : '';
2515
-
2516
1766
  if (!(!this.whoAmICache[cacheKey] || refreshCache)) {
2517
1767
  _context8.next = 6;
2518
1768
  break;
2519
1769
  }
2520
-
2521
1770
  _context8.next = 5;
2522
1771
  return this.api.get(this.baseURL + "/v1/auth/whoami");
2523
-
2524
1772
  case 5:
2525
1773
  this.whoAmICache[cacheKey] = _context8.sent;
2526
-
2527
1774
  case 6:
2528
1775
  return _context8.abrupt("return", this.whoAmICache[cacheKey]);
2529
-
2530
1776
  case 7:
2531
1777
  case "end":
2532
1778
  return _context8.stop();
@@ -2534,11 +1780,9 @@ var GuardService = /*#__PURE__*/function () {
2534
1780
  }
2535
1781
  }, _callee8, this);
2536
1782
  }));
2537
-
2538
1783
  function whoAmI(_x8) {
2539
1784
  return _whoAmI.apply(this, arguments);
2540
1785
  }
2541
-
2542
1786
  return whoAmI;
2543
1787
  }()
2544
1788
  /**
@@ -2549,17 +1793,15 @@ var GuardService = /*#__PURE__*/function () {
2549
1793
  * @returns IdentityResponse
2550
1794
  */
2551
1795
  ;
2552
-
2553
1796
  _proto.identityUpdate =
2554
1797
  /*#__PURE__*/
2555
1798
  function () {
2556
- var _identityUpdate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(identityID, req) {
2557
- return runtime_1.wrap(function _callee9$(_context9) {
1799
+ var _identityUpdate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(identityID, req) {
1800
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
2558
1801
  while (1) {
2559
1802
  switch (_context9.prev = _context9.next) {
2560
1803
  case 0:
2561
1804
  return _context9.abrupt("return", this.api.put(this.baseURL + "/v1/identities/" + identityID, req));
2562
-
2563
1805
  case 1:
2564
1806
  case "end":
2565
1807
  return _context9.stop();
@@ -2567,11 +1809,9 @@ var GuardService = /*#__PURE__*/function () {
2567
1809
  }
2568
1810
  }, _callee9, this);
2569
1811
  }));
2570
-
2571
1812
  function identityUpdate(_x9, _x10) {
2572
1813
  return _identityUpdate.apply(this, arguments);
2573
1814
  }
2574
-
2575
1815
  return identityUpdate;
2576
1816
  }()
2577
1817
  /**
@@ -2583,13 +1823,12 @@ var GuardService = /*#__PURE__*/function () {
2583
1823
  * @returns QRCodeResponse
2584
1824
  */
2585
1825
  ;
2586
-
2587
1826
  _proto.identityMFAQRCode =
2588
1827
  /*#__PURE__*/
2589
1828
  function () {
2590
- var _identityMFAQRCode = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(identityID, password) {
1829
+ var _identityMFAQRCode = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(identityID, password) {
2591
1830
  var req;
2592
- return runtime_1.wrap(function _callee10$(_context10) {
1831
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
2593
1832
  while (1) {
2594
1833
  switch (_context10.prev = _context10.next) {
2595
1834
  case 0:
@@ -2601,7 +1840,6 @@ var GuardService = /*#__PURE__*/function () {
2601
1840
  Accept: 'application/json'
2602
1841
  }
2603
1842
  }));
2604
-
2605
1843
  case 2:
2606
1844
  case "end":
2607
1845
  return _context10.stop();
@@ -2609,11 +1847,9 @@ var GuardService = /*#__PURE__*/function () {
2609
1847
  }
2610
1848
  }, _callee10, this);
2611
1849
  }));
2612
-
2613
1850
  function identityMFAQRCode(_x11, _x12) {
2614
1851
  return _identityMFAQRCode.apply(this, arguments);
2615
1852
  }
2616
-
2617
1853
  return identityMFAQRCode;
2618
1854
  }()
2619
1855
  /**
@@ -2623,17 +1859,15 @@ var GuardService = /*#__PURE__*/function () {
2623
1859
  * @return void
2624
1860
  */
2625
1861
  ;
2626
-
2627
1862
  _proto.identitySendConfirmEmail =
2628
1863
  /*#__PURE__*/
2629
1864
  function () {
2630
- var _identitySendConfirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(req) {
2631
- return runtime_1.wrap(function _callee11$(_context11) {
1865
+ var _identitySendConfirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(req) {
1866
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
2632
1867
  while (1) {
2633
1868
  switch (_context11.prev = _context11.next) {
2634
1869
  case 0:
2635
1870
  return _context11.abrupt("return", this.api.post(this.baseURL + "/v1/identity/confirm", req));
2636
-
2637
1871
  case 1:
2638
1872
  case "end":
2639
1873
  return _context11.stop();
@@ -2641,11 +1875,9 @@ var GuardService = /*#__PURE__*/function () {
2641
1875
  }
2642
1876
  }, _callee11, this);
2643
1877
  }));
2644
-
2645
1878
  function identitySendConfirmEmail(_x13) {
2646
1879
  return _identitySendConfirmEmail.apply(this, arguments);
2647
1880
  }
2648
-
2649
1881
  return identitySendConfirmEmail;
2650
1882
  }()
2651
1883
  /**
@@ -2655,17 +1887,15 @@ var GuardService = /*#__PURE__*/function () {
2655
1887
  * @returns IdentityResponse
2656
1888
  */
2657
1889
  ;
2658
-
2659
1890
  _proto.identityGetByCustomerEmail =
2660
1891
  /*#__PURE__*/
2661
1892
  function () {
2662
- var _identityGetByCustomerEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(email) {
2663
- return runtime_1.wrap(function _callee12$(_context12) {
1893
+ var _identityGetByCustomerEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(email) {
1894
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
2664
1895
  while (1) {
2665
1896
  switch (_context12.prev = _context12.next) {
2666
1897
  case 0:
2667
1898
  return _context12.abrupt("return", this.identityGetByHash(email.substring(email.indexOf('+') + 1, email.indexOf('@'))));
2668
-
2669
1899
  case 1:
2670
1900
  case "end":
2671
1901
  return _context12.stop();
@@ -2673,11 +1903,9 @@ var GuardService = /*#__PURE__*/function () {
2673
1903
  }
2674
1904
  }, _callee12, this);
2675
1905
  }));
2676
-
2677
1906
  function identityGetByCustomerEmail(_x14) {
2678
1907
  return _identityGetByCustomerEmail.apply(this, arguments);
2679
1908
  }
2680
-
2681
1909
  return identityGetByCustomerEmail;
2682
1910
  }()
2683
1911
  /**
@@ -2687,17 +1915,15 @@ var GuardService = /*#__PURE__*/function () {
2687
1915
  * @returns IdentityResponse
2688
1916
  */
2689
1917
  ;
2690
-
2691
1918
  _proto.identityGetByHash =
2692
1919
  /*#__PURE__*/
2693
1920
  function () {
2694
- var _identityGetByHash = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee13(b64Hash) {
2695
- return runtime_1.wrap(function _callee13$(_context13) {
1921
+ var _identityGetByHash = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(b64Hash) {
1922
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
2696
1923
  while (1) {
2697
1924
  switch (_context13.prev = _context13.next) {
2698
1925
  case 0:
2699
1926
  return _context13.abrupt("return", this.identityGet(b64Hash.replace(/\+/g, '-').replace(/\//g, '_')));
2700
-
2701
1927
  case 1:
2702
1928
  case "end":
2703
1929
  return _context13.stop();
@@ -2705,14 +1931,11 @@ var GuardService = /*#__PURE__*/function () {
2705
1931
  }
2706
1932
  }, _callee13, this);
2707
1933
  }));
2708
-
2709
1934
  function identityGetByHash(_x15) {
2710
1935
  return _identityGetByHash.apply(this, arguments);
2711
1936
  }
2712
-
2713
1937
  return identityGetByHash;
2714
1938
  }();
2715
-
2716
1939
  return GuardService;
2717
1940
  }();
2718
1941
 
@@ -2726,10 +1949,7 @@ var SearchService = /*#__PURE__*/function () {
2726
1949
  * @param consultUUID
2727
1950
  * @param terms the search terms to be indexed
2728
1951
  */
2729
-
2730
-
2731
1952
  var _proto = SearchService.prototype;
2732
-
2733
1953
  _proto.index = function index(consultUUID, terms) {
2734
1954
  return this.api.post(this.baseURL + "/v1/index", {
2735
1955
  consultUUID: consultUUID,
@@ -2739,15 +1959,12 @@ var SearchService = /*#__PURE__*/function () {
2739
1959
  /**
2740
1960
  * Searches for the consultations corresponding to the search terms entered in the query
2741
1961
  * @param terms array of search terms
2742
- */
2743
- ;
2744
-
1962
+ */;
2745
1963
  _proto.search = function search(terms) {
2746
1964
  return this.api.post(this.baseURL + "/v1/search", {
2747
1965
  terms: terms
2748
1966
  });
2749
1967
  };
2750
-
2751
1968
  return SearchService;
2752
1969
  }();
2753
1970
 
@@ -2761,10 +1978,7 @@ var PracticeService = /*#__PURE__*/function () {
2761
1978
  * an M2M with the scope `practice.practices.get`
2762
1979
  * @returns an array of practices
2763
1980
  */
2764
-
2765
-
2766
1981
  var _proto = PracticeService.prototype;
2767
-
2768
1982
  _proto.practiceGetAll = function practiceGetAll() {
2769
1983
  return this.api.get(this.baseURL + "/v1/practices");
2770
1984
  }
@@ -2775,9 +1989,7 @@ var PracticeService = /*#__PURE__*/function () {
2775
1989
  * @param hydratePracticeConfigs (optional) if set true it the Practice field configs will be set
2776
1990
  * @param accounts (optional) if set true it the Practice field accounts will be set
2777
1991
  * @returns the found practice or undefined
2778
- */
2779
- ;
2780
-
1992
+ */;
2781
1993
  _proto.practiceGetFromURL = function practiceGetFromURL(practiceURL, params) {
2782
1994
  return this.api.get(this.baseURL + "/v1/practices", {
2783
1995
  params: _extends({
@@ -2785,7 +1997,6 @@ var PracticeService = /*#__PURE__*/function () {
2785
1997
  }, params)
2786
1998
  });
2787
1999
  };
2788
-
2789
2000
  _proto.practiceGetFromUuid = function practiceGetFromUuid(practiceUuid, locale, withAccounts) {
2790
2001
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid, {
2791
2002
  params: {
@@ -2793,15 +2004,13 @@ var PracticeService = /*#__PURE__*/function () {
2793
2004
  accounts: withAccounts
2794
2005
  }
2795
2006
  });
2796
- } /// Practice Configs
2797
-
2007
+ }
2008
+ /// Practice Configs
2798
2009
  /**
2799
2010
  * This function retrieves all configs of a specific practice
2800
2011
  * @param practiceUuid uuid of the practice
2801
2012
  * @returns the practice configs
2802
- */
2803
- ;
2804
-
2013
+ */;
2805
2014
  _proto.practiceConfigGetFromPracticeUuid = function practiceConfigGetFromPracticeUuid(practiceUuid) {
2806
2015
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/configs");
2807
2016
  }
@@ -2810,9 +2019,7 @@ var PracticeService = /*#__PURE__*/function () {
2810
2019
  * @param practiceUuid uuid of the practice
2811
2020
  * @param kind of the config
2812
2021
  * @returns the practice config
2813
- */
2814
- ;
2815
-
2022
+ */;
2816
2023
  _proto.practiceConfigGetByKindForPracticeUuid = function practiceConfigGetByKindForPracticeUuid(practiceUuid, kind) {
2817
2024
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/configs/" + kind);
2818
2025
  }
@@ -2821,9 +2028,7 @@ var PracticeService = /*#__PURE__*/function () {
2821
2028
  * @param practiceUuid uuid of the practice
2822
2029
  * @param config the config to add to the practice
2823
2030
  * @returns the created practice config
2824
- */
2825
- ;
2826
-
2031
+ */;
2827
2032
  _proto.practiceConfigCreateForPracticeUuid = function practiceConfigCreateForPracticeUuid(practiceUuid, config) {
2828
2033
  return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/configs", config);
2829
2034
  }
@@ -2832,18 +2037,15 @@ var PracticeService = /*#__PURE__*/function () {
2832
2037
  * @param practiceUuid uuid of the practice
2833
2038
  * @param config the config to update
2834
2039
  * @returns the practice config
2835
- */
2836
- ;
2837
-
2040
+ */;
2838
2041
  _proto.practiceConfigUpdate = function practiceConfigUpdate(config) {
2839
2042
  return this.api.put(this.baseURL + "/v1/practices/" + config.uuidPractice + "/configs/" + config.kind, config);
2840
- } /// Accounts
2043
+ }
2044
+ /// Accounts
2841
2045
  ;
2842
-
2843
2046
  _proto.practiceGetAccounts = function practiceGetAccounts(practiceUuid) {
2844
2047
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/accounts");
2845
2048
  };
2846
-
2847
2049
  _proto.practiceGetAccount = function practiceGetAccount(practiceUuid, accountUuid) {
2848
2050
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/accounts/" + accountUuid);
2849
2051
  }
@@ -2852,9 +2054,7 @@ var PracticeService = /*#__PURE__*/function () {
2852
2054
  * @param practiceUuid the uuid of the practice
2853
2055
  * @param kind (optional) the kind of WorkflowType to filter in
2854
2056
  * @returns a list of PracticeWorkflow
2855
- */
2856
- ;
2857
-
2057
+ */;
2858
2058
  _proto.practiceGetWorkflows = function practiceGetWorkflows(practiceUuid, kind) {
2859
2059
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/workflows", {
2860
2060
  params: {
@@ -2862,12 +2062,11 @@ var PracticeService = /*#__PURE__*/function () {
2862
2062
  }
2863
2063
  });
2864
2064
  };
2865
-
2866
2065
  _proto.practiceGetWorkflow = function practiceGetWorkflow(practiceUuid, workflowType) {
2867
2066
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/workflows/" + workflowType);
2868
- } /// Plans
2067
+ }
2068
+ /// Plans
2869
2069
  ;
2870
-
2871
2070
  _proto.practiceGetPlans = function practiceGetPlans(practiceUuid, planType) {
2872
2071
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/plans", {
2873
2072
  params: {
@@ -2875,16 +2074,14 @@ var PracticeService = /*#__PURE__*/function () {
2875
2074
  }
2876
2075
  });
2877
2076
  };
2878
-
2879
2077
  _proto.practiceGetPlan = function practiceGetPlan(practiceUuid, planId) {
2880
2078
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/plans/" + planId);
2881
2079
  };
2882
-
2883
2080
  _proto.practiceGetPlanPrices = function practiceGetPlanPrices(practiceUuid, planId) {
2884
2081
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/plans/" + planId + "/prices");
2885
- } // Payments
2082
+ }
2083
+ // Payments
2886
2084
  ;
2887
-
2888
2085
  _proto.practiceGetPayments = function practiceGetPayments(practiceUuid, statusPayment, withConsultUUIDNULL, perPage, indexPage) {
2889
2086
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments", {
2890
2087
  params: {
@@ -2895,16 +2092,14 @@ var PracticeService = /*#__PURE__*/function () {
2895
2092
  }
2896
2093
  });
2897
2094
  };
2898
-
2899
2095
  _proto.practiceGetPayment = function practiceGetPayment(practiceUuid, idStripeInvoiceOrPaymentIntent) {
2900
2096
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/" + idStripeInvoiceOrPaymentIntent);
2901
2097
  };
2902
-
2903
2098
  _proto.practiceGetPaymentForStripePaymentIntentWithID = function practiceGetPaymentForStripePaymentIntentWithID(practiceUuid, stripePaymentIntentId) {
2904
2099
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/" + stripePaymentIntentId);
2905
- } // Payments Intent
2100
+ }
2101
+ // Payments Intent
2906
2102
  ;
2907
-
2908
2103
  _proto.practiceGetPaymentsIntents = function practiceGetPaymentsIntents(practiceUuid, planType) {
2909
2104
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents", {
2910
2105
  params: {
@@ -2916,9 +2111,7 @@ var PracticeService = /*#__PURE__*/function () {
2916
2111
  * This function return the user hased email to be use for creating payment intent
2917
2112
  * @param email the email to hash
2918
2113
  * @returns a hashed email
2919
- */
2920
- ;
2921
-
2114
+ */;
2922
2115
  _proto.getPaymentIntentHashedEmail = function getPaymentIntentHashedEmail(email) {
2923
2116
  return hashToBase64String(email.toLowerCase());
2924
2117
  }
@@ -2932,9 +2125,7 @@ var PracticeService = /*#__PURE__*/function () {
2932
2125
  * @param promotionCode (optional) promotion code to apply
2933
2126
  * @param requestMetadata (optional) the request metadata to use. If defined, when payment service call our hooks in practice, it will use it to do required action (create a consult, refill a consult, etc.).
2934
2127
  * @returns
2935
- */
2936
- ;
2937
-
2128
+ */;
2938
2129
  _proto.practiceCreatePaymentsIntent = function practiceCreatePaymentsIntent(practiceUuid, planId, userEmail, isoLocality, url_subdomain, requestMetadata) {
2939
2130
  return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/", {
2940
2131
  idPlan: planId,
@@ -2947,7 +2138,6 @@ var PracticeService = /*#__PURE__*/function () {
2947
2138
  }
2948
2139
  });
2949
2140
  };
2950
-
2951
2141
  _proto.practiceGetPaymentsIntent = function practiceGetPaymentsIntent(practiceUuid, paymentIntentId) {
2952
2142
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/" + paymentIntentId);
2953
2143
  }
@@ -2960,9 +2150,7 @@ var PracticeService = /*#__PURE__*/function () {
2960
2150
  * @param promotionCode (optional) promotional code to apply
2961
2151
  * @param finalize (optional) if true will finalize the PracticePaymentIntent and related Stripe.Invoice. Once, finalized you cannot modify the PracticePaymentIntent anymore.
2962
2152
  * @returns the updated PracticePaymentIntent
2963
- */
2964
- ;
2965
-
2153
+ */;
2966
2154
  _proto.practiceUpdatePaymentsIntent = function practiceUpdatePaymentsIntent(practiceUuid, idPraticePaymentIntent, practicePaymentIntent, userEmail, promotionCode, finalize) {
2967
2155
  return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/" + idPraticePaymentIntent, _extends({}, practicePaymentIntent, {
2968
2156
  hashUserEmail: userEmail ? this.getPaymentIntentHashedEmail(userEmail) : undefined
@@ -2977,125 +2165,103 @@ var PracticeService = /*#__PURE__*/function () {
2977
2165
  * Invoice
2978
2166
  * @param practiceUuid UUID of the practice to get the invoice from
2979
2167
  * @param invoiceId ID of the invoice in stripe
2980
- */
2981
- ;
2982
-
2168
+ */;
2983
2169
  _proto.getInvoice = function getInvoice(practiceUuid, invoiceId) {
2984
2170
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/invoices/" + invoiceId);
2985
- } // Practitioner
2171
+ }
2172
+ // Practitioner
2986
2173
  ;
2987
-
2988
2174
  _proto.practiceGetPractitioners = function practiceGetPractitioners(practiceUuid) {
2989
2175
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners");
2990
2176
  };
2991
-
2992
2177
  _proto.practiceUpdatePractitioner = function practiceUpdatePractitioner(practiceUuid, practitionerUuid, requestBody) {
2993
2178
  return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid, requestBody);
2994
2179
  };
2995
-
2996
2180
  _proto.practiceGetPractitioner = function practiceGetPractitioner(practiceUuid, practitionerUuid) {
2997
2181
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid);
2998
- } // Practitioner Licenses
2182
+ }
2183
+ // Practitioner Licenses
2999
2184
  ;
3000
-
3001
2185
  _proto.practiceGetPractitionerLicenses = function practiceGetPractitionerLicenses(practiceUuid, practitionerUuid) {
3002
2186
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses");
3003
2187
  };
3004
-
3005
2188
  _proto.practiceCreatePractitionerLicense = function practiceCreatePractitionerLicense(practiceUuid, practitionerUuid, requestBody) {
3006
2189
  return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses", requestBody);
3007
2190
  };
3008
-
3009
2191
  _proto.practiceUpdatePractitionerLicense = function practiceUpdatePractitionerLicense(practiceUuid, practitionerUuid, licenseId, requestBody) {
3010
2192
  return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses/" + licenseId, requestBody);
3011
2193
  };
3012
-
3013
2194
  _proto.practiceGetPractitionerLicense = function practiceGetPractitionerLicense(practiceUuid, practitionerUuid, licenseId) {
3014
2195
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses/" + licenseId);
3015
- } // Practitioner Preferences
2196
+ }
2197
+ // Practitioner Preferences
3016
2198
  ;
3017
-
3018
2199
  _proto.practiceGetPractitionerPreferences = function practiceGetPractitionerPreferences(practiceUuid, practitionerUuid) {
3019
2200
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences");
3020
2201
  };
3021
-
3022
2202
  _proto.practiceCreatePractitionerPreference = function practiceCreatePractitionerPreference(practiceUuid, practitionerUuid, requestBody) {
3023
2203
  return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences", requestBody);
3024
2204
  };
3025
-
3026
2205
  _proto.practiceUpdatePractitionerPreference = function practiceUpdatePractitionerPreference(practiceUuid, practitionerUuid, preferenceId, requestBody) {
3027
2206
  return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences/" + preferenceId, requestBody);
3028
2207
  };
3029
-
3030
2208
  _proto.practiceGetPractitionerPreference = function practiceGetPractitionerPreference(practiceUuid, practitionerUuid, preferenceId) {
3031
2209
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences/" + preferenceId);
3032
- } // Practitioner Roles
2210
+ }
2211
+ // Practitioner Roles
3033
2212
  ;
3034
-
3035
2213
  _proto.practiceGetPractitionerRoles = function practiceGetPractitionerRoles(practiceUuid, practitionerUuid) {
3036
2214
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles");
3037
2215
  };
3038
-
3039
2216
  _proto.practiceCreatePractitionerRole = function practiceCreatePractitionerRole(practiceUuid, practitionerUuid, requestBody) {
3040
2217
  return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles", requestBody);
3041
2218
  };
3042
-
3043
2219
  _proto.practiceDeletePractitionerRoles = function practiceDeletePractitionerRoles(practiceUuid, practitionerUuid) {
3044
2220
  return this.api.deleteRequest(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles");
3045
2221
  };
3046
-
3047
2222
  _proto.practiceUpdatePractitionerRole = function practiceUpdatePractitionerRole(practiceUuid, practitionerUuid, roleId, requestBody) {
3048
2223
  return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles/" + roleId, requestBody);
3049
2224
  };
3050
-
3051
2225
  _proto.practiceGetPractitionerRole = function practiceGetPractitionerRole(practiceUuid, practitionerUuid, roleId) {
3052
2226
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles/" + roleId);
3053
2227
  };
3054
-
3055
2228
  _proto.practiceDeletePractitionerRole = function practiceDeletePractitionerRole(practiceUuid, practitionerUuid, roleId) {
3056
2229
  return this.api.deleteRequest(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles/" + roleId);
3057
- } // Practitioner signature
3058
-
2230
+ }
2231
+ // Practitioner signature
3059
2232
  /**
3060
2233
  * This function returns the practitioner's signature as a Blob
3061
2234
  * @param practiceUuid the practice uuid of the practitioner
3062
2235
  * @param practitionerUuid the practitioner uuid
3063
2236
  * @returns a blob representing the signature
3064
- */
3065
- ;
3066
-
2237
+ */;
3067
2238
  _proto.practiceGetPractitionerSignature = function practiceGetPractitionerSignature(practiceUuid, practitionerUuid) {
3068
2239
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/signature", {
3069
2240
  responseType: 'blob'
3070
2241
  });
3071
- } // Assignments
2242
+ }
2243
+ // Assignments
3072
2244
  ;
3073
-
3074
2245
  _proto.practiceGetAssignments = function practiceGetAssignments(practiceUuid) {
3075
2246
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments");
3076
2247
  };
3077
-
3078
2248
  _proto.practiceCreateAssignment = function practiceCreateAssignment(practiceUuid, requestBody) {
3079
2249
  return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments", requestBody);
3080
2250
  };
3081
-
3082
2251
  _proto.practiceUpdateAssignment = function practiceUpdateAssignment(practiceUuid, assignmentId, requestBody) {
3083
2252
  return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments/" + assignmentId, requestBody);
3084
2253
  };
3085
-
3086
2254
  _proto.practiceGetAssignment = function practiceGetAssignment(practiceUuid, assignmentId) {
3087
2255
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments/" + assignmentId);
3088
- } // Quotas
2256
+ }
2257
+ // Quotas
3089
2258
  ;
3090
-
3091
2259
  _proto.practiceGetQuotas = function practiceGetQuotas(practiceUuid) {
3092
2260
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/quotas");
3093
2261
  };
3094
-
3095
2262
  _proto.practiceGetQuota = function practiceGetQuota(practiceUuid, quotaId) {
3096
2263
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/quotas/" + quotaId);
3097
2264
  };
3098
-
3099
2265
  return PracticeService;
3100
2266
  }();
3101
2267
 
@@ -3104,12 +2270,10 @@ var TellerService = /*#__PURE__*/function () {
3104
2270
  this.api = api;
3105
2271
  this.baseURL = baseURL;
3106
2272
  }
3107
-
3108
2273
  var _proto = TellerService.prototype;
3109
-
3110
2274
  _proto.lockboxDataStore = /*#__PURE__*/function () {
3111
- var _lockboxDataStore = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(lockboxUuid, req, lockboxOwnerUuid, previousDataUuid, options) {
3112
- return runtime_1.wrap(function _callee$(_context) {
2275
+ var _lockboxDataStore = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(lockboxUuid, req, lockboxOwnerUuid, previousDataUuid, options) {
2276
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3113
2277
  while (1) {
3114
2278
  switch (_context.prev = _context.next) {
3115
2279
  case 0:
@@ -3118,7 +2282,6 @@ var TellerService = /*#__PURE__*/function () {
3118
2282
  updateMedicalStatus: true
3119
2283
  };
3120
2284
  }
3121
-
3122
2285
  return _context.abrupt("return", this.api.post(this.baseURL + "/v1/lockboxes/" + lockboxUuid + "/data", req, {
3123
2286
  params: {
3124
2287
  lockbox_owner_uuid: lockboxOwnerUuid,
@@ -3126,7 +2289,6 @@ var TellerService = /*#__PURE__*/function () {
3126
2289
  update_medical_status: options.updateMedicalStatus
3127
2290
  }
3128
2291
  }));
3129
-
3130
2292
  case 2:
3131
2293
  case "end":
3132
2294
  return _context.stop();
@@ -3134,14 +2296,11 @@ var TellerService = /*#__PURE__*/function () {
3134
2296
  }
3135
2297
  }, _callee, this);
3136
2298
  }));
3137
-
3138
2299
  function lockboxDataStore(_x, _x2, _x3, _x4, _x5) {
3139
2300
  return _lockboxDataStore.apply(this, arguments);
3140
2301
  }
3141
-
3142
2302
  return lockboxDataStore;
3143
2303
  }();
3144
-
3145
2304
  _proto.updateConsultByUUID = function updateConsultByUUID(patientUuid, uuidConsult, statusMedical, closedReasonType, closedReasonDescription, neverExpires) {
3146
2305
  return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult, {
3147
2306
  patientUuid: patientUuid,
@@ -3159,9 +2318,7 @@ var TellerService = /*#__PURE__*/function () {
3159
2318
  * @param consultationShortId the consultation short id
3160
2319
  * @param fax the address where to send the fax
3161
2320
  * @returns void
3162
- */
3163
- ;
3164
-
2321
+ */;
3165
2322
  _proto.notifyFaxFailed = function notifyFaxFailed(practiceUuid, consultationUuid, consultationShortId, fax) {
3166
2323
  return this.api.post(this.baseURL + "/v1/fax-failed", {
3167
2324
  consultationUuid: consultationUuid,
@@ -3178,9 +2335,7 @@ var TellerService = /*#__PURE__*/function () {
3178
2335
  * @todo - Make service only exposed route
3179
2336
  * @param uuidConsult the uuid of the consult to reassign
3180
2337
  * @param newPractitionerUuid the uuid of the practitioner that will get reassigned
3181
- */
3182
- ;
3183
-
2338
+ */;
3184
2339
  _proto.reassignmentEmail = function reassignmentEmail(uuidConsult, newPractitionerUuid) {
3185
2340
  return this.api.post(this.baseURL + "/v1/consult/" + uuidConsult + "/reassignment-email", {
3186
2341
  newPractitionerUuid: newPractitionerUuid
@@ -3192,9 +2347,7 @@ var TellerService = /*#__PURE__*/function () {
3192
2347
  * @param consult
3193
2348
  * @param patientUuid
3194
2349
  * @returns void
3195
- */
3196
- ;
3197
-
2350
+ */;
3198
2351
  _proto.sendOnlineFaxSuccessfulEmail = function sendOnlineFaxSuccessfulEmail(consult, patientUuid) {
3199
2352
  return this.api.post(this.baseURL + "/v1/online-fax-notify", {
3200
2353
  consult: consult,
@@ -3205,13 +2358,10 @@ var TellerService = /*#__PURE__*/function () {
3205
2358
  * This function will send an email to patient to allow them to resume the consult.
3206
2359
  * @param req the body of the resume consult request
3207
2360
  * @returns void
3208
- */
3209
- ;
3210
-
2361
+ */;
3211
2362
  _proto.sendResumeConsultEmail = function sendResumeConsultEmail(req) {
3212
2363
  return this.api.post(this.baseURL + "/v1/resume-consult-email", req);
3213
2364
  };
3214
-
3215
2365
  return TellerService;
3216
2366
  }();
3217
2367
 
@@ -3220,17 +2370,14 @@ var VaultService = /*#__PURE__*/function () {
3220
2370
  this.api = api;
3221
2371
  this.baseURL = baseURL;
3222
2372
  }
3223
-
3224
2373
  var _proto = VaultService.prototype;
3225
-
3226
2374
  _proto.lockboxCreate = /*#__PURE__*/function () {
3227
- var _lockboxCreate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(lockboxMetadata) {
3228
- return runtime_1.wrap(function _callee$(_context) {
2375
+ var _lockboxCreate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(lockboxMetadata) {
2376
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3229
2377
  while (1) {
3230
2378
  switch (_context.prev = _context.next) {
3231
2379
  case 0:
3232
2380
  return _context.abrupt("return", this.api.post(this.baseURL + "/v1/lockbox", lockboxMetadata));
3233
-
3234
2381
  case 1:
3235
2382
  case "end":
3236
2383
  return _context.stop();
@@ -3238,17 +2385,14 @@ var VaultService = /*#__PURE__*/function () {
3238
2385
  }
3239
2386
  }, _callee, this);
3240
2387
  }));
3241
-
3242
2388
  function lockboxCreate(_x) {
3243
2389
  return _lockboxCreate.apply(this, arguments);
3244
2390
  }
3245
-
3246
2391
  return lockboxCreate;
3247
2392
  }();
3248
-
3249
2393
  _proto.lockboxMetadataAdd = /*#__PURE__*/function () {
3250
- var _lockboxMetadataAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(lockboxUuid, lockboxMetadata, lockboxOwnerUuid) {
3251
- return runtime_1.wrap(function _callee2$(_context2) {
2394
+ var _lockboxMetadataAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(lockboxUuid, lockboxMetadata, lockboxOwnerUuid) {
2395
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
3252
2396
  while (1) {
3253
2397
  switch (_context2.prev = _context2.next) {
3254
2398
  case 0:
@@ -3257,7 +2401,6 @@ var VaultService = /*#__PURE__*/function () {
3257
2401
  lockbox_owner_uuid: lockboxOwnerUuid
3258
2402
  }
3259
2403
  }));
3260
-
3261
2404
  case 1:
3262
2405
  case "end":
3263
2406
  return _context2.stop();
@@ -3265,17 +2408,14 @@ var VaultService = /*#__PURE__*/function () {
3265
2408
  }
3266
2409
  }, _callee2, this);
3267
2410
  }));
3268
-
3269
2411
  function lockboxMetadataAdd(_x2, _x3, _x4) {
3270
2412
  return _lockboxMetadataAdd.apply(this, arguments);
3271
2413
  }
3272
-
3273
2414
  return lockboxMetadataAdd;
3274
2415
  }();
3275
-
3276
2416
  _proto.lockboxSecretGet = /*#__PURE__*/function () {
3277
- var _lockboxSecretGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(lockboxUuid, lockboxOwnerUuid) {
3278
- return runtime_1.wrap(function _callee3$(_context3) {
2417
+ var _lockboxSecretGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(lockboxUuid, lockboxOwnerUuid) {
2418
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
3279
2419
  while (1) {
3280
2420
  switch (_context3.prev = _context3.next) {
3281
2421
  case 0:
@@ -3284,7 +2424,6 @@ var VaultService = /*#__PURE__*/function () {
3284
2424
  lockbox_owner_uuid: lockboxOwnerUuid
3285
2425
  }
3286
2426
  }));
3287
-
3288
2427
  case 1:
3289
2428
  case "end":
3290
2429
  return _context3.stop();
@@ -3292,17 +2431,14 @@ var VaultService = /*#__PURE__*/function () {
3292
2431
  }
3293
2432
  }, _callee3, this);
3294
2433
  }));
3295
-
3296
2434
  function lockboxSecretGet(_x5, _x6) {
3297
2435
  return _lockboxSecretGet.apply(this, arguments);
3298
2436
  }
3299
-
3300
2437
  return lockboxSecretGet;
3301
2438
  }();
3302
-
3303
2439
  _proto.lockboxGrant = /*#__PURE__*/function () {
3304
- var _lockboxGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(lockboxUuid, req, lockboxOwnerUuid) {
3305
- return runtime_1.wrap(function _callee4$(_context4) {
2440
+ var _lockboxGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(lockboxUuid, req, lockboxOwnerUuid) {
2441
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
3306
2442
  while (1) {
3307
2443
  switch (_context4.prev = _context4.next) {
3308
2444
  case 0:
@@ -3311,7 +2447,6 @@ var VaultService = /*#__PURE__*/function () {
3311
2447
  lockbox_owner_uuid: lockboxOwnerUuid
3312
2448
  }
3313
2449
  }));
3314
-
3315
2450
  case 1:
3316
2451
  case "end":
3317
2452
  return _context4.stop();
@@ -3319,11 +2454,9 @@ var VaultService = /*#__PURE__*/function () {
3319
2454
  }
3320
2455
  }, _callee4, this);
3321
2456
  }));
3322
-
3323
2457
  function lockboxGrant(_x7, _x8, _x9) {
3324
2458
  return _lockboxGrant.apply(this, arguments);
3325
2459
  }
3326
-
3327
2460
  return lockboxGrant;
3328
2461
  }()
3329
2462
  /**
@@ -3332,17 +2465,15 @@ var VaultService = /*#__PURE__*/function () {
3332
2465
  * @returns decrypted lockboxes granted to user
3333
2466
  */
3334
2467
  ;
3335
-
3336
2468
  _proto.grantsGet =
3337
2469
  /*#__PURE__*/
3338
2470
  function () {
3339
- var _grantsGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5() {
3340
- return runtime_1.wrap(function _callee5$(_context5) {
2471
+ var _grantsGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
2472
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
3341
2473
  while (1) {
3342
2474
  switch (_context5.prev = _context5.next) {
3343
2475
  case 0:
3344
2476
  return _context5.abrupt("return", this.api.get(this.baseURL + "/v1/grants"));
3345
-
3346
2477
  case 1:
3347
2478
  case "end":
3348
2479
  return _context5.stop();
@@ -3350,11 +2481,9 @@ var VaultService = /*#__PURE__*/function () {
3350
2481
  }
3351
2482
  }, _callee5, this);
3352
2483
  }));
3353
-
3354
2484
  function grantsGet() {
3355
2485
  return _grantsGet.apply(this, arguments);
3356
2486
  }
3357
-
3358
2487
  return grantsGet;
3359
2488
  }()
3360
2489
  /**
@@ -3368,12 +2497,11 @@ var VaultService = /*#__PURE__*/function () {
3368
2497
  * @returns
3369
2498
  */
3370
2499
  ;
3371
-
3372
2500
  _proto.lockboxDataStore =
3373
2501
  /*#__PURE__*/
3374
2502
  function () {
3375
- var _lockboxDataStore = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(lockboxUuid, req, lockboxOwnerUuid, previousDataUuid) {
3376
- return runtime_1.wrap(function _callee6$(_context6) {
2503
+ var _lockboxDataStore = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(lockboxUuid, req, lockboxOwnerUuid, previousDataUuid) {
2504
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
3377
2505
  while (1) {
3378
2506
  switch (_context6.prev = _context6.next) {
3379
2507
  case 0:
@@ -3383,7 +2511,6 @@ var VaultService = /*#__PURE__*/function () {
3383
2511
  data_uuid: previousDataUuid
3384
2512
  }
3385
2513
  }));
3386
-
3387
2514
  case 1:
3388
2515
  case "end":
3389
2516
  return _context6.stop();
@@ -3391,25 +2518,21 @@ var VaultService = /*#__PURE__*/function () {
3391
2518
  }
3392
2519
  }, _callee6, this);
3393
2520
  }));
3394
-
3395
2521
  function lockboxDataStore(_x10, _x11, _x12, _x13) {
3396
2522
  return _lockboxDataStore.apply(this, arguments);
3397
2523
  }
3398
-
3399
2524
  return lockboxDataStore;
3400
2525
  }();
3401
-
3402
2526
  _proto.lockboxDataGet = /*#__PURE__*/function () {
3403
- var _lockboxDataGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(lockboxUuid, dataUuid, lockboxOwnerUuid, stream) {
2527
+ var _lockboxDataGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(lockboxUuid, dataUuid, lockboxOwnerUuid, stream) {
3404
2528
  var data;
3405
- return runtime_1.wrap(function _callee7$(_context7) {
2529
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
3406
2530
  while (1) {
3407
2531
  switch (_context7.prev = _context7.next) {
3408
2532
  case 0:
3409
2533
  if (stream === void 0) {
3410
2534
  stream = true;
3411
2535
  }
3412
-
3413
2536
  _context7.next = 3;
3414
2537
  return this.api.get(this.baseURL + "/v1/lockboxes/" + lockboxUuid + "/data/" + dataUuid, {
3415
2538
  params: {
@@ -3417,22 +2540,17 @@ var VaultService = /*#__PURE__*/function () {
3417
2540
  stream: stream
3418
2541
  }
3419
2542
  });
3420
-
3421
2543
  case 3:
3422
2544
  data = _context7.sent;
3423
-
3424
2545
  if (!stream) {
3425
2546
  _context7.next = 6;
3426
2547
  break;
3427
2548
  }
3428
-
3429
2549
  return _context7.abrupt("return", {
3430
2550
  data: data
3431
2551
  });
3432
-
3433
2552
  case 6:
3434
2553
  return _context7.abrupt("return", data);
3435
-
3436
2554
  case 7:
3437
2555
  case "end":
3438
2556
  return _context7.stop();
@@ -3440,17 +2558,14 @@ var VaultService = /*#__PURE__*/function () {
3440
2558
  }
3441
2559
  }, _callee7, this);
3442
2560
  }));
3443
-
3444
2561
  function lockboxDataGet(_x14, _x15, _x16, _x17) {
3445
2562
  return _lockboxDataGet.apply(this, arguments);
3446
2563
  }
3447
-
3448
2564
  return lockboxDataGet;
3449
2565
  }();
3450
-
3451
2566
  _proto.lockboxManifestGet = /*#__PURE__*/function () {
3452
- var _lockboxManifestGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(lockboxUuid, filter, lockboxOwnerUuid) {
3453
- return runtime_1.wrap(function _callee8$(_context8) {
2567
+ var _lockboxManifestGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(lockboxUuid, filter, lockboxOwnerUuid) {
2568
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
3454
2569
  while (1) {
3455
2570
  switch (_context8.prev = _context8.next) {
3456
2571
  case 0:
@@ -3460,7 +2575,6 @@ var VaultService = /*#__PURE__*/function () {
3460
2575
  filter: filter
3461
2576
  }
3462
2577
  }));
3463
-
3464
2578
  case 1:
3465
2579
  case "end":
3466
2580
  return _context8.stop();
@@ -3468,17 +2582,14 @@ var VaultService = /*#__PURE__*/function () {
3468
2582
  }
3469
2583
  }, _callee8, this);
3470
2584
  }));
3471
-
3472
2585
  function lockboxManifestGet(_x18, _x19, _x20) {
3473
2586
  return _lockboxManifestGet.apply(this, arguments);
3474
2587
  }
3475
-
3476
2588
  return lockboxManifestGet;
3477
2589
  }();
3478
-
3479
2590
  _proto.lockboxMetadataGet = /*#__PURE__*/function () {
3480
- var _lockboxMetadataGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(lockboxUuid, fields, groupby, filter, lockboxOwnerUuid) {
3481
- return runtime_1.wrap(function _callee9$(_context9) {
2591
+ var _lockboxMetadataGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(lockboxUuid, fields, groupby, filter, lockboxOwnerUuid) {
2592
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
3482
2593
  while (1) {
3483
2594
  switch (_context9.prev = _context9.next) {
3484
2595
  case 0:
@@ -3490,7 +2601,6 @@ var VaultService = /*#__PURE__*/function () {
3490
2601
  filter: filter
3491
2602
  }
3492
2603
  }));
3493
-
3494
2604
  case 1:
3495
2605
  case "end":
3496
2606
  return _context9.stop();
@@ -3498,11 +2608,9 @@ var VaultService = /*#__PURE__*/function () {
3498
2608
  }
3499
2609
  }, _callee9, this);
3500
2610
  }));
3501
-
3502
2611
  function lockboxMetadataGet(_x21, _x22, _x23, _x24, _x25) {
3503
2612
  return _lockboxMetadataGet.apply(this, arguments);
3504
2613
  }
3505
-
3506
2614
  return lockboxMetadataGet;
3507
2615
  }()
3508
2616
  /**
@@ -3513,12 +2621,11 @@ var VaultService = /*#__PURE__*/function () {
3513
2621
  * @param indexOwnerUuid
3514
2622
  */
3515
2623
  ;
3516
-
3517
2624
  _proto.vaultIndexPut =
3518
2625
  /*#__PURE__*/
3519
2626
  function () {
3520
- var _vaultIndexPut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(entries, indexOwnerUuid) {
3521
- return runtime_1.wrap(function _callee10$(_context10) {
2627
+ var _vaultIndexPut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(entries, indexOwnerUuid) {
2628
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
3522
2629
  while (1) {
3523
2630
  switch (_context10.prev = _context10.next) {
3524
2631
  case 0:
@@ -3527,7 +2634,6 @@ var VaultService = /*#__PURE__*/function () {
3527
2634
  index_owner_uuid: indexOwnerUuid
3528
2635
  }
3529
2636
  }));
3530
-
3531
2637
  case 1:
3532
2638
  case "end":
3533
2639
  return _context10.stop();
@@ -3535,11 +2641,9 @@ var VaultService = /*#__PURE__*/function () {
3535
2641
  }
3536
2642
  }, _callee10, this);
3537
2643
  }));
3538
-
3539
2644
  function vaultIndexPut(_x26, _x27) {
3540
2645
  return _vaultIndexPut.apply(this, arguments);
3541
2646
  }
3542
-
3543
2647
  return vaultIndexPut;
3544
2648
  }()
3545
2649
  /**
@@ -3548,17 +2652,15 @@ var VaultService = /*#__PURE__*/function () {
3548
2652
  * @param entry the encrypted index snapshot
3549
2653
  */
3550
2654
  ;
3551
-
3552
2655
  _proto.vaultIndexSnapshotPut =
3553
2656
  /*#__PURE__*/
3554
2657
  function () {
3555
- var _vaultIndexSnapshotPut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(entry) {
3556
- return runtime_1.wrap(function _callee11$(_context11) {
2658
+ var _vaultIndexSnapshotPut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(entry) {
2659
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
3557
2660
  while (1) {
3558
2661
  switch (_context11.prev = _context11.next) {
3559
2662
  case 0:
3560
2663
  return _context11.abrupt("return", this.api.put(this.baseURL + "/v1/index-snapshot", entry));
3561
-
3562
2664
  case 1:
3563
2665
  case "end":
3564
2666
  return _context11.stop();
@@ -3566,11 +2668,9 @@ var VaultService = /*#__PURE__*/function () {
3566
2668
  }
3567
2669
  }, _callee11, this);
3568
2670
  }));
3569
-
3570
2671
  function vaultIndexSnapshotPut(_x28) {
3571
2672
  return _vaultIndexSnapshotPut.apply(this, arguments);
3572
2673
  }
3573
-
3574
2674
  return vaultIndexSnapshotPut;
3575
2675
  }()
3576
2676
  /**
@@ -3582,12 +2682,11 @@ var VaultService = /*#__PURE__*/function () {
3582
2682
  * @returns the encrypted index
3583
2683
  */
3584
2684
  ;
3585
-
3586
2685
  _proto.vaultIndexGet =
3587
2686
  /*#__PURE__*/
3588
2687
  function () {
3589
- var _vaultIndexGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(indexKeys, identifiers, timestamp) {
3590
- return runtime_1.wrap(function _callee12$(_context12) {
2688
+ var _vaultIndexGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(indexKeys, identifiers, timestamp) {
2689
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
3591
2690
  while (1) {
3592
2691
  switch (_context12.prev = _context12.next) {
3593
2692
  case 0:
@@ -3598,7 +2697,6 @@ var VaultService = /*#__PURE__*/function () {
3598
2697
  timestamp: timestamp
3599
2698
  }
3600
2699
  }));
3601
-
3602
2700
  case 1:
3603
2701
  case "end":
3604
2702
  return _context12.stop();
@@ -3606,14 +2704,11 @@ var VaultService = /*#__PURE__*/function () {
3606
2704
  }
3607
2705
  }, _callee12, this);
3608
2706
  }));
3609
-
3610
2707
  function vaultIndexGet(_x29, _x30, _x31) {
3611
2708
  return _vaultIndexGet.apply(this, arguments);
3612
2709
  }
3613
-
3614
2710
  return vaultIndexGet;
3615
2711
  }();
3616
-
3617
2712
  return VaultService;
3618
2713
  }();
3619
2714
 
@@ -3626,10 +2721,7 @@ var WorkflowService = /*#__PURE__*/function () {
3626
2721
  * This function returns all workflows
3627
2722
  * @returns desired workflow
3628
2723
  */
3629
-
3630
-
3631
2724
  var _proto = WorkflowService.prototype;
3632
-
3633
2725
  _proto.getWorkflows = function getWorkflows() {
3634
2726
  return this.api.get(this.v1Url + "/workflows");
3635
2727
  }
@@ -3640,9 +2732,7 @@ var WorkflowService = /*#__PURE__*/function () {
3640
2732
  * @param locale (optional) The desired locale of the workflow (default: 'en')
3641
2733
  * @param createdAt (optional) The creation date of the workflow (also used for versionning)
3642
2734
  * @returns desired workflow
3643
- */
3644
- ;
3645
-
2735
+ */;
3646
2736
  _proto.getWorkflow = function getWorkflow(id, locale, createdAt) {
3647
2737
  return this.api.get(this.v1Url + "/workflows/" + id, {
3648
2738
  params: {
@@ -3651,7 +2741,6 @@ var WorkflowService = /*#__PURE__*/function () {
3651
2741
  }
3652
2742
  });
3653
2743
  };
3654
-
3655
2744
  return WorkflowService;
3656
2745
  }();
3657
2746
 
@@ -3662,20 +2751,18 @@ var WorkflowService = /*#__PURE__*/function () {
3662
2751
  * @param useLocalStorage (default: true) if true store tokens into local storage (only for browsers)
3663
2752
  * @returns an instance of each services with a provided url
3664
2753
  */
3665
-
3666
2754
  var init = function init(services, authenticationCallback, useLocalStorage) {
3667
2755
  if (useLocalStorage === void 0) {
3668
2756
  useLocalStorage = true;
3669
2757
  }
3670
-
3671
2758
  var tellerBaseURL = services.tellerBaseURL,
3672
- practiceBaseURL = services.practiceBaseURL,
3673
- consultBaseURL = services.consultBaseURL,
3674
- vaultBaseURL = services.vaultBaseURL,
3675
- guardBaseURL = services.guardBaseURL,
3676
- searchBaseURL = services.searchBaseURL,
3677
- workflowBaseURL = services.workflowBaseURL,
3678
- diagnosisBaseURL = services.diagnosisBaseURL;
2759
+ practiceBaseURL = services.practiceBaseURL,
2760
+ consultBaseURL = services.consultBaseURL,
2761
+ vaultBaseURL = services.vaultBaseURL,
2762
+ guardBaseURL = services.guardBaseURL,
2763
+ searchBaseURL = services.searchBaseURL,
2764
+ workflowBaseURL = services.workflowBaseURL,
2765
+ diagnosisBaseURL = services.diagnosisBaseURL;
3679
2766
  var apiService = new APIService(useLocalStorage, undefined, authenticationCallback);
3680
2767
  return {
3681
2768
  apiService: apiService,