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