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