oro-sdk-apis 3.8.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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,7 +1082,6 @@ var DocumentType;
1702
1082
  })(DocumentType || (DocumentType = {}));
1703
1083
 
1704
1084
  var InputApplyFunctions;
1705
-
1706
1085
  (function (InputApplyFunctions) {
1707
1086
  InputApplyFunctions["AllUpperCase"] = "AllUpperCase";
1708
1087
  InputApplyFunctions["AllLowerCase"] = "AllLowerCase";
@@ -1710,9 +1089,7 @@ var InputApplyFunctions;
1710
1089
  InputApplyFunctions["AllAlphanumeric"] = "AllAlphanumeric";
1711
1090
  InputApplyFunctions["NoSpaces"] = "NoSpaces";
1712
1091
  })(InputApplyFunctions || (InputApplyFunctions = {}));
1713
-
1714
1092
  var MetadataCategory;
1715
-
1716
1093
  (function (MetadataCategory) {
1717
1094
  MetadataCategory["ChildPersonal"] = "ChildPersonal";
1718
1095
  MetadataCategory["Consultation"] = "Consultation";
@@ -1729,7 +1106,6 @@ var MetadataCategory;
1729
1106
  })(MetadataCategory || (MetadataCategory = {}));
1730
1107
 
1731
1108
  var IndexKind;
