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