1732
-
1733
1109
  (function (IndexKind) {
1734
1110
  IndexKind[IndexKind["consultUuid"] = 0] = "consultUuid";
1735
1111
  IndexKind[IndexKind["consultShortid"] = 1] = "consultShortid";
@@ -1744,9 +1120,7 @@ var ConsultService = /*#__PURE__*/function () {
1744
1120
  this.api = api;
1745
1121
  this.baseURL = baseURL;
1746
1122
  }
1747
-
1748
1123
  var _proto = ConsultService.prototype;
1749
-
1750
1124
  _proto.consultCreate = function consultCreate(c) {
1751
1125
  return this.api.post(this.baseURL + "/v1/consults", c);
1752
1126
  }
@@ -1766,9 +1140,7 @@ var ConsultService = /*#__PURE__*/function () {
1766
1140
  * @param filterIsoLocality the of isoLocality to filter with
1767
1141
  * @param filterAssignee array of practitioner uuids with which you want to filter the consultations
1768
1142
  * @returns a number of consult
1769
- */
1770
- ;
1771
-
1143
+ */;
1772
1144
  _proto.countConsults = function countConsults(uuidPractice, uuidRequester, statusesMedical, statusesExclude, shortId, columnToSortTo, orderToSortTo, perPage, indexPage, filterAssignedDoctor, filterCurrentPractitioner, filterIsoLocality, filterAssignee, typesConsult, uuidParent) {
1773
1145
  return this.api.head(this.baseURL + "/v1/consults", {
1774
1146
  params: {
@@ -1792,11 +1164,9 @@ var ConsultService = /*#__PURE__*/function () {
1792
1164
  if (!resContentRange || typeof resContentRange !== 'string' && typeof resContentRange !== 'number') {
1793
1165
  return 0;
1794
1166
  }
1795
-
1796
1167
  if (typeof resContentRange === 'number') {
1797
1168
  return resContentRange;
1798
1169
  }
1799
-
1800
1170
  return parseInt(resContentRange);
1801
1171
  });
1802
1172
  }
@@ -1815,9 +1185,7 @@ var ConsultService = /*#__PURE__*/function () {
1815
1185
  * @param filterCurrentPractitioner the uuid of the current assistant assigned to filter with
1816
1186
  * @param filterIsoLocality the of isoLocality to filter with
1817
1187
  * @returns a list of consult
1818
- */
1819
- ;
1820
-
1188
+ */;
1821
1189
  _proto.getConsults = function getConsults(uuidPractice, uuidRequester, statusesMedical, statusesExclude, shortId, columnToSortTo, orderToSortTo, perPage, indexPage, filterAssignedDoctor, filterCurrentPractitioner, filterIsoLocality, filterAssignee, uuidParent, typesConsult) {
1822
1190
  return this.api.get(this.baseURL + "/v1/consults", {
1823
1191
  params: {
@@ -1839,7 +1207,6 @@ var ConsultService = /*#__PURE__*/function () {
1839
1207
  }
1840
1208
  });
1841
1209
  };
1842
-
1843
1210
  _proto.getConsultByUUID = function getConsultByUUID(uuidConsult, uuidPractice) {
1844
1211
  return this.api.get(this.baseURL + "/v1/consults/" + uuidConsult, {
1845
1212
  params: {
@@ -1847,7 +1214,6 @@ var ConsultService = /*#__PURE__*/function () {
1847
1214
  }
1848
1215
  });
1849
1216
  };
1850
-
1851
1217
  _proto.updateConsultByUUID = function updateConsultByUUID(uuidConsult, consult, uuidPractice, uuidRequester) {
1852
1218
  return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult, consult, {
1853
1219
  params: {
@@ -1856,7 +1222,6 @@ var ConsultService = /*#__PURE__*/function () {
1856
1222
  }
1857
1223
  });
1858
1224
  };
1859
-
1860
1225
  _proto.getConsultFaxStatuses = function getConsultFaxStatuses(uuidConsult) {
1861
1226
  return this.api.get(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions", {
1862
1227
  params: {
@@ -1864,64 +1229,52 @@ var ConsultService = /*#__PURE__*/function () {
1864
1229
  }
1865
1230
  });
1866
1231
  };
1867
-
1868
- _proto.postConsultTransmission = function postConsultTransmission(uuidConsult, nameDriver, addressOrPhoneToSendTo, file, nameReceiver, txtTransmissionTitle, txtTransmissionNotes // numTry ?: number,
1232
+ _proto.postConsultTransmission = function postConsultTransmission(uuidConsult, nameDriver, addressOrPhoneToSendTo, file, nameReceiver, txtTransmissionTitle, txtTransmissionNotes
1233
+ // numTry ?: number,
1869
1234
  // delay ?: number,
1870
1235
  ) {
1871
1236
  if (nameDriver === void 0) {
1872
1237
  nameDriver = 'Documo';
1873
1238
  }
1874
-
1875
1239
  var data = new FormData();
1876
1240
  data.append('nameDriverReceiver', nameDriver);
1877
-
1878
1241
  if (addressOrPhoneToSendTo) {
1879
1242
  data.append('addressReceiver', addressOrPhoneToSendTo);
1880
1243
  }
1881
-
1882
1244
  if (file) {
1883
1245
  data.append('file', file);
1884
1246
  }
1885
-
1886
1247
  if (nameReceiver) {
1887
1248
  data.append('nameReceiver', nameReceiver);
1888
1249
  }
1889
-
1890
1250
  if (txtTransmissionTitle) {
1891
1251
  data.append('txtTransmissionTitle', txtTransmissionTitle);
1892
1252
  }
1893
-
1894
1253
  if (txtTransmissionNotes) {
1895
1254
  data.append('txtTransmissionNotes', txtTransmissionNotes);
1896
1255
  }
1897
-
1898
1256
  return this.api.post(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions", data, {
1899
1257
  headers: {
1900
1258
  'Content-Type': 'multipart/form-data;'
1901
1259
  }
1902
1260
  });
1903
1261
  };
1904
-
1905
1262
  _proto.postConsultFax = function postConsultFax(uuidConsult, addressReceiver, file) {
1906
1263
  return this.postConsultTransmission(uuidConsult, 'Documo', addressReceiver, file);
1907
1264
  };
1908
-
1909
1265
  _proto.postConsultEmail = function postConsultEmail(uuidConsult, file) {
1910
1266
  return this.postConsultTransmission(uuidConsult, 'Pharmacierge', undefined, file);
1911
1267
  };
1912
-
1913
1268
  _proto.retryConsultFax = function retryConsultFax(uuidConsult, transmissionId) {
1914
1269
  return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions/" + transmissionId, {
1915
1270
  status: TransmissionStatus.Retrying
1916
1271
  });
1917
1272
  };
1918
-
1919
1273
  _proto.updateConsultTransmissionStatus = function updateConsultTransmissionStatus(transmissionId, uuidConsult, newStatus) {
1920
1274
  return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions/" + transmissionId, {
1921
1275
  status: newStatus
1922
1276
  });
1923
1277
  };
1924
-
1925
1278
  return ConsultService;
1926
1279
  }();
1927
1280
 
@@ -1930,9 +1283,7 @@ var DiagnosisService = /*#__PURE__*/function () {
1930
1283
  this.api = api;
1931
1284
  this.baseURL = baseURL;
1932
1285
  }
1933
-
1934
1286
  var _proto = DiagnosisService.prototype;
1935
-
1936
1287
  _proto.getDiagnoses = function getDiagnoses() {
1937
1288
  return this.api.get(this.baseURL + "/v1/diagnoses");
1938
1289
  }
@@ -1940,21 +1291,16 @@ var DiagnosisService = /*#__PURE__*/function () {
1940
1291
  * Get a diagnosis by uuid that belongs to your practice
1941
1292
  * @param uuidDiagnosis the uuid of the diagnosis
1942
1293
  * @returns a diagnosis
1943
- */
1944
- ;
1945
-
1294
+ */;
1946
1295
  _proto.getDiagnosisByUuid = function getDiagnosisByUuid(uuidDiagnosis) {
1947
1296
  return this.api.get(this.baseURL + "/v1/diagnoses/" + uuidDiagnosis);
1948
1297
  };
1949
-
1950
1298
  _proto.createDiagnosis = function createDiagnosis(diagnosis) {
1951
1299
  return this.api.post(this.baseURL + "/v1/diagnoses", diagnosis);
1952
1300
  };
1953
-
1954
1301
  _proto.updateDiagnosis = function updateDiagnosis(uuid, diagnosis) {
1955
1302
  return this.api.put(this.baseURL + "/v1/diagnoses/" + uuid, diagnosis);
1956
1303
  };
1957
-
1958
1304
  _proto.getTreatmentsFromDiagnosisUuid = function getTreatmentsFromDiagnosisUuid(diagnosisUuid) {
1959
1305
  return this.api.get(this.baseURL + "/v1/diagnoses/" + diagnosisUuid + "/treatments");
1960
1306
  }
@@ -1962,9 +1308,7 @@ var DiagnosisService = /*#__PURE__*/function () {
1962
1308
  * This function returns treatment plans associated to a consult
1963
1309
  * @param uuidConsult the consult uuid to fetch
1964
1310
  * @returns an array of TreatmentPlan
1965
- */
1966
- ;
1967
-
1311
+ */;
1968
1312
  _proto.getTreatmentPlansFromConsultUuid = function getTreatmentPlansFromConsultUuid(uuidConsult) {
1969
1313
  return this.api.get(this.baseURL + "/v1/treatment-plans/", {
1970
1314
  params: {
@@ -1976,9 +1320,7 @@ var DiagnosisService = /*#__PURE__*/function () {
1976
1320
  * creates a new treatment for the specified diagnosis
1977
1321
  * @param diagnosisUuid uuid of the diagnosis that the treatment is linked to
1978
1322
  * @param treatmentRequest the treatment to be inserted
1979
- */
1980
- ;
1981
-
1323
+ */;
1982
1324
  _proto.createTreatment = function createTreatment(diagnosisUuid, treatmentRequest) {
1983
1325
  return this.api.post(this.baseURL + "/v1/diagnoses/" + diagnosisUuid + "/treatments", treatmentRequest);
1984
1326
  }
@@ -1986,9 +1328,7 @@ var DiagnosisService = /*#__PURE__*/function () {
1986
1328
  * This function returns populated treatment plans associated to a consult
1987
1329
  * @param uuidConsult the consult uuid to fetch
1988
1330
  * @returns a TreatmentPlans object
1989
- */
1990
- ;
1991
-
1331
+ */;
1992
1332
  _proto.getTreatmentPlansPopulatedFromConsultUuid = function getTreatmentPlansPopulatedFromConsultUuid(uuidConsult) {
1993
1333
  return this.api.get(this.baseURL + "/v1/treatment-plans/", {
1994
1334
  params: {
@@ -1997,11 +1337,9 @@ var DiagnosisService = /*#__PURE__*/function () {
1997
1337
  }
1998
1338
  });
1999
1339
  };
2000
-
2001
1340
  _proto.postPlans = function postPlans(plans) {
2002
1341
  return this.api.post(this.baseURL + "/v1/treatment-plans", plans);
2003
1342
  };
2004
-
2005
1343
  _proto.updateTreatmentPlan = function updateTreatmentPlan(uuidPlan, uuidConsult, diagnosisRequest, plan, refill) {
2006
1344
  return this.api.put(this.baseURL + "/v1/treatment-plans/" + uuidPlan, {
2007
1345
  uuidConsult: uuidConsult,
@@ -2010,7 +1348,6 @@ var DiagnosisService = /*#__PURE__*/function () {
2010
1348
  refill: refill
2011
1349
  });
2012
1350
  };
2013
-
2014
1351
  _proto.acceptTreatmentPlan = function acceptTreatmentPlan(uuidPlan, uuidConsult) {
2015
1352
  return this.api.put(this.baseURL + "/v1/treatment-plans/" + uuidPlan + "/accept", {
2016
1353
  uuidConsult: uuidConsult
@@ -2019,34 +1356,27 @@ var DiagnosisService = /*#__PURE__*/function () {
2019
1356
  /**
2020
1357
  * retrieves all the drugs of the specified practice
2021
1358
  * @param uuidPractice
2022
- */
2023
- ;
2024
-
1359
+ */;
2025
1360
  _proto.getAllDrugs =
2026
1361
  /*#__PURE__*/
2027
1362
  function () {
2028
- var _getAllDrugs = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(uuidPractice) {
1363
+ var _getAllDrugs = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(uuidPractice) {
2029
1364
  var res;
2030
- return runtime_1.wrap(function _callee$(_context) {
1365
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
2031
1366
  while (1) {
2032
1367
  switch (_context.prev = _context.next) {
2033
1368
  case 0:
2034
1369
  _context.next = 2;
2035
1370
  return this.api.get(this.baseURL + "/v1/drugs/practice/" + uuidPractice);
2036
-
2037
1371
  case 2:
2038
1372
  res = _context.sent;
2039
-
2040
1373
  if (!(res && res.foundDrugs)) {
2041
1374
  _context.next = 5;
2042
1375
  break;
2043
1376
  }
2044
-
2045
1377
  return _context.abrupt("return", res.foundDrugs);
2046
-
2047
1378
  case 5:
2048
1379
  return _context.abrupt("return", undefined);
2049
-
2050
1380
  case 6:
2051
1381
  case "end":
2052
1382
  return _context.stop();
@@ -2054,14 +1384,11 @@ var DiagnosisService = /*#__PURE__*/function () {
2054
1384
  }
2055
1385
  }, _callee, this);
2056
1386
  }));
2057
-
2058
1387
  function getAllDrugs(_x) {
2059
1388
  return _getAllDrugs.apply(this, arguments);
2060
1389
  }
2061
-
2062
1390
  return getAllDrugs;
2063
1391
  }();
2064
-
2065
1392
  return DiagnosisService;
2066
1393
  }();
2067
1394
 
@@ -2070,7 +1397,6 @@ var GuardService = /*#__PURE__*/function () {
2070
1397
  this.api = api;
2071
1398
  this.baseURL = baseURL;
2072
1399
  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
2073
-
2074
1400
  this.identityCache = {};
2075
1401
  this.whoAmICache = {};
2076
1402
  }
@@ -2085,10 +1411,7 @@ var GuardService = /*#__PURE__*/function () {
2085
1411
  * ```
2086
1412
  * @param tokens
2087
1413
  */
2088
-
2089
-
2090
1414
  var _proto = GuardService.prototype;
2091
-
2092
1415
  _proto.setTokens = function setTokens(tokens) {
2093
1416
  this.api.setTokens(_extends({}, this.api.getTokens(), tokens));
2094
1417
  }
@@ -2097,16 +1420,13 @@ var GuardService = /*#__PURE__*/function () {
2097
1420
  *
2098
1421
  * @param req The credentials required to get an access token
2099
1422
  * @returns AuthTokenResponse
2100
- */
2101
- ;
2102
-
1423
+ */;
2103
1424
  _proto.m2mToken =
2104
1425
  /*#__PURE__*/
2105
1426
  function () {
2106
- var _m2mToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(req) {
1427
+ var _m2mToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(req) {
2107
1428
  var resp, config, _e$response, code;
2108
-
2109
- return runtime_1.wrap(function _callee$(_context) {
1429
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
2110
1430
  while (1) {
2111
1431
  switch (_context.prev = _context.next) {
2112
1432
  case 0:
@@ -2116,7 +1436,6 @@ var GuardService = /*#__PURE__*/function () {
2116
1436
  };
2117
1437
  _context.next = 4;
2118
1438
  return this.api.post(this.baseURL + "/v1/m2m/token", req, config);
2119
-
2120
1439
  case 4:
2121
1440
  resp = _context.sent;
2122
1441
  this.api.setTokens({
@@ -2124,37 +1443,28 @@ var GuardService = /*#__PURE__*/function () {
2124
1443
  });
2125
1444
  _context.next = 20;
2126
1445
  break;
2127
-
2128
1446
  case 8:
2129
1447
  _context.prev = 8;
2130
1448
  _context.t0 = _context["catch"](0);
2131
1449
  console.error('Error while posting m2m token:', _context.t0);
2132
-
2133
1450
  if (!_context.t0.isAxiosError) {
2134
1451
  _context.next = 19;
2135
1452
  break;
2136
1453
  }
2137
-
2138
1454
  code = (_e$response = _context.t0.response) == null ? void 0 : _e$response.status;
2139
1455
  _context.t1 = code;
2140
1456
  _context.next = _context.t1 === 400 ? 16 : _context.t1 === 500 ? 17 : _context.t1 === 401 ? 18 : 18;
2141
1457
  break;
2142
-
2143
1458
  case 16:
2144
1459
  throw new AuthenticationBadRequest();
2145
-
2146
1460
  case 17:
2147
1461
  throw new AuthenticationServerError();
2148
-
2149
1462
  case 18:
2150
1463
  throw new AuthenticationFailed();
2151
-
2152
1464
  case 19:
2153
1465
  throw new AuthenticationFailed();
2154
-
2155
1466
  case 20:
2156
1467
  return _context.abrupt("return", resp);
2157
-
2158
1468
  case 21:
2159
1469
  case "end":
2160
1470
  return _context.stop();
@@ -2162,11 +1472,9 @@ var GuardService = /*#__PURE__*/function () {
2162
1472
  }
2163
1473
  }, _callee, this, [[0, 8]]);
2164
1474
  }));
2165
-
2166
1475
  function m2mToken(_x) {
2167
1476
  return _m2mToken.apply(this, arguments);
2168
1477
  }
2169
-
2170
1478
  return m2mToken;
2171
1479
  }()
2172
1480
  /**
@@ -2177,14 +1485,12 @@ var GuardService = /*#__PURE__*/function () {
2177
1485
  * @returns AuthTokenResponse
2178
1486
  */
2179
1487
  ;
2180
-
2181
1488
  _proto.authToken =
2182
1489
  /*#__PURE__*/
2183
1490
  function () {
2184
- var _authToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(req) {
1491
+ var _authToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(req) {
2185
1492
  var resp, config, _e$response2, code;
2186
-
2187
- return runtime_1.wrap(function _callee2$(_context2) {
1493
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
2188
1494
  while (1) {
2189
1495
  switch (_context2.prev = _context2.next) {
2190
1496
  case 0:
@@ -2194,7 +1500,6 @@ var GuardService = /*#__PURE__*/function () {
2194
1500
  };
2195
1501
  _context2.next = 4;
2196
1502
  return this.api.post(this.baseURL + "/v1/auth/token", req, config);
2197
-
2198
1503
  case 4:
2199
1504
  resp = _context2.sent;
2200
1505
  this.api.setTokens({
@@ -2203,40 +1508,30 @@ var GuardService = /*#__PURE__*/function () {
2203
1508
  });
2204
1509
  _context2.next = 21;
2205
1510
  break;
2206
-
2207
1511
  case 8:
2208
1512
  _context2.prev = 8;
2209
1513
  _context2.t0 = _context2["catch"](0);
2210
1514
  console.error('Error while posting auth token:', _context2.t0);
2211
-
2212
1515
  if (!_context2.t0.isAxiosError) {
2213
1516
  _context2.next = 20;
2214
1517
  break;
2215
1518
  }
2216
-
2217
1519
  code = (_e$response2 = _context2.t0.response) == null ? void 0 : _e$response2.status;
2218
1520
  _context2.t1 = code;
2219
1521
  _context2.next = _context2.t1 === 400 ? 16 : _context2.t1 === 424 ? 17 : _context2.t1 === 500 ? 18 : _context2.t1 === 401 ? 19 : 19;
2220
1522
  break;
2221
-
2222
1523
  case 16:
2223
1524
  throw new AuthenticationBadRequest();
2224
-
2225
1525
  case 17:
2226
1526
  throw new AuthenticationUnconfirmedEmail();
2227
-
2228
1527
  case 18:
2229
1528
  throw new AuthenticationServerError();
2230
-
2231
1529
  case 19:
2232
1530
  throw new AuthenticationFailed();
2233
-
2234
1531
  case 20:
2235
1532
  throw new AuthenticationFailed();
2236
-
2237
1533
  case 21:
2238
1534
  return _context2.abrupt("return", resp);
2239
-
2240
1535
  case 22:
2241
1536
  case "end":
2242
1537
  return _context2.stop();
@@ -2244,11 +1539,9 @@ var GuardService = /*#__PURE__*/function () {
2244
1539
  }
2245
1540
  }, _callee2, this, [[0, 8]]);
2246
1541
  }));
2247
-
2248
1542
  function authToken(_x2) {
2249
1543
  return _authToken.apply(this, arguments);
2250
1544
  }
2251
-
2252
1545
  return authToken;
2253
1546
  }()
2254
1547
  /**
@@ -2257,13 +1550,12 @@ var GuardService = /*#__PURE__*/function () {
2257
1550
  * @returns AuthTokenResponse
2258
1551
  */
2259
1552
  ;
2260
-
2261
1553
  _proto.authRefresh =
2262
1554
  /*#__PURE__*/
2263
1555
  function () {
2264
- var _authRefresh = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(refreshToken) {
1556
+ var _authRefresh = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(refreshToken) {
2265
1557
  var config;
2266
- return runtime_1.wrap(function _callee3$(_context3) {
1558
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
2267
1559
  while (1) {
2268
1560
  switch (_context3.prev = _context3.next) {
2269
1561
  case 0:
@@ -2272,7 +1564,6 @@ var GuardService = /*#__PURE__*/function () {
2272
1564
  useRefreshToken: true
2273
1565
  };
2274
1566
  return _context3.abrupt("return", this.api.put(this.baseURL + "/v1/auth/token", null, config));
2275
-
2276
1567
  case 2:
2277
1568
  case "end":
2278
1569
  return _context3.stop();
@@ -2280,11 +1571,9 @@ var GuardService = /*#__PURE__*/function () {
2280
1571
  }
2281
1572
  }, _callee3, this);
2282
1573
  }));
2283
-
2284
1574
  function authRefresh(_x3) {
2285
1575
  return _authRefresh.apply(this, arguments);
2286
1576
  }
2287
-
2288
1577
  return authRefresh;
2289
1578
  }()
2290
1579
  /**
@@ -2293,17 +1582,15 @@ var GuardService = /*#__PURE__*/function () {
2293
1582
  * @returns void
2294
1583
  */
2295
1584
  ;
2296
-
2297
1585
  _proto.authLogout =
2298
1586
  /*#__PURE__*/
2299
1587
  function () {
2300
- var _authLogout = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4() {
2301
- return runtime_1.wrap(function _callee4$(_context4) {
1588
+ var _authLogout = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
1589
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
2302
1590
  while (1) {
2303
1591
  switch (_context4.prev = _context4.next) {
2304
1592
  case 0:
2305
1593
  return _context4.abrupt("return", this.api.get(this.baseURL + "/v1/auth/logout"));
2306
-
2307
1594
  case 1:
2308
1595
  case "end":
2309
1596
  return _context4.stop();
@@ -2311,11 +1598,9 @@ var GuardService = /*#__PURE__*/function () {
2311
1598
  }
2312
1599
  }, _callee4, this);
2313
1600
  }));
2314
-
2315
1601
  function authLogout() {
2316
1602
  return _authLogout.apply(this, arguments);
2317
1603
  }
2318
-
2319
1604
  return authLogout;
2320
1605
  }()
2321
1606
  /**
@@ -2325,17 +1610,15 @@ var GuardService = /*#__PURE__*/function () {
2325
1610
  * @returns void
2326
1611
  */
2327
1612
  ;
2328
-
2329
1613
  _proto.authRecover =
2330
1614
  /*#__PURE__*/
2331
1615
  function () {
2332
- var _authRecover = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(req) {
2333
- return runtime_1.wrap(function _callee5$(_context5) {
1616
+ var _authRecover = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(req) {
1617
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
2334
1618
  while (1) {
2335
1619
  switch (_context5.prev = _context5.next) {
2336
1620
  case 0:
2337
1621
  return _context5.abrupt("return", this.api.post(this.baseURL + "/v1/auth/recover", req));
2338
-
2339
1622
  case 1:
2340
1623
  case "end":
2341
1624
  return _context5.stop();
@@ -2343,11 +1626,9 @@ var GuardService = /*#__PURE__*/function () {
2343
1626
  }
2344
1627
  }, _callee5, this);
2345
1628
  }));
2346
-
2347
1629
  function authRecover(_x4) {
2348
1630
  return _authRecover.apply(this, arguments);
2349
1631
  }
2350
-
2351
1632
  return authRecover;
2352
1633
  }()
2353
1634
  /**
@@ -2358,21 +1639,18 @@ var GuardService = /*#__PURE__*/function () {
2358
1639
  * @returns IdentityResponse
2359
1640
  */
2360
1641
  ;
2361
-
2362
1642
  _proto.identityCreate =
2363
1643
  /*#__PURE__*/
2364
1644
  function () {
2365
- var _identityCreate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(req) {
1645
+ var _identityCreate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(req) {
2366
1646
  var resp, _e$response3, code;
2367
-
2368
- return runtime_1.wrap(function _callee6$(_context6) {
1647
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
2369
1648
  while (1) {
2370
1649
  switch (_context6.prev = _context6.next) {
2371
1650
  case 0:
2372
1651
  _context6.prev = 0;
2373
1652
  _context6.next = 3;
2374
1653
  return this.api.post(this.baseURL + "/v1/identities", req);
2375
-
2376
1654
  case 3:
2377
1655
  resp = _context6.sent;
2378
1656
  this.api.setTokens({
@@ -2380,36 +1658,27 @@ var GuardService = /*#__PURE__*/function () {
2380
1658
  });
2381
1659
  _context6.next = 18;
2382
1660
  break;
2383
-
2384
1661
  case 7:
2385
1662
  _context6.prev = 7;
2386
1663
  _context6.t0 = _context6["catch"](0);
2387
-
2388
1664
  if (!_context6.t0.isAxiosError) {
2389
1665
  _context6.next = 17;
2390
1666
  break;
2391
1667
  }
2392
-
2393
1668
  code = (_e$response3 = _context6.t0.response) == null ? void 0 : _e$response3.status;
2394
1669
  _context6.t1 = code;
2395
1670
  _context6.next = _context6.t1 === 400 ? 14 : _context6.t1 === 409 ? 15 : _context6.t1 === 500 ? 16 : 16;
2396
1671
  break;
2397
-
2398
1672
  case 14:
2399
1673
  throw new IdentityCreationBadRequest();
2400
-
2401
1674
  case 15:
2402
1675
  throw new IdentityCreationConflict();
2403
-
2404
1676
  case 16:
2405
1677
  throw new IdentityCreationFailed();
2406
-
2407
1678
  case 17:
2408
1679
  throw new IdentityCreationFailed();
2409
-
2410
1680
  case 18:
2411
1681
  return _context6.abrupt("return", resp);
2412
-
2413
1682
  case 19:
2414
1683
  case "end":
2415
1684
  return _context6.stop();
@@ -2417,11 +1686,9 @@ var GuardService = /*#__PURE__*/function () {
2417
1686
  }
2418
1687
  }, _callee6, this, [[0, 7]]);
2419
1688
  }));
2420
-
2421
1689
  function identityCreate(_x5) {
2422
1690
  return _identityCreate.apply(this, arguments);
2423
1691
  }
2424
-
2425
1692
  return identityCreate;
2426
1693
  }()
2427
1694
  /**
@@ -2433,49 +1700,38 @@ var GuardService = /*#__PURE__*/function () {
2433
1700
  * @returns IdentityResponse
2434
1701
  */
2435
1702
  ;
2436
-
2437
1703
  _proto.identityGet =
2438
1704
  /*#__PURE__*/
2439
1705
  function () {
2440
- var _identityGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(identityID, skipCache) {
1706
+ var _identityGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(identityID, skipCache) {
2441
1707
  var _tokens$accessToken, _tokens$refreshToken;
2442
-
2443
1708
  var tokens, cacheKey, identity;
2444
- return runtime_1.wrap(function _callee7$(_context7) {
1709
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
2445
1710
  while (1) {
2446
1711
  switch (_context7.prev = _context7.next) {
2447
1712
  case 0:
2448
1713
  if (skipCache === void 0) {
2449
1714
  skipCache = false;
2450
1715
  }
2451
-
2452
1716
  tokens = this.api.getTokens();
2453
1717
  cacheKey = ((_tokens$accessToken = tokens.accessToken) != null ? _tokens$accessToken : '') + ((_tokens$refreshToken = tokens.refreshToken) != null ? _tokens$refreshToken : '') + identityID;
2454
-
2455
1718
  if (!(skipCache || !tokens.accessToken || !this.identityCache[cacheKey])) {
2456
1719
  _context7.next = 10;
2457
1720
  break;
2458
1721
  }
2459
-
2460
1722
  _context7.next = 6;
2461
1723
  return this.api.get(this.baseURL + "/v1/identities/" + identityID);
2462
-
2463
1724
  case 6:
2464
1725
  identity = _context7.sent;
2465
-
2466
1726
  if (!skipCache) {
2467
1727
  _context7.next = 9;
2468
1728
  break;
2469
1729
  }
2470
-
2471
1730
  return _context7.abrupt("return", identity);
2472
-
2473
1731
  case 9:
2474
1732
  this.identityCache[cacheKey] = identity;
2475
-
2476
1733
  case 10:
2477
1734
  return _context7.abrupt("return", this.identityCache[cacheKey]);
2478
-
2479
1735
  case 11:
2480
1736
  case "end":
2481
1737
  return _context7.stop();
@@ -2483,11 +1739,9 @@ var GuardService = /*#__PURE__*/function () {
2483
1739
  }
2484
1740
  }, _callee7, this);
2485
1741
  }));
2486
-
2487
1742
  function identityGet(_x6, _x7) {
2488
1743
  return _identityGet.apply(this, arguments);
2489
1744
  }
2490
-
2491
1745
  return identityGet;
2492
1746
  }()
2493
1747
  /**
@@ -2497,38 +1751,30 @@ var GuardService = /*#__PURE__*/function () {
2497
1751
  * @returns WhoAmIResponse
2498
1752
  */
2499
1753
  ;
2500
-
2501
1754
  _proto.whoAmI =
2502
1755
  /*#__PURE__*/
2503
1756
  function () {
2504
- var _whoAmI = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(refreshCache) {
1757
+ var _whoAmI = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(refreshCache) {
2505
1758
  var _this$api$getTokens$a;
2506
-
2507
1759
  var cacheKey;
2508
- return runtime_1.wrap(function _callee8$(_context8) {
1760
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
2509
1761
  while (1) {
2510
1762
  switch (_context8.prev = _context8.next) {
2511
1763
  case 0:
2512
1764
  if (refreshCache === void 0) {
2513
1765
  refreshCache = false;
2514
1766
  }
2515
-
2516
1767
  cacheKey = (_this$api$getTokens$a = this.api.getTokens().accessToken) != null ? _this$api$getTokens$a : '';
2517
-
2518
1768
  if (!(!this.whoAmICache[cacheKey] || refreshCache)) {
2519
1769
  _context8.next = 6;
2520
1770
  break;
2521
1771
  }
2522
-
2523
1772
  _context8.next = 5;
2524
1773
  return this.api.get(this.baseURL + "/v1/auth/whoami");
2525
-
2526
1774
  case 5:
2527
1775
  this.whoAmICache[cacheKey] = _context8.sent;
2528
-
2529
1776
  case 6:
2530
1777
  return _context8.abrupt("return", this.whoAmICache[cacheKey]);
2531
-
2532
1778
  case 7:
2533
1779
  case "end":
2534
1780
  return _context8.stop();
@@ -2536,11 +1782,9 @@ var GuardService = /*#__PURE__*/function () {
2536
1782
  }
2537
1783
  }, _callee8, this);
2538
1784
  }));
2539
-
2540
1785
  function whoAmI(_x8) {
2541
1786
  return _whoAmI.apply(this, arguments);
2542
1787
  }
2543
-
2544
1788
  return whoAmI;
2545
1789
  }()
2546
1790
  /**
@@ -2551,17 +1795,15 @@ var GuardService = /*#__PURE__*/function () {
2551
1795
  * @returns IdentityResponse
2552
1796
  */
2553
1797
  ;
2554
-
2555
1798
  _proto.identityUpdate =
2556
1799
  /*#__PURE__*/
2557
1800
  function () {
2558
- var _identityUpdate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(identityID, req) {
2559
- return runtime_1.wrap(function _callee9$(_context9) {
1801
+ var _identityUpdate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(identityID, req) {
1802
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
2560
1803
  while (1) {
2561
1804
  switch (_context9.prev = _context9.next) {
2562
1805
  case 0:
2563
1806
  return _context9.abrupt("return", this.api.put(this.baseURL + "/v1/identities/" + identityID, req));
2564
-
2565
1807
  case 1:
2566
1808
  case "end":
2567
1809
  return _context9.stop();
@@ -2569,11 +1811,9 @@ var GuardService = /*#__PURE__*/function () {
2569
1811
  }
2570
1812
  }, _callee9, this);
2571
1813
  }));
2572
-
2573
1814
  function identityUpdate(_x9, _x10) {
2574
1815
  return _identityUpdate.apply(this, arguments);
2575
1816
  }
2576
-
2577
1817
  return identityUpdate;
2578
1818
  }()
2579
1819
  /**
@@ -2585,13 +1825,12 @@ var GuardService = /*#__PURE__*/function () {
2585
1825
  * @returns QRCodeResponse
2586
1826
  */
2587
1827
  ;
2588
-
2589
1828
  _proto.identityMFAQRCode =
2590
1829
  /*#__PURE__*/
2591
1830
  function () {
2592
- var _identityMFAQRCode = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(identityID, password) {
1831
+ var _identityMFAQRCode = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(identityID, password) {
2593
1832
  var req;
2594
- return runtime_1.wrap(function _callee10$(_context10) {
1833
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
2595
1834
  while (1) {
2596
1835
  switch (_context10.prev = _context10.next) {
2597
1836
  case 0:
@@ -2603,7 +1842,6 @@ var GuardService = /*#__PURE__*/function () {
2603
1842
  Accept: 'application/json'
2604
1843
  }
2605
1844
  }));
2606
-
2607
1845
  case 2:
2608
1846
  case "end":
2609
1847
  return _context10.stop();
@@ -2611,11 +1849,9 @@ var GuardService = /*#__PURE__*/function () {
2611
1849
  }
2612
1850
  }, _callee10, this);
2613
1851
  }));
2614
-
2615
1852
  function identityMFAQRCode(_x11, _x12) {
2616
1853
  return _identityMFAQRCode.apply(this, arguments);
2617
1854
  }
2618
-
2619
1855
  return identityMFAQRCode;
2620
1856
  }()
2621
1857
  /**
@@ -2625,17 +1861,15 @@ var GuardService = /*#__PURE__*/function () {
2625
1861
  * @return void
2626
1862
  */
2627
1863
  ;
2628
-
2629
1864
  _proto.identitySendConfirmEmail =
2630
1865
  /*#__PURE__*/
2631
1866
  function () {
2632
- var _identitySendConfirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(req) {
2633
- return runtime_1.wrap(function _callee11$(_context11) {
1867
+ var _identitySendConfirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(req) {
1868
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
2634
1869
  while (1) {
2635
1870
  switch (_context11.prev = _context11.next) {
2636
1871
  case 0:
2637
1872
  return _context11.abrupt("return", this.api.post(this.baseURL + "/v1/identity/confirm", req));
2638
-
2639
1873
  case 1:
2640
1874
  case "end":
2641
1875
  return _context11.stop();
@@ -2643,11 +1877,9 @@ var GuardService = /*#__PURE__*/function () {
2643
1877
  }
2644
1878
  }, _callee11, this);
2645
1879
  }));
2646
-
2647
1880
  function identitySendConfirmEmail(_x13) {
2648
1881
  return _identitySendConfirmEmail.apply(this, arguments);
2649
1882
  }
2650
-
2651
1883
  return identitySendConfirmEmail;
2652
1884
  }()
2653
1885
  /**
@@ -2657,17 +1889,15 @@ var GuardService = /*#__PURE__*/function () {
2657
1889
  * @returns IdentityResponse
2658
1890
  */
2659
1891
  ;
2660
-
2661
1892
  _proto.identityGetByCustomerEmail =
2662
1893
  /*#__PURE__*/
2663
1894
  function () {
2664
- var _identityGetByCustomerEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(email) {
2665
- return runtime_1.wrap(function _callee12$(_context12) {
1895
+ var _identityGetByCustomerEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(email) {
1896
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
2666
1897
  while (1) {
2667
1898
  switch (_context12.prev = _context12.next) {
2668
1899
  case 0:
2669
1900
  return _context12.abrupt("return", this.identityGetByHash(email.substring(email.indexOf('+') + 1, email.indexOf('@'))));
2670
-
2671
1901
  case 1:
2672
1902
  case "end":
2673
1903
  return _context12.stop();
@@ -2675,11 +1905,9 @@ var GuardService = /*#__PURE__*/function () {
2675
1905
  }
2676
1906
  }, _callee12, this);
2677
1907
  }));
2678
-
2679
1908
  function identityGetByCustomerEmail(_x14) {
2680
1909
  return _identityGetByCustomerEmail.apply(this, arguments);
2681
1910
  }
2682
-
2683
1911
  return identityGetByCustomerEmail;
2684
1912
  }()
2685
1913
  /**
@@ -2689,17 +1917,15 @@ var GuardService = /*#__PURE__*/function () {
2689
1917
  * @returns IdentityResponse
2690
1918
  */
2691
1919
  ;
2692
-
2693
1920
  _proto.identityGetByHash =
2694
1921
  /*#__PURE__*/
2695
1922
  function () {
2696
- var _identityGetByHash = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee13(b64Hash) {
2697
- return runtime_1.wrap(function _callee13$(_context13) {
1923
+ var _identityGetByHash = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(b64Hash) {
1924
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
2698
1925
  while (1) {
2699
1926
  switch (_context13.prev = _context13.next) {
2700
1927
  case 0:
2701
1928
  return _context13.abrupt("return", this.identityGet(b64Hash.replace(/\+/g, '-').replace(/\//g, '_')));
2702
-
2703
1929
  case 1:
2704
1930
  case "end":
2705
1931
  return _context13.stop();
@@ -2707,14 +1933,11 @@ var GuardService = /*#__PURE__*/function () {
2707
1933
  }
2708
1934
  }, _callee13, this);
2709
1935
  }));
2710
-
2711
1936
  function identityGetByHash(_x15) {
2712
1937
  return _identityGetByHash.apply(this, arguments);
2713
1938
  }
2714
-
2715
1939
  return identityGetByHash;
2716
1940
  }();
2717
-
2718
1941
  return GuardService;
2719
1942
  }();
2720
1943
 
@@ -2728,10 +1951,7 @@ var SearchService = /*#__PURE__*/function () {
2728
1951
  * @param consultUUID
2729
1952
  * @param terms the search terms to be indexed
2730
1953
  */
2731
-
2732
-
2733
1954
  var _proto = SearchService.prototype;
2734
-
2735
1955
  _proto.index = function index(consultUUID, terms) {
2736
1956
  return this.api.post(this.baseURL + "/v1/index", {
2737
1957
  consultUUID: consultUUID,
@@ -2741,15 +1961,12 @@ var SearchService = /*#__PURE__*/function () {
2741
1961
  /**
2742
1962
  * Searches for the consultations corresponding to the search terms entered in the query
2743
1963
  * @param terms array of search terms
2744
- */
2745
- ;
2746
-
1964
+ */;
2747
1965
  _proto.search = function search(terms) {
2748
1966
  return this.api.post(this.baseURL + "/v1/search", {
2749
1967
  terms: terms
2750
1968
  });
2751
1969
  };
2752
-
2753
1970
  return SearchService;
2754
1971
  }();
2755
1972
 
@@ -2763,10 +1980,7 @@ var PracticeService = /*#__PURE__*/function () {
2763
1980
  * an M2M with the scope `practice.practices.get`
2764
1981
  * @returns an array of practices
2765
1982
  */
2766
-
2767
-
2768
1983
  var _proto = PracticeService.prototype;
2769
-
2770
1984
  _proto.practiceGetAll = function practiceGetAll() {
2771
1985
  return this.api.get(this.baseURL + "/v1/practices");
2772
1986
  }
@@ -2777,9 +1991,7 @@ var PracticeService = /*#__PURE__*/function () {
2777
1991
  * @param hydratePracticeConfigs (optional) if set true it the Practice field configs will be set
2778
1992
  * @param accounts (optional) if set true it the Practice field accounts will be set
2779
1993
  * @returns the found practice or undefined
2780
- */
2781
- ;
2782
-
1994
+ */;
2783
1995
  _proto.practiceGetFromURL = function practiceGetFromURL(practiceURL, params) {
2784
1996
  return this.api.get(this.baseURL + "/v1/practices", {
2785
1997
  params: _extends({
@@ -2787,7 +1999,6 @@ var PracticeService = /*#__PURE__*/function () {
2787
1999
  }, params)
2788
2000
  });
2789
2001
  };
2790
-
2791
2002
  _proto.practiceGetFromUuid = function practiceGetFromUuid(practiceUuid, locale, withAccounts) {
2792
2003
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid, {
2793
2004
  params: {
@@ -2795,15 +2006,13 @@ var PracticeService = /*#__PURE__*/function () {
2795
2006
  accounts: withAccounts
2796
2007
  }
2797
2008
  });
2798
- } /// Practice Configs
2799
-
2009
+ }
2010
+ /// Practice Configs
2800
2011
  /**
2801
2012
  * This function retrieves all configs of a specific practice
2802
2013
  * @param practiceUuid uuid of the practice
2803
2014
  * @returns the practice configs
2804
- */
2805
- ;
2806
-
2015
+ */;
2807
2016
  _proto.practiceConfigGetFromPracticeUuid = function practiceConfigGetFromPracticeUuid(practiceUuid) {
2808
2017
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/configs");
2809
2018
  }
@@ -2812,9 +2021,7 @@ var PracticeService = /*#__PURE__*/function () {
2812
2021
  * @param practiceUuid uuid of the practice
2813
2022
  * @param kind of the config
2814
2023
  * @returns the practice config
2815
- */
2816
- ;
2817
-
2024
+ */;
2818
2025
  _proto.practiceConfigGetByKindForPracticeUuid = function practiceConfigGetByKindForPracticeUuid(practiceUuid, kind) {
2819
2026
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/configs/" + kind);
2820
2027
  }
@@ -2823,9 +2030,7 @@ var PracticeService = /*#__PURE__*/function () {
2823
2030
  * @param practiceUuid uuid of the practice
2824
2031
  * @param config the config to add to the practice
2825
2032
  * @returns the created practice config
2826
- */
2827
- ;
2828
-
2033
+ */;
2829
2034
  _proto.practiceConfigCreateForPracticeUuid = function practiceConfigCreateForPracticeUuid(practiceUuid, config) {
2830
2035
  return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/configs", config);
2831
2036
  }
@@ -2834,18 +2039,15 @@ var PracticeService = /*#__PURE__*/function () {
2834
2039
  * @param practiceUuid uuid of the practice
2835
2040
  * @param config the config to update
2836
2041
  * @returns the practice config
2837
- */
2838
- ;
2839
-
2042
+ */;
2840
2043
  _proto.practiceConfigUpdate = function practiceConfigUpdate(config) {
2841
2044
  return this.api.put(this.baseURL + "/v1/practices/" + config.uuidPractice + "/configs/" + config.kind, config);
2842
- } /// Accounts
2045
+ }
2046
+ /// Accounts
2843
2047
  ;
2844
-
2845
2048
  _proto.practiceGetAccounts = function practiceGetAccounts(practiceUuid) {
2846
2049
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/accounts");
2847
2050
  };
2848
-
2849
2051
  _proto.practiceGetAccount = function practiceGetAccount(practiceUuid, accountUuid) {
2850
2052
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/accounts/" + accountUuid);
2851
2053
  }
@@ -2854,9 +2056,7 @@ var PracticeService = /*#__PURE__*/function () {
2854
2056
  * @param practiceUuid the uuid of the practice
2855
2057
  * @param kind (optional) the kind of WorkflowType to filter in
2856
2058
  * @returns a list of PracticeWorkflow
2857
- */
2858
- ;
2859
-
2059
+ */;
2860
2060
  _proto.practiceGetWorkflows = function practiceGetWorkflows(practiceUuid, kind) {
2861
2061
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/workflows", {
2862
2062
  params: {
@@ -2864,12 +2064,11 @@ var PracticeService = /*#__PURE__*/function () {
2864
2064
  }
2865
2065
  });
2866
2066
  };
2867
-
2868
2067
  _proto.practiceGetWorkflow = function practiceGetWorkflow(practiceUuid, workflowType) {
2869
2068
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/workflows/" + workflowType);
2870
- } /// Plans
2069
+ }
2070
+ /// Plans
2871
2071
  ;
2872
-
2873
2072
  _proto.practiceGetPlans = function practiceGetPlans(practiceUuid, planType) {
2874
2073
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/plans", {
2875
2074
  params: {
@@ -2877,16 +2076,14 @@ var PracticeService = /*#__PURE__*/function () {
2877
2076
  }
2878
2077
  });
2879
2078
  };
2880
-
2881
2079
  _proto.practiceGetPlan = function practiceGetPlan(practiceUuid, planId) {
2882
2080
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/plans/" + planId);
2883
2081
  };
2884
-
2885
2082
  _proto.practiceGetPlanPrices = function practiceGetPlanPrices(practiceUuid, planId) {
2886
2083
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/plans/" + planId + "/prices");
2887
- } // Payments
2084
+ }
2085
+ // Payments
2888
2086
  ;
2889
-
2890
2087
  _proto.practiceGetPayments = function practiceGetPayments(practiceUuid, statusPayment, withConsultUUIDNULL, perPage, indexPage) {
2891
2088
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments", {
2892
2089
  params: {
@@ -2897,16 +2094,14 @@ var PracticeService = /*#__PURE__*/function () {
2897
2094
  }
2898
2095
  });
2899
2096
  };
2900
-
2901
2097
  _proto.practiceGetPayment = function practiceGetPayment(practiceUuid, idStripeInvoiceOrPaymentIntent) {
2902
2098
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/" + idStripeInvoiceOrPaymentIntent);
2903
2099
  };
2904
-
2905
2100
  _proto.practiceGetPaymentForStripePaymentIntentWithID = function practiceGetPaymentForStripePaymentIntentWithID(practiceUuid, stripePaymentIntentId) {
2906
2101
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/" + stripePaymentIntentId);
2907
- } // Payments Intent
2102
+ }
2103
+ // Payments Intent
2908
2104
  ;
2909
-
2910
2105
  _proto.practiceGetPaymentsIntents = function practiceGetPaymentsIntents(practiceUuid, planType) {
2911
2106
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents", {
2912
2107
  params: {
@@ -2918,9 +2113,7 @@ var PracticeService = /*#__PURE__*/function () {
2918
2113
  * This function return the user hased email to be use for creating payment intent
2919
2114
  * @param email the email to hash
2920
2115
  * @returns a hashed email
2921
- */
2922
- ;
2923
-
2116
+ */;
2924
2117
  _proto.getPaymentIntentHashedEmail = function getPaymentIntentHashedEmail(email) {
2925
2118
  return hashToBase64String(email.toLowerCase());
2926
2119
  }
@@ -2934,9 +2127,7 @@ var PracticeService = /*#__PURE__*/function () {
2934
2127
  * @param promotionCode (optional) promotion code to apply
2935
2128
  * @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.).
2936
2129
  * @returns
2937
- */
2938
- ;
2939
-
2130
+ */;
2940
2131
  _proto.practiceCreatePaymentsIntent = function practiceCreatePaymentsIntent(practiceUuid, planId, userEmail, isoLocality, url_subdomain, requestMetadata) {
2941
2132
  return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/", {
2942
2133
  idPlan: planId,
@@ -2949,7 +2140,6 @@ var PracticeService = /*#__PURE__*/function () {
2949
2140
  }
2950
2141
  });
2951
2142
  };
2952
-
2953
2143
  _proto.practiceGetPaymentsIntent = function practiceGetPaymentsIntent(practiceUuid, paymentIntentId) {
2954
2144
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/" + paymentIntentId);
2955
2145
  }
@@ -2962,9 +2152,7 @@ var PracticeService = /*#__PURE__*/function () {
2962
2152
  * @param promotionCode (optional) promotional code to apply
2963
2153
  * @param finalize (optional) if true will finalize the PracticePaymentIntent and related Stripe.Invoice. Once, finalized you cannot modify the PracticePaymentIntent anymore.
2964
2154
  * @returns the updated PracticePaymentIntent
2965
- */
2966
- ;
2967
-
2155
+ */;
2968
2156
  _proto.practiceUpdatePaymentsIntent = function practiceUpdatePaymentsIntent(practiceUuid, idPraticePaymentIntent, practicePaymentIntent, userEmail, promotionCode, finalize) {
2969
2157
  return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/" + idPraticePaymentIntent, _extends({}, practicePaymentIntent, {
2970
2158
  hashUserEmail: userEmail ? this.getPaymentIntentHashedEmail(userEmail) : undefined
@@ -2979,125 +2167,103 @@ var PracticeService = /*#__PURE__*/function () {
2979
2167
  * Invoice
2980
2168
  * @param practiceUuid UUID of the practice to get the invoice from
2981
2169
  * @param invoiceId ID of the invoice in stripe
2982
- */
2983
- ;
2984
-
2170
+ */;
2985
2171
  _proto.getInvoice = function getInvoice(practiceUuid, invoiceId) {
2986
2172
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/invoices/" + invoiceId);
2987
- } // Practitioner
2173
+ }
2174
+ // Practitioner
2988
2175
  ;
2989
-
2990
2176
  _proto.practiceGetPractitioners = function practiceGetPractitioners(practiceUuid) {
2991
2177
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners");
2992
2178
  };
2993
-
2994
2179
  _proto.practiceUpdatePractitioner = function practiceUpdatePractitioner(practiceUuid, practitionerUuid, requestBody) {
2995
2180
  return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid, requestBody);
2996
2181
  };
2997
-
2998
2182
  _proto.practiceGetPractitioner = function practiceGetPractitioner(practiceUuid, practitionerUuid) {
2999
2183
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid);
3000
- } // Practitioner Licenses
2184
+ }
2185
+ // Practitioner Licenses
3001
2186
  ;
3002
-
3003
2187
  _proto.practiceGetPractitionerLicenses = function practiceGetPractitionerLicenses(practiceUuid, practitionerUuid) {
3004
2188
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses");
3005
2189
  };
3006
-
3007
2190
  _proto.practiceCreatePractitionerLicense = function practiceCreatePractitionerLicense(practiceUuid, practitionerUuid, requestBody) {
3008
2191
  return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses", requestBody);
3009
2192
  };
3010
-
3011
2193
  _proto.practiceUpdatePractitionerLicense = function practiceUpdatePractitionerLicense(practiceUuid, practitionerUuid, licenseId, requestBody) {
3012
2194
  return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses/" + licenseId, requestBody);
3013
2195
  };
3014
-
3015
2196
  _proto.practiceGetPractitionerLicense = function practiceGetPractitionerLicense(practiceUuid, practitionerUuid, licenseId) {
3016
2197
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses/" + licenseId);
3017
- } // Practitioner Preferences
2198
+ }
2199
+ // Practitioner Preferences
3018
2200
  ;
3019
-
3020
2201
  _proto.practiceGetPractitionerPreferences = function practiceGetPractitionerPreferences(practiceUuid, practitionerUuid) {
3021
2202
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences");
3022
2203
  };
3023
-
3024
2204
  _proto.practiceCreatePractitionerPreference = function practiceCreatePractitionerPreference(practiceUuid, practitionerUuid, requestBody) {
3025
2205
  return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences", requestBody);
3026
2206
  };
3027
-
3028
2207
  _proto.practiceUpdatePractitionerPreference = function practiceUpdatePractitionerPreference(practiceUuid, practitionerUuid, preferenceId, requestBody) {
3029
2208
  return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences/" + preferenceId, requestBody);
3030
2209
  };
3031
-
3032
2210
  _proto.practiceGetPractitionerPreference = function practiceGetPractitionerPreference(practiceUuid, practitionerUuid, preferenceId) {
3033
2211
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences/" + preferenceId);
3034
- } // Practitioner Roles
2212
+ }
2213
+ // Practitioner Roles
3035
2214
  ;
3036
-
3037
2215
  _proto.practiceGetPractitionerRoles = function practiceGetPractitionerRoles(practiceUuid, practitionerUuid) {
3038
2216
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles");
3039
2217
  };
3040
-
3041
2218
  _proto.practiceCreatePractitionerRole = function practiceCreatePractitionerRole(practiceUuid, practitionerUuid, requestBody) {
3042
2219
  return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles", requestBody);
3043
2220
  };
3044
-
3045
2221
  _proto.practiceDeletePractitionerRoles = function practiceDeletePractitionerRoles(practiceUuid, practitionerUuid) {
3046
2222
  return this.api.deleteRequest(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles");
3047
2223
  };
3048
-
3049
2224
  _proto.practiceUpdatePractitionerRole = function practiceUpdatePractitionerRole(practiceUuid, practitionerUuid, roleId, requestBody) {
3050
2225
  return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles/" + roleId, requestBody);
3051
2226
  };
3052
-
3053
2227
  _proto.practiceGetPractitionerRole = function practiceGetPractitionerRole(practiceUuid, practitionerUuid, roleId) {
3054
2228
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles/" + roleId);
3055
2229
  };
3056
-
3057
2230
  _proto.practiceDeletePractitionerRole = function practiceDeletePractitionerRole(practiceUuid, practitionerUuid, roleId) {
3058
2231
  return this.api.deleteRequest(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles/" + roleId);
3059
- } // Practitioner signature
3060
-
2232
+ }
2233
+ // Practitioner signature
3061
2234
  /**
3062
2235
  * This function returns the practitioner's signature as a Blob
3063
2236
  * @param practiceUuid the practice uuid of the practitioner
3064
2237
  * @param practitionerUuid the practitioner uuid
3065
2238
  * @returns a blob representing the signature
3066
- */
3067
- ;
3068
-
2239
+ */;
3069
2240
  _proto.practiceGetPractitionerSignature = function practiceGetPractitionerSignature(practiceUuid, practitionerUuid) {
3070
2241
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/signature", {
3071
2242
  responseType: 'blob'
3072
2243
  });
3073
- } // Assignments
2244
+ }
2245
+ // Assignments
3074
2246
  ;
3075
-
3076
2247
  _proto.practiceGetAssignments = function practiceGetAssignments(practiceUuid) {
3077
2248
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments");
3078
2249
  };
3079
-
3080
2250
  _proto.practiceCreateAssignment = function practiceCreateAssignment(practiceUuid, requestBody) {
3081
2251
  return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments", requestBody);
3082
2252
  };
3083
-
3084
2253
  _proto.practiceUpdateAssignment = function practiceUpdateAssignment(practiceUuid, assignmentId, requestBody) {
3085
2254
  return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments/" + assignmentId, requestBody);
3086
2255
  };
3087
-
3088
2256
  _proto.practiceGetAssignment = function practiceGetAssignment(practiceUuid, assignmentId) {
3089
2257
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments/" + assignmentId);
3090
- } // Quotas
2258
+ }
2259
+ // Quotas
3091
2260
  ;
3092
-
3093
2261
  _proto.practiceGetQuotas = function practiceGetQuotas(practiceUuid) {
3094
2262
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/quotas");
3095
2263
  };
3096
-
3097
2264
  _proto.practiceGetQuota = function practiceGetQuota(practiceUuid, quotaId) {
3098
2265
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/quotas/" + quotaId);
3099
2266
  };
3100
-
3101
2267
  return PracticeService;
3102
2268
  }();
3103
2269
 
@@ -3106,12 +2272,10 @@ var TellerService = /*#__PURE__*/function () {
3106
2272
  this.api = api;
3107
2273
  this.baseURL = baseURL;
3108
2274
  }
3109
-
3110
2275
  var _proto = TellerService.prototype;
3111
-
3112
2276
  _proto.lockboxDataStore = /*#__PURE__*/function () {
3113
- var _lockboxDataStore = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(lockboxUuid, req, lockboxOwnerUuid, previousDataUuid, options) {
3114
- return runtime_1.wrap(function _callee$(_context) {
2277
+ var _lockboxDataStore = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(lockboxUuid, req, lockboxOwnerUuid, previousDataUuid, options) {
2278
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3115
2279
  while (1) {
3116
2280
  switch (_context.prev = _context.next) {
3117
2281
  case 0:
@@ -3120,7 +2284,6 @@ var TellerService = /*#__PURE__*/function () {
3120
2284
  updateMedicalStatus: true
3121
2285
  };
3122
2286
  }
3123
-
3124
2287
  return _context.abrupt("return", this.api.post(this.baseURL + "/v1/lockboxes/" + lockboxUuid + "/data", req, {
3125
2288
  params: {
3126
2289
  lockbox_owner_uuid: lockboxOwnerUuid,
@@ -3128,7 +2291,6 @@ var TellerService = /*#__PURE__*/function () {
3128
2291
  update_medical_status: options.updateMedicalStatus
3129
2292
  }
3130
2293
  }));
3131
-
3132
2294
  case 2:
3133
2295
  case "end":
3134
2296
  return _context.stop();
@@ -3136,14 +2298,11 @@ var TellerService = /*#__PURE__*/function () {
3136
2298
  }
3137
2299
  }, _callee, this);
3138
2300
  }));
3139
-
3140
2301
  function lockboxDataStore(_x, _x2, _x3, _x4, _x5) {
3141
2302
  return _lockboxDataStore.apply(this, arguments);
3142
2303
  }
3143
-
3144
2304
  return lockboxDataStore;
3145
2305
  }();
3146
-
3147
2306
  _proto.updateConsultByUUID = function updateConsultByUUID(patientUuid, uuidConsult, statusMedical, closedReasonType, closedReasonDescription, neverExpires) {
3148
2307
  return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult, {
3149
2308
  patientUuid: patientUuid,
@@ -3161,9 +2320,7 @@ var TellerService = /*#__PURE__*/function () {
3161
2320
  * @param consultationShortId the consultation short id
3162
2321
  * @param fax the address where to send the fax
3163
2322
  * @returns void
3164
- */
3165
- ;
3166
-
2323
+ */;
3167
2324
  _proto.notifyFaxFailed = function notifyFaxFailed(practiceUuid, consultationUuid, consultationShortId, fax) {
3168
2325
  return this.api.post(this.baseURL + "/v1/fax-failed", {
3169
2326
  consultationUuid: consultationUuid,
@@ -3180,9 +2337,7 @@ var TellerService = /*#__PURE__*/function () {
3180
2337
  * @todo - Make service only exposed route
3181
2338
  * @param uuidConsult the uuid of the consult to reassign
3182
2339
  * @param newPractitionerUuid the uuid of the practitioner that will get reassigned
3183
- */
3184
- ;
3185
-
2340
+ */;
3186
2341
  _proto.reassignmentEmail = function reassignmentEmail(uuidConsult, newPractitionerUuid) {
3187
2342
  return this.api.post(this.baseURL + "/v1/consult/" + uuidConsult + "/reassignment-email", {
3188
2343
  newPractitionerUuid: newPractitionerUuid
@@ -3194,9 +2349,7 @@ var TellerService = /*#__PURE__*/function () {
3194
2349
  * @param consult
3195
2350
  * @param patientUuid
3196
2351
  * @returns void
3197
- */
3198
- ;
3199
-
2352
+ */;
3200
2353
  _proto.sendOnlineFaxSuccessfulEmail = function sendOnlineFaxSuccessfulEmail(consult, patientUuid) {
3201
2354
  return this.api.post(this.baseURL + "/v1/online-fax-notify", {
3202
2355
  consult: consult,
@@ -3207,13 +2360,10 @@ var TellerService = /*#__PURE__*/function () {
3207
2360
  * This function will send an email to patient to allow them to resume the consult.
3208
2361
  * @param req the body of the resume consult request
3209
2362
  * @returns void
3210
- */
3211
- ;
3212
-
2363
+ */;
3213
2364
  _proto.sendResumeConsultEmail = function sendResumeConsultEmail(req) {
3214
2365
  return this.api.post(this.baseURL + "/v1/resume-consult-email", req);
3215
2366
  };
3216
-
3217
2367
  return TellerService;
3218
2368
  }();
3219
2369
 
@@ -3222,17 +2372,14 @@ var VaultService = /*#__PURE__*/function () {
3222
2372
  this.api = api;
3223
2373
  this.baseURL = baseURL;
3224
2374
  }
3225
-
3226
2375
  var _proto = VaultService.prototype;
3227
-
3228
2376
  _proto.lockboxCreate = /*#__PURE__*/function () {
3229
- var _lockboxCreate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(lockboxMetadata) {
3230
- return runtime_1.wrap(function _callee$(_context) {
2377
+ var _lockboxCreate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(lockboxMetadata) {
2378
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3231
2379
  while (1) {
3232
2380
  switch (_context.prev = _context.next) {
3233
2381
  case 0:
3234
2382
  return _context.abrupt("return", this.api.post(this.baseURL + "/v1/lockbox", lockboxMetadata));
3235
-
3236
2383
  case 1:
3237
2384
  case "end":
3238
2385
  return _context.stop();
@@ -3240,17 +2387,14 @@ var VaultService = /*#__PURE__*/function () {
3240
2387
  }
3241
2388
  }, _callee, this);
3242
2389
  }));
3243
-
3244
2390
  function lockboxCreate(_x) {
3245
2391
  return _lockboxCreate.apply(this, arguments);
3246
2392
  }
3247
-
3248
2393
  return lockboxCreate;
3249
2394
  }();
3250
-
3251
2395
  _proto.lockboxMetadataAdd = /*#__PURE__*/function () {
3252
- var _lockboxMetadataAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(lockboxUuid, lockboxMetadata, lockboxOwnerUuid) {
3253
- return runtime_1.wrap(function _callee2$(_context2) {
2396
+ var _lockboxMetadataAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(lockboxUuid, lockboxMetadata, lockboxOwnerUuid) {
2397
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
3254
2398
  while (1) {
3255
2399
  switch (_context2.prev = _context2.next) {
3256
2400
  case 0:
@@ -3259,7 +2403,6 @@ var VaultService = /*#__PURE__*/function () {
3259
2403
  lockbox_owner_uuid: lockboxOwnerUuid
3260
2404
  }
3261
2405
  }));
3262
-
3263
2406
  case 1:
3264
2407
  case "end":
3265
2408
  return _context2.stop();
@@ -3267,17 +2410,14 @@ var VaultService = /*#__PURE__*/function () {
3267
2410
  }
3268
2411
  }, _callee2, this);
3269
2412
  }));
3270
-
3271
2413
  function lockboxMetadataAdd(_x2, _x3, _x4) {
3272
2414
  return _lockboxMetadataAdd.apply(this, arguments);
3273
2415
  }
3274
-
3275
2416
  return lockboxMetadataAdd;
3276
2417
  }();
3277
-
3278
2418
  _proto.lockboxSecretGet = /*#__PURE__*/function () {
3279
- var _lockboxSecretGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(lockboxUuid, lockboxOwnerUuid) {
3280
- return runtime_1.wrap(function _callee3$(_context3) {
2419
+ var _lockboxSecretGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(lockboxUuid, lockboxOwnerUuid) {
2420
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
3281
2421
  while (1) {
3282
2422
  switch (_context3.prev = _context3.next) {
3283
2423
  case 0:
@@ -3286,7 +2426,6 @@ var VaultService = /*#__PURE__*/function () {
3286
2426
  lockbox_owner_uuid: lockboxOwnerUuid
3287
2427
  }
3288
2428
  }));
3289
-
3290
2429
  case 1:
3291
2430
  case "end":
3292
2431
  return _context3.stop();
@@ -3294,17 +2433,14 @@ var VaultService = /*#__PURE__*/function () {
3294
2433
  }
3295
2434
  }, _callee3, this);
3296
2435
  }));
3297
-
3298
2436
  function lockboxSecretGet(_x5, _x6) {
3299
2437
  return _lockboxSecretGet.apply(this, arguments);
3300
2438
  }
3301
-
3302
2439
  return lockboxSecretGet;
3303
2440
  }();
3304
-
3305
2441
  _proto.lockboxGrant = /*#__PURE__*/function () {
3306
- var _lockboxGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(lockboxUuid, req, lockboxOwnerUuid) {
3307
- return runtime_1.wrap(function _callee4$(_context4) {
2442
+ var _lockboxGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(lockboxUuid, req, lockboxOwnerUuid) {
2443
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
3308
2444
  while (1) {
3309
2445
  switch (_context4.prev = _context4.next) {
3310
2446
  case 0:
@@ -3313,7 +2449,6 @@ var VaultService = /*#__PURE__*/function () {
3313
2449
  lockbox_owner_uuid: lockboxOwnerUuid
3314
2450
  }
3315
2451
  }));
3316
-
3317
2452
  case 1:
3318
2453
  case "end":
3319
2454
  return _context4.stop();
@@ -3321,11 +2456,9 @@ var VaultService = /*#__PURE__*/function () {
3321
2456
  }
3322
2457
  }, _callee4, this);
3323
2458
  }));
3324
-
3325
2459
  function lockboxGrant(_x7, _x8, _x9) {
3326
2460
  return _lockboxGrant.apply(this, arguments);
3327
2461
  }
3328
-
3329
2462
  return lockboxGrant;
3330
2463
  }()
3331
2464
  /**
@@ -3334,17 +2467,15 @@ var VaultService = /*#__PURE__*/function () {
3334
2467
  * @returns decrypted lockboxes granted to user
3335
2468
  */
3336
2469
  ;
3337
-
3338
2470
  _proto.grantsGet =
3339
2471
  /*#__PURE__*/
3340
2472
  function () {
3341
- var _grantsGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5() {
3342
- return runtime_1.wrap(function _callee5$(_context5) {
2473
+ var _grantsGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
2474
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
3343
2475
  while (1) {
3344
2476
  switch (_context5.prev = _context5.next) {
3345
2477
  case 0:
3346
2478
  return _context5.abrupt("return", this.api.get(this.baseURL + "/v1/grants"));
3347
-
3348
2479
  case 1:
3349
2480
  case "end":
3350
2481
  return _context5.stop();
@@ -3352,11 +2483,9 @@ var VaultService = /*#__PURE__*/function () {
3352
2483
  }
3353
2484
  }, _callee5, this);
3354
2485
  }));
3355
-
3356
2486
  function grantsGet() {
3357
2487
  return _grantsGet.apply(this, arguments);
3358
2488
  }
3359
-
3360
2489
  return grantsGet;
3361
2490
  }()
3362
2491
  /**
@@ -3370,12 +2499,11 @@ var VaultService = /*#__PURE__*/function () {
3370
2499
  * @returns
3371
2500
  */
3372
2501
  ;
3373
-
3374
2502
  _proto.lockboxDataStore =
3375
2503
  /*#__PURE__*/
3376
2504
  function () {
3377
- var _lockboxDataStore = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(lockboxUuid, req, lockboxOwnerUuid, previousDataUuid) {
3378
- return runtime_1.wrap(function _callee6$(_context6) {
2505
+ var _lockboxDataStore = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(lockboxUuid, req, lockboxOwnerUuid, previousDataUuid) {
2506
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
3379
2507
  while (1) {
3380
2508
  switch (_context6.prev = _context6.next) {
3381
2509
  case 0:
@@ -3385,7 +2513,6 @@ var VaultService = /*#__PURE__*/function () {
3385
2513
  data_uuid: previousDataUuid
3386
2514
  }
3387
2515
  }));
3388
-
3389
2516
  case 1:
3390
2517
  case "end":
3391
2518
  return _context6.stop();
@@ -3393,25 +2520,21 @@ var VaultService = /*#__PURE__*/function () {
3393
2520
  }
3394
2521
  }, _callee6, this);
3395
2522
  }));
3396
-
3397
2523
  function lockboxDataStore(_x10, _x11, _x12, _x13) {
3398
2524
  return _lockboxDataStore.apply(this, arguments);
3399
2525
  }
3400
-
3401
2526
  return lockboxDataStore;
3402
2527
  }();
3403
-
3404
2528
  _proto.lockboxDataGet = /*#__PURE__*/function () {
3405
- var _lockboxDataGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(lockboxUuid, dataUuid, lockboxOwnerUuid, stream) {
2529
+ var _lockboxDataGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(lockboxUuid, dataUuid, lockboxOwnerUuid, stream) {
3406
2530
  var data;
3407
- return runtime_1.wrap(function _callee7$(_context7) {
2531
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
3408
2532
  while (1) {
3409
2533
  switch (_context7.prev = _context7.next) {
3410
2534
  case 0:
3411
2535
  if (stream === void 0) {
3412
2536
  stream = true;
3413
2537
  }
3414
-
3415
2538
  _context7.next = 3;
3416
2539
  return this.api.get(this.baseURL + "/v1/lockboxes/" + lockboxUuid + "/data/" + dataUuid, {
3417
2540
  params: {
@@ -3419,22 +2542,17 @@ var VaultService = /*#__PURE__*/function () {
3419
2542
  stream: stream
3420
2543
  }
3421
2544
  });
3422
-
3423
2545
  case 3:
3424
2546
  data = _context7.sent;
3425
-
3426
2547
  if (!stream) {
3427
2548
  _context7.next = 6;
3428
2549
  break;
3429
2550
  }
3430
-
3431
2551
  return _context7.abrupt("return", {
3432
2552
  data: data
3433
2553
  });
3434
-
3435
2554
  case 6:
3436
2555
  return _context7.abrupt("return", data);
3437
-
3438
2556
  case 7:
3439
2557
  case "end":
3440
2558
  return _context7.stop();
@@ -3442,17 +2560,14 @@ var VaultService = /*#__PURE__*/function () {
3442
2560
  }
3443
2561
  }, _callee7, this);
3444
2562
  }));
3445
-
3446
2563
  function lockboxDataGet(_x14, _x15, _x16, _x17) {
3447
2564
  return _lockboxDataGet.apply(this, arguments);
3448
2565
  }
3449
-
3450
2566
  return lockboxDataGet;
3451
2567
  }();
3452
-
3453
2568
  _proto.lockboxManifestGet = /*#__PURE__*/function () {
3454
- var _lockboxManifestGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(lockboxUuid, filter, lockboxOwnerUuid) {
3455
- return runtime_1.wrap(function _callee8$(_context8) {
2569
+ var _lockboxManifestGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(lockboxUuid, filter, lockboxOwnerUuid) {
2570
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
3456
2571
  while (1) {
3457
2572
  switch (_context8.prev = _context8.next) {
3458
2573
  case 0:
@@ -3462,7 +2577,6 @@ var VaultService = /*#__PURE__*/function () {
3462
2577
  filter: filter
3463
2578
  }
3464
2579
  }));
3465
-
3466
2580
  case 1:
3467
2581
  case "end":
3468
2582
  return _context8.stop();
@@ -3470,17 +2584,14 @@ var VaultService = /*#__PURE__*/function () {
3470
2584
  }
3471
2585
  }, _callee8, this);
3472
2586
  }));
3473
-
3474
2587
  function lockboxManifestGet(_x18, _x19, _x20) {
3475
2588
  return _lockboxManifestGet.apply(this, arguments);
3476
2589
  }
3477
-
3478
2590
  return lockboxManifestGet;
3479
2591
  }();
3480
-
3481
2592
  _proto.lockboxMetadataGet = /*#__PURE__*/function () {
3482
- var _lockboxMetadataGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(lockboxUuid, fields, groupby, filter, lockboxOwnerUuid) {
3483
- return runtime_1.wrap(function _callee9$(_context9) {
2593
+ var _lockboxMetadataGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(lockboxUuid, fields, groupby, filter, lockboxOwnerUuid) {
2594
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
3484
2595
  while (1) {
3485
2596
  switch (_context9.prev = _context9.next) {
3486
2597
  case 0:
@@ -3492,7 +2603,6 @@ var VaultService = /*#__PURE__*/function () {
3492
2603
  filter: filter
3493
2604
  }
3494
2605
  }));
3495
-
3496
2606
  case 1:
3497
2607
  case "end":
3498
2608
  return _context9.stop();
@@ -3500,11 +2610,9 @@ var VaultService = /*#__PURE__*/function () {
3500
2610
  }
3501
2611
  }, _callee9, this);
3502
2612
  }));
3503
-
3504
2613
  function lockboxMetadataGet(_x21, _x22, _x23, _x24, _x25) {
3505
2614
  return _lockboxMetadataGet.apply(this, arguments);
3506
2615
  }
3507
-
3508
2616
  return lockboxMetadataGet;
3509
2617
  }()
3510
2618
  /**
@@ -3515,12 +2623,11 @@ var VaultService = /*#__PURE__*/function () {
3515
2623
  * @param indexOwnerUuid
3516
2624
  */
3517
2625
  ;
3518
-
3519
2626
  _proto.vaultIndexPut =
3520
2627
  /*#__PURE__*/
3521
2628
  function () {
3522
- var _vaultIndexPut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(entries, indexOwnerUuid) {
3523
- return runtime_1.wrap(function _callee10$(_context10) {
2629
+ var _vaultIndexPut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(entries, indexOwnerUuid) {
2630
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
3524
2631
  while (1) {
3525
2632
  switch (_context10.prev = _context10.next) {
3526
2633
  case 0:
@@ -3529,7 +2636,6 @@ var VaultService = /*#__PURE__*/function () {
3529
2636
  index_owner_uuid: indexOwnerUuid
3530
2637
  }
3531
2638
  }));
3532
-
3533
2639
  case 1:
3534
2640
  case "end":
3535
2641
  return _context10.stop();
@@ -3537,11 +2643,9 @@ var VaultService = /*#__PURE__*/function () {
3537
2643
  }
3538
2644
  }, _callee10, this);
3539
2645
  }));
3540
-
3541
2646
  function vaultIndexPut(_x26, _x27) {
3542
2647
  return _vaultIndexPut.apply(this, arguments);
3543
2648
  }
3544
-
3545
2649
  return vaultIndexPut;
3546
2650
  }()
3547
2651
  /**
@@ -3550,17 +2654,15 @@ var VaultService = /*#__PURE__*/function () {
3550
2654
  * @param entry the encrypted index snapshot
3551
2655
  */
3552
2656
  ;
3553
-
3554
2657
  _proto.vaultIndexSnapshotPut =
3555
2658
  /*#__PURE__*/
3556
2659
  function () {
3557
- var _vaultIndexSnapshotPut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(entry) {
3558
- return runtime_1.wrap(function _callee11$(_context11) {
2660
+ var _vaultIndexSnapshotPut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(entry) {
2661
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
3559
2662
  while (1) {
3560
2663
  switch (_context11.prev = _context11.next) {
3561
2664
  case 0:
3562
2665
  return _context11.abrupt("return", this.api.put(this.baseURL + "/v1/index-snapshot", entry));
3563
-
3564
2666
  case 1:
3565
2667
  case "end":
3566
2668
  return _context11.stop();
@@ -3568,11 +2670,9 @@ var VaultService = /*#__PURE__*/function () {
3568
2670
  }
3569
2671
  }, _callee11, this);
3570
2672
  }));
3571
-
3572
2673
  function vaultIndexSnapshotPut(_x28) {
3573
2674
  return _vaultIndexSnapshotPut.apply(this, arguments);
3574
2675
  }
3575
-
3576
2676
  return vaultIndexSnapshotPut;
3577
2677
  }()
3578
2678
  /**
@@ -3584,12 +2684,11 @@ var VaultService = /*#__PURE__*/function () {
3584
2684
  * @returns the encrypted index
3585
2685
  */
3586
2686
  ;
3587
-
3588
2687
  _proto.vaultIndexGet =
3589
2688
  /*#__PURE__*/
3590
2689
  function () {
3591
- var _vaultIndexGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(indexKeys, identifiers, timestamp) {
3592
- return runtime_1.wrap(function _callee12$(_context12) {
2690
+ var _vaultIndexGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(indexKeys, identifiers, timestamp) {
2691
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
3593
2692
  while (1) {
3594
2693
  switch (_context12.prev = _context12.next) {
3595
2694
  case 0:
@@ -3600,7 +2699,6 @@ var VaultService = /*#__PURE__*/function () {
3600
2699
  timestamp: timestamp
3601
2700
  }
3602
2701
  }));
3603
-
3604
2702
  case 1:
3605
2703
  case "end":
3606
2704
  return _context12.stop();
@@ -3608,14 +2706,11 @@ var VaultService = /*#__PURE__*/function () {
3608
2706
  }
3609
2707
  }, _callee12, this);
3610
2708
  }));
3611
-
3612
2709
  function vaultIndexGet(_x29, _x30, _x31) {
3613
2710
  return _vaultIndexGet.apply(this, arguments);
3614
2711
  }
3615
-
3616
2712
  return vaultIndexGet;
3617
2713
  }();
3618
-
3619
2714
  return VaultService;
3620
2715
  }();
3621
2716
 
@@ -3628,10 +2723,7 @@ var WorkflowService = /*#__PURE__*/function () {
3628
2723
  * This function returns all workflows
3629
2724
  * @returns desired workflow
3630
2725
  */
3631
-
3632
-
3633
2726
  var _proto = WorkflowService.prototype;
3634
-
3635
2727
  _proto.getWorkflows = function getWorkflows() {
3636
2728
  return this.api.get(this.v1Url + "/workflows");
3637
2729
  }
@@ -3642,9 +2734,7 @@ var WorkflowService = /*#__PURE__*/function () {
3642
2734
  * @param locale (optional) The desired locale of the workflow (default: 'en')
3643
2735
  * @param createdAt (optional) The creation date of the workflow (also used for versionning)
3644
2736
  * @returns desired workflow
3645
- */
3646
- ;
3647
-
2737
+ */;
3648
2738
  _proto.getWorkflow = function getWorkflow(id, locale, createdAt) {
3649
2739
  return this.api.get(this.v1Url + "/workflows/" + id, {
3650
2740
  params: {
@@ -3653,7 +2743,6 @@ var WorkflowService = /*#__PURE__*/function () {
3653
2743
  }
3654
2744
  });
3655
2745
  };
3656
-
3657
2746
  return WorkflowService;
3658
2747
  }();
3659
2748
 
@@ -3664,20 +2753,18 @@ var WorkflowService = /*#__PURE__*/function () {
3664
2753
  * @param useLocalStorage (default: true) if true store tokens into local storage (only for browsers)
3665
2754
  * @returns an instance of each services with a provided url
3666
2755
  */
3667
-
3668
2756
  var init = function init(services, authenticationCallback, useLocalStorage) {
3669
2757
  if (useLocalStorage === void 0) {
3670
2758
  useLocalStorage = true;
3671
2759
  }
3672
-
3673
2760
  var tellerBaseURL = services.tellerBaseURL,
3674
- practiceBaseURL = services.practiceBaseURL,
3675
- consultBaseURL = services.consultBaseURL,
3676
- vaultBaseURL = services.vaultBaseURL,
3677
- guardBaseURL = services.guardBaseURL,
3678
- searchBaseURL = services.searchBaseURL,
3679
- workflowBaseURL = services.workflowBaseURL,
3680
- diagnosisBaseURL = services.diagnosisBaseURL;
2761
+ practiceBaseURL = services.practiceBaseURL,
2762
+ consultBaseURL = services.consultBaseURL,
2763
+ vaultBaseURL = services.vaultBaseURL,
2764
+ guardBaseURL = services.guardBaseURL,
2765
+ searchBaseURL = services.searchBaseURL,
2766
+ workflowBaseURL = services.workflowBaseURL,
2767
+ diagnosisBaseURL = services.diagnosisBaseURL;
3681
2768
  var apiService = new APIService(useLocalStorage, undefined, authenticationCallback);
3682
2769
  return {
3683
2770
  apiService: apiService,