oro-sdk-apis 3.2.7 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +21 -0
- package/dist/models/practice.d.ts +4 -0
- package/dist/oro-sdk-apis.cjs.development.js +1453 -530
- 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 +1486 -529
- package/dist/oro-sdk-apis.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/models/practice.ts +4 -0
@@ -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,7 +1677,9 @@ 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
|
-
|
1680
|
+
*/
|
1681
|
+
;
|
1682
|
+
|
1076
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: {
|
@@ -1096,9 +1703,11 @@ var ConsultService = /*#__PURE__*/function () {
|
|
1096
1703
|
if (!resContentRange || typeof resContentRange !== 'string' && typeof resContentRange !== 'number') {
|
1097
1704
|
return 0;
|
1098
1705
|
}
|
1706
|
+
|
1099
1707
|
if (typeof resContentRange === 'number') {
|
1100
1708
|
return resContentRange;
|
1101
1709
|
}
|
1710
|
+
|
1102
1711
|
return parseInt(resContentRange);
|
1103
1712
|
});
|
1104
1713
|
}
|
@@ -1117,7 +1726,9 @@ var ConsultService = /*#__PURE__*/function () {
|
|
1117
1726
|
* @param filterCurrentPractitioner the uuid of the current assistant assigned to filter with
|
1118
1727
|
* @param filterIsoLocality the of isoLocality to filter with
|
1119
1728
|
* @returns a list of consult
|
1120
|
-
|
1729
|
+
*/
|
1730
|
+
;
|
1731
|
+
|
1121
1732
|
_proto.getConsults = function getConsults(uuidPractice, uuidRequester, statusesMedical, statusesExclude, shortId, columnToSortTo, orderToSortTo, perPage, indexPage, filterAssignedDoctor, filterCurrentPractitioner, filterIsoLocality, filterAssignee, uuidParent, typesConsult) {
|
1122
1733
|
return this.api.get(this.baseURL + "/v1/consults", {
|
1123
1734
|
params: {
|
@@ -1139,6 +1750,7 @@ var ConsultService = /*#__PURE__*/function () {
|
|
1139
1750
|
}
|
1140
1751
|
});
|
1141
1752
|
};
|
1753
|
+
|
1142
1754
|
_proto.getConsultByUUID = function getConsultByUUID(uuidConsult, uuidPractice) {
|
1143
1755
|
return this.api.get(this.baseURL + "/v1/consults/" + uuidConsult, {
|
1144
1756
|
params: {
|
@@ -1146,6 +1758,7 @@ var ConsultService = /*#__PURE__*/function () {
|
|
1146
1758
|
}
|
1147
1759
|
});
|
1148
1760
|
};
|
1761
|
+
|
1149
1762
|
_proto.updateConsultByUUID = function updateConsultByUUID(uuidConsult, consult, uuidPractice, uuidRequester) {
|
1150
1763
|
return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult, consult, {
|
1151
1764
|
params: {
|
@@ -1154,6 +1767,7 @@ var ConsultService = /*#__PURE__*/function () {
|
|
1154
1767
|
}
|
1155
1768
|
});
|
1156
1769
|
};
|
1770
|
+
|
1157
1771
|
_proto.getConsultFaxStatuses = function getConsultFaxStatuses(uuidConsult) {
|
1158
1772
|
return this.api.get(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions", {
|
1159
1773
|
params: {
|
@@ -1161,52 +1775,64 @@ var ConsultService = /*#__PURE__*/function () {
|
|
1161
1775
|
}
|
1162
1776
|
});
|
1163
1777
|
};
|
1164
|
-
|
1165
|
-
// numTry ?: number,
|
1778
|
+
|
1779
|
+
_proto.postConsultTransmission = function postConsultTransmission(uuidConsult, nameDriver, addressOrPhoneToSendTo, file, nameReceiver, txtTransmissionTitle, txtTransmissionNotes // numTry ?: number,
|
1166
1780
|
// delay ?: number,
|
1167
1781
|
) {
|
1168
1782
|
if (nameDriver === void 0) {
|
1169
1783
|
nameDriver = 'Documo';
|
1170
1784
|
}
|
1785
|
+
|
1171
1786
|
var data = new FormData();
|
1172
1787
|
data.append('nameDriverReceiver', nameDriver);
|
1788
|
+
|
1173
1789
|
if (addressOrPhoneToSendTo) {
|
1174
1790
|
data.append('addressReceiver', addressOrPhoneToSendTo);
|
1175
1791
|
}
|
1792
|
+
|
1176
1793
|
if (file) {
|
1177
1794
|
data.append('file', file);
|
1178
1795
|
}
|
1796
|
+
|
1179
1797
|
if (nameReceiver) {
|
1180
1798
|
data.append('nameReceiver', nameReceiver);
|
1181
1799
|
}
|
1800
|
+
|
1182
1801
|
if (txtTransmissionTitle) {
|
1183
1802
|
data.append('txtTransmissionTitle', txtTransmissionTitle);
|
1184
1803
|
}
|
1804
|
+
|
1185
1805
|
if (txtTransmissionNotes) {
|
1186
1806
|
data.append('txtTransmissionNotes', txtTransmissionNotes);
|
1187
1807
|
}
|
1808
|
+
|
1188
1809
|
return this.api.post(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions", data, {
|
1189
1810
|
headers: {
|
1190
1811
|
'Content-Type': 'multipart/form-data;'
|
1191
1812
|
}
|
1192
1813
|
});
|
1193
1814
|
};
|
1815
|
+
|
1194
1816
|
_proto.postConsultFax = function postConsultFax(uuidConsult, addressReceiver, file) {
|
1195
1817
|
return this.postConsultTransmission(uuidConsult, 'Documo', addressReceiver, file);
|
1196
1818
|
};
|
1819
|
+
|
1197
1820
|
_proto.postConsultEmail = function postConsultEmail(uuidConsult, file) {
|
1198
1821
|
return this.postConsultTransmission(uuidConsult, 'Pharmacierge', undefined, file);
|
1199
1822
|
};
|
1823
|
+
|
1200
1824
|
_proto.retryConsultFax = function retryConsultFax(uuidConsult, transmissionId) {
|
1201
1825
|
return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions/" + transmissionId, {
|
1202
1826
|
status: exports.TransmissionStatus.Retrying
|
1203
1827
|
});
|
1204
1828
|
};
|
1829
|
+
|
1205
1830
|
_proto.updateConsultTransmissionStatus = function updateConsultTransmissionStatus(transmissionId, uuidConsult, newStatus) {
|
1206
1831
|
return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions/" + transmissionId, {
|
1207
1832
|
status: newStatus
|
1208
1833
|
});
|
1209
1834
|
};
|
1835
|
+
|
1210
1836
|
return ConsultService;
|
1211
1837
|
}();
|
1212
1838
|
|
@@ -1215,7 +1841,9 @@ var DiagnosisService = /*#__PURE__*/function () {
|
|
1215
1841
|
this.api = api;
|
1216
1842
|
this.baseURL = baseURL;
|
1217
1843
|
}
|
1844
|
+
|
1218
1845
|
var _proto = DiagnosisService.prototype;
|
1846
|
+
|
1219
1847
|
_proto.getDiagnoses = function getDiagnoses() {
|
1220
1848
|
return this.api.get(this.baseURL + "/v1/diagnoses");
|
1221
1849
|
}
|
@@ -1223,16 +1851,21 @@ var DiagnosisService = /*#__PURE__*/function () {
|
|
1223
1851
|
* Get a diagnosis by uuid that belongs to your practice
|
1224
1852
|
* @param uuidDiagnosis the uuid of the diagnosis
|
1225
1853
|
* @returns a diagnosis
|
1226
|
-
|
1854
|
+
*/
|
1855
|
+
;
|
1856
|
+
|
1227
1857
|
_proto.getDiagnosisByUuid = function getDiagnosisByUuid(uuidDiagnosis) {
|
1228
1858
|
return this.api.get(this.baseURL + "/v1/diagnoses/" + uuidDiagnosis);
|
1229
1859
|
};
|
1860
|
+
|
1230
1861
|
_proto.createDiagnosis = function createDiagnosis(diagnosis) {
|
1231
1862
|
return this.api.post(this.baseURL + "/v1/diagnoses", diagnosis);
|
1232
1863
|
};
|
1864
|
+
|
1233
1865
|
_proto.updateDiagnosis = function updateDiagnosis(uuid, diagnosis) {
|
1234
1866
|
return this.api.put(this.baseURL + "/v1/diagnoses/" + uuid, diagnosis);
|
1235
1867
|
};
|
1868
|
+
|
1236
1869
|
_proto.getTreatmentsFromDiagnosisUuid = function getTreatmentsFromDiagnosisUuid(diagnosisUuid) {
|
1237
1870
|
return this.api.get(this.baseURL + "/v1/diagnoses/" + diagnosisUuid + "/treatments");
|
1238
1871
|
}
|
@@ -1240,7 +1873,9 @@ var DiagnosisService = /*#__PURE__*/function () {
|
|
1240
1873
|
* This function returns treatment plans associated to a consult
|
1241
1874
|
* @param uuidConsult the consult uuid to fetch
|
1242
1875
|
* @returns an array of TreatmentPlan
|
1243
|
-
|
1876
|
+
*/
|
1877
|
+
;
|
1878
|
+
|
1244
1879
|
_proto.getTreatmentPlansFromConsultUuid = function getTreatmentPlansFromConsultUuid(uuidConsult) {
|
1245
1880
|
return this.api.get(this.baseURL + "/v1/treatment-plans/", {
|
1246
1881
|
params: {
|
@@ -1252,7 +1887,9 @@ var DiagnosisService = /*#__PURE__*/function () {
|
|
1252
1887
|
* creates a new treatment for the specified diagnosis
|
1253
1888
|
* @param diagnosisUuid uuid of the diagnosis that the treatment is linked to
|
1254
1889
|
* @param treatmentRequest the treatment to be inserted
|
1255
|
-
|
1890
|
+
*/
|
1891
|
+
;
|
1892
|
+
|
1256
1893
|
_proto.createTreatment = function createTreatment(diagnosisUuid, treatmentRequest) {
|
1257
1894
|
return this.api.post(this.baseURL + "/v1/diagnoses/" + diagnosisUuid + "/treatments", treatmentRequest);
|
1258
1895
|
}
|
@@ -1260,7 +1897,9 @@ var DiagnosisService = /*#__PURE__*/function () {
|
|
1260
1897
|
* This function returns populated treatment plans associated to a consult
|
1261
1898
|
* @param uuidConsult the consult uuid to fetch
|
1262
1899
|
* @returns a TreatmentPlans object
|
1263
|
-
|
1900
|
+
*/
|
1901
|
+
;
|
1902
|
+
|
1264
1903
|
_proto.getTreatmentPlansPopulatedFromConsultUuid = function getTreatmentPlansPopulatedFromConsultUuid(uuidConsult) {
|
1265
1904
|
return this.api.get(this.baseURL + "/v1/treatment-plans/", {
|
1266
1905
|
params: {
|
@@ -1269,9 +1908,11 @@ var DiagnosisService = /*#__PURE__*/function () {
|
|
1269
1908
|
}
|
1270
1909
|
});
|
1271
1910
|
};
|
1911
|
+
|
1272
1912
|
_proto.postPlans = function postPlans(plans) {
|
1273
1913
|
return this.api.post(this.baseURL + "/v1/treatment-plans", plans);
|
1274
1914
|
};
|
1915
|
+
|
1275
1916
|
_proto.updateTreatmentPlan = function updateTreatmentPlan(uuidPlan, uuidConsult, diagnosisRequest, plan, refill) {
|
1276
1917
|
return this.api.put(this.baseURL + "/v1/treatment-plans/" + uuidPlan, {
|
1277
1918
|
uuidConsult: uuidConsult,
|
@@ -1280,6 +1921,7 @@ var DiagnosisService = /*#__PURE__*/function () {
|
|
1280
1921
|
refill: refill
|
1281
1922
|
});
|
1282
1923
|
};
|
1924
|
+
|
1283
1925
|
_proto.acceptTreatmentPlan = function acceptTreatmentPlan(uuidPlan, uuidConsult) {
|
1284
1926
|
return this.api.put(this.baseURL + "/v1/treatment-plans/" + uuidPlan + "/accept", {
|
1285
1927
|
uuidConsult: uuidConsult
|
@@ -1288,27 +1930,34 @@ var DiagnosisService = /*#__PURE__*/function () {
|
|
1288
1930
|
/**
|
1289
1931
|
* retrieves all the drugs of the specified practice
|
1290
1932
|
* @param uuidPractice
|
1291
|
-
|
1933
|
+
*/
|
1934
|
+
;
|
1935
|
+
|
1292
1936
|
_proto.getAllDrugs =
|
1293
1937
|
/*#__PURE__*/
|
1294
1938
|
function () {
|
1295
|
-
var _getAllDrugs = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
1939
|
+
var _getAllDrugs = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(uuidPractice) {
|
1296
1940
|
var res;
|
1297
|
-
return
|
1941
|
+
return runtime_1.wrap(function _callee$(_context) {
|
1298
1942
|
while (1) {
|
1299
1943
|
switch (_context.prev = _context.next) {
|
1300
1944
|
case 0:
|
1301
1945
|
_context.next = 2;
|
1302
1946
|
return this.api.get(this.baseURL + "/v1/drugs/practice/" + uuidPractice);
|
1947
|
+
|
1303
1948
|
case 2:
|
1304
1949
|
res = _context.sent;
|
1950
|
+
|
1305
1951
|
if (!(res && res.foundDrugs)) {
|
1306
1952
|
_context.next = 5;
|
1307
1953
|
break;
|
1308
1954
|
}
|
1955
|
+
|
1309
1956
|
return _context.abrupt("return", res.foundDrugs);
|
1957
|
+
|
1310
1958
|
case 5:
|
1311
1959
|
return _context.abrupt("return", undefined);
|
1960
|
+
|
1312
1961
|
case 6:
|
1313
1962
|
case "end":
|
1314
1963
|
return _context.stop();
|
@@ -1316,11 +1965,14 @@ var DiagnosisService = /*#__PURE__*/function () {
|
|
1316
1965
|
}
|
1317
1966
|
}, _callee, this);
|
1318
1967
|
}));
|
1968
|
+
|
1319
1969
|
function getAllDrugs(_x) {
|
1320
1970
|
return _getAllDrugs.apply(this, arguments);
|
1321
1971
|
}
|
1972
|
+
|
1322
1973
|
return getAllDrugs;
|
1323
1974
|
}();
|
1975
|
+
|
1324
1976
|
return DiagnosisService;
|
1325
1977
|
}();
|
1326
1978
|
|
@@ -1329,6 +1981,7 @@ var GuardService = /*#__PURE__*/function () {
|
|
1329
1981
|
this.api = api;
|
1330
1982
|
this.baseURL = baseURL;
|
1331
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
|
+
|
1332
1985
|
this.identityCache = {};
|
1333
1986
|
this.whoAmICache = {};
|
1334
1987
|
}
|
@@ -1343,7 +1996,10 @@ var GuardService = /*#__PURE__*/function () {
|
|
1343
1996
|
* ```
|
1344
1997
|
* @param tokens
|
1345
1998
|
*/
|
1999
|
+
|
2000
|
+
|
1346
2001
|
var _proto = GuardService.prototype;
|
2002
|
+
|
1347
2003
|
_proto.setTokens = function setTokens(tokens) {
|
1348
2004
|
this.api.setTokens(_extends({}, this.api.getTokens(), tokens));
|
1349
2005
|
}
|
@@ -1352,13 +2008,16 @@ var GuardService = /*#__PURE__*/function () {
|
|
1352
2008
|
*
|
1353
2009
|
* @param req The credentials required to get an access token
|
1354
2010
|
* @returns AuthTokenResponse
|
1355
|
-
|
2011
|
+
*/
|
2012
|
+
;
|
2013
|
+
|
1356
2014
|
_proto.m2mToken =
|
1357
2015
|
/*#__PURE__*/
|
1358
2016
|
function () {
|
1359
|
-
var _m2mToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2017
|
+
var _m2mToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(req) {
|
1360
2018
|
var resp, config, _e$response, code;
|
1361
|
-
|
2019
|
+
|
2020
|
+
return runtime_1.wrap(function _callee$(_context) {
|
1362
2021
|
while (1) {
|
1363
2022
|
switch (_context.prev = _context.next) {
|
1364
2023
|
case 0:
|
@@ -1368,6 +2027,7 @@ var GuardService = /*#__PURE__*/function () {
|
|
1368
2027
|
};
|
1369
2028
|
_context.next = 4;
|
1370
2029
|
return this.api.post(this.baseURL + "/v1/m2m/token", req, config);
|
2030
|
+
|
1371
2031
|
case 4:
|
1372
2032
|
resp = _context.sent;
|
1373
2033
|
this.api.setTokens({
|
@@ -1375,28 +2035,37 @@ var GuardService = /*#__PURE__*/function () {
|
|
1375
2035
|
});
|
1376
2036
|
_context.next = 20;
|
1377
2037
|
break;
|
2038
|
+
|
1378
2039
|
case 8:
|
1379
2040
|
_context.prev = 8;
|
1380
2041
|
_context.t0 = _context["catch"](0);
|
1381
2042
|
console.error('Error while posting m2m token:', _context.t0);
|
2043
|
+
|
1382
2044
|
if (!_context.t0.isAxiosError) {
|
1383
2045
|
_context.next = 19;
|
1384
2046
|
break;
|
1385
2047
|
}
|
2048
|
+
|
1386
2049
|
code = (_e$response = _context.t0.response) == null ? void 0 : _e$response.status;
|
1387
2050
|
_context.t1 = code;
|
1388
2051
|
_context.next = _context.t1 === 400 ? 16 : _context.t1 === 500 ? 17 : _context.t1 === 401 ? 18 : 18;
|
1389
2052
|
break;
|
2053
|
+
|
1390
2054
|
case 16:
|
1391
2055
|
throw new AuthenticationBadRequest();
|
2056
|
+
|
1392
2057
|
case 17:
|
1393
2058
|
throw new AuthenticationServerError();
|
2059
|
+
|
1394
2060
|
case 18:
|
1395
2061
|
throw new AuthenticationFailed();
|
2062
|
+
|
1396
2063
|
case 19:
|
1397
2064
|
throw new AuthenticationFailed();
|
2065
|
+
|
1398
2066
|
case 20:
|
1399
2067
|
return _context.abrupt("return", resp);
|
2068
|
+
|
1400
2069
|
case 21:
|
1401
2070
|
case "end":
|
1402
2071
|
return _context.stop();
|
@@ -1404,23 +2073,29 @@ var GuardService = /*#__PURE__*/function () {
|
|
1404
2073
|
}
|
1405
2074
|
}, _callee, this, [[0, 8]]);
|
1406
2075
|
}));
|
2076
|
+
|
1407
2077
|
function m2mToken(_x) {
|
1408
2078
|
return _m2mToken.apply(this, arguments);
|
1409
2079
|
}
|
2080
|
+
|
1410
2081
|
return m2mToken;
|
1411
|
-
}()
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
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
|
+
|
1418
2092
|
_proto.authToken =
|
1419
2093
|
/*#__PURE__*/
|
1420
2094
|
function () {
|
1421
|
-
var _authToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2095
|
+
var _authToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(req) {
|
1422
2096
|
var resp, config, _e$response2, code;
|
1423
|
-
|
2097
|
+
|
2098
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
1424
2099
|
while (1) {
|
1425
2100
|
switch (_context2.prev = _context2.next) {
|
1426
2101
|
case 0:
|
@@ -1430,6 +2105,7 @@ var GuardService = /*#__PURE__*/function () {
|
|
1430
2105
|
};
|
1431
2106
|
_context2.next = 4;
|
1432
2107
|
return this.api.post(this.baseURL + "/v1/auth/token", req, config);
|
2108
|
+
|
1433
2109
|
case 4:
|
1434
2110
|
resp = _context2.sent;
|
1435
2111
|
this.api.setTokens({
|
@@ -1438,30 +2114,40 @@ var GuardService = /*#__PURE__*/function () {
|
|
1438
2114
|
});
|
1439
2115
|
_context2.next = 21;
|
1440
2116
|
break;
|
2117
|
+
|
1441
2118
|
case 8:
|
1442
2119
|
_context2.prev = 8;
|
1443
2120
|
_context2.t0 = _context2["catch"](0);
|
1444
2121
|
console.error('Error while posting auth token:', _context2.t0);
|
2122
|
+
|
1445
2123
|
if (!_context2.t0.isAxiosError) {
|
1446
2124
|
_context2.next = 20;
|
1447
2125
|
break;
|
1448
2126
|
}
|
2127
|
+
|
1449
2128
|
code = (_e$response2 = _context2.t0.response) == null ? void 0 : _e$response2.status;
|
1450
2129
|
_context2.t1 = code;
|
1451
2130
|
_context2.next = _context2.t1 === 400 ? 16 : _context2.t1 === 424 ? 17 : _context2.t1 === 500 ? 18 : _context2.t1 === 401 ? 19 : 19;
|
1452
2131
|
break;
|
2132
|
+
|
1453
2133
|
case 16:
|
1454
2134
|
throw new AuthenticationBadRequest();
|
2135
|
+
|
1455
2136
|
case 17:
|
1456
2137
|
throw new AuthenticationUnconfirmedEmail();
|
2138
|
+
|
1457
2139
|
case 18:
|
1458
2140
|
throw new AuthenticationServerError();
|
2141
|
+
|
1459
2142
|
case 19:
|
1460
2143
|
throw new AuthenticationFailed();
|
2144
|
+
|
1461
2145
|
case 20:
|
1462
2146
|
throw new AuthenticationFailed();
|
2147
|
+
|
1463
2148
|
case 21:
|
1464
2149
|
return _context2.abrupt("return", resp);
|
2150
|
+
|
1465
2151
|
case 22:
|
1466
2152
|
case "end":
|
1467
2153
|
return _context2.stop();
|
@@ -1469,21 +2155,26 @@ var GuardService = /*#__PURE__*/function () {
|
|
1469
2155
|
}
|
1470
2156
|
}, _callee2, this, [[0, 8]]);
|
1471
2157
|
}));
|
2158
|
+
|
1472
2159
|
function authToken(_x2) {
|
1473
2160
|
return _authToken.apply(this, arguments);
|
1474
2161
|
}
|
2162
|
+
|
1475
2163
|
return authToken;
|
1476
|
-
}()
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
2164
|
+
}()
|
2165
|
+
/**
|
2166
|
+
* Get new access and refresh token
|
2167
|
+
*
|
2168
|
+
* @returns AuthTokenResponse
|
2169
|
+
*/
|
2170
|
+
;
|
2171
|
+
|
1481
2172
|
_proto.authRefresh =
|
1482
2173
|
/*#__PURE__*/
|
1483
2174
|
function () {
|
1484
|
-
var _authRefresh = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2175
|
+
var _authRefresh = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(refreshToken) {
|
1485
2176
|
var config;
|
1486
|
-
return
|
2177
|
+
return runtime_1.wrap(function _callee3$(_context3) {
|
1487
2178
|
while (1) {
|
1488
2179
|
switch (_context3.prev = _context3.next) {
|
1489
2180
|
case 0:
|
@@ -1492,6 +2183,7 @@ var GuardService = /*#__PURE__*/function () {
|
|
1492
2183
|
useRefreshToken: true
|
1493
2184
|
};
|
1494
2185
|
return _context3.abrupt("return", this.api.put(this.baseURL + "/v1/auth/token", null, config));
|
2186
|
+
|
1495
2187
|
case 2:
|
1496
2188
|
case "end":
|
1497
2189
|
return _context3.stop();
|
@@ -1499,24 +2191,30 @@ var GuardService = /*#__PURE__*/function () {
|
|
1499
2191
|
}
|
1500
2192
|
}, _callee3, this);
|
1501
2193
|
}));
|
2194
|
+
|
1502
2195
|
function authRefresh(_x3) {
|
1503
2196
|
return _authRefresh.apply(this, arguments);
|
1504
2197
|
}
|
2198
|
+
|
1505
2199
|
return authRefresh;
|
1506
|
-
}()
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
2200
|
+
}()
|
2201
|
+
/**
|
2202
|
+
* Call guard to overwrite existing refresh token cookie
|
2203
|
+
*
|
2204
|
+
* @returns void
|
2205
|
+
*/
|
2206
|
+
;
|
2207
|
+
|
1511
2208
|
_proto.authLogout =
|
1512
2209
|
/*#__PURE__*/
|
1513
2210
|
function () {
|
1514
|
-
var _authLogout = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
1515
|
-
return
|
2211
|
+
var _authLogout = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4() {
|
2212
|
+
return runtime_1.wrap(function _callee4$(_context4) {
|
1516
2213
|
while (1) {
|
1517
2214
|
switch (_context4.prev = _context4.next) {
|
1518
2215
|
case 0:
|
1519
2216
|
return _context4.abrupt("return", this.api.get(this.baseURL + "/v1/auth/logout"));
|
2217
|
+
|
1520
2218
|
case 1:
|
1521
2219
|
case "end":
|
1522
2220
|
return _context4.stop();
|
@@ -1524,25 +2222,31 @@ var GuardService = /*#__PURE__*/function () {
|
|
1524
2222
|
}
|
1525
2223
|
}, _callee4, this);
|
1526
2224
|
}));
|
2225
|
+
|
1527
2226
|
function authLogout() {
|
1528
2227
|
return _authLogout.apply(this, arguments);
|
1529
2228
|
}
|
2229
|
+
|
1530
2230
|
return authLogout;
|
1531
|
-
}()
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
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
|
+
|
1537
2240
|
_proto.authRecover =
|
1538
2241
|
/*#__PURE__*/
|
1539
2242
|
function () {
|
1540
|
-
var _authRecover = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
1541
|
-
return
|
2243
|
+
var _authRecover = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(req) {
|
2244
|
+
return runtime_1.wrap(function _callee5$(_context5) {
|
1542
2245
|
while (1) {
|
1543
2246
|
switch (_context5.prev = _context5.next) {
|
1544
2247
|
case 0:
|
1545
2248
|
return _context5.abrupt("return", this.api.post(this.baseURL + "/v1/auth/recover", req));
|
2249
|
+
|
1546
2250
|
case 1:
|
1547
2251
|
case "end":
|
1548
2252
|
return _context5.stop();
|
@@ -1550,29 +2254,36 @@ var GuardService = /*#__PURE__*/function () {
|
|
1550
2254
|
}
|
1551
2255
|
}, _callee5, this);
|
1552
2256
|
}));
|
2257
|
+
|
1553
2258
|
function authRecover(_x4) {
|
1554
2259
|
return _authRecover.apply(this, arguments);
|
1555
2260
|
}
|
2261
|
+
|
1556
2262
|
return authRecover;
|
1557
|
-
}()
|
1558
|
-
|
1559
|
-
|
1560
|
-
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
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
|
+
|
1564
2273
|
_proto.identityCreate =
|
1565
2274
|
/*#__PURE__*/
|
1566
2275
|
function () {
|
1567
|
-
var _identityCreate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2276
|
+
var _identityCreate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(req) {
|
1568
2277
|
var resp, _e$response3, code;
|
1569
|
-
|
2278
|
+
|
2279
|
+
return runtime_1.wrap(function _callee6$(_context6) {
|
1570
2280
|
while (1) {
|
1571
2281
|
switch (_context6.prev = _context6.next) {
|
1572
2282
|
case 0:
|
1573
2283
|
_context6.prev = 0;
|
1574
2284
|
_context6.next = 3;
|
1575
2285
|
return this.api.post(this.baseURL + "/v1/identities", req);
|
2286
|
+
|
1576
2287
|
case 3:
|
1577
2288
|
resp = _context6.sent;
|
1578
2289
|
this.api.setTokens({
|
@@ -1580,27 +2291,36 @@ var GuardService = /*#__PURE__*/function () {
|
|
1580
2291
|
});
|
1581
2292
|
_context6.next = 18;
|
1582
2293
|
break;
|
2294
|
+
|
1583
2295
|
case 7:
|
1584
2296
|
_context6.prev = 7;
|
1585
2297
|
_context6.t0 = _context6["catch"](0);
|
2298
|
+
|
1586
2299
|
if (!_context6.t0.isAxiosError) {
|
1587
2300
|
_context6.next = 17;
|
1588
2301
|
break;
|
1589
2302
|
}
|
2303
|
+
|
1590
2304
|
code = (_e$response3 = _context6.t0.response) == null ? void 0 : _e$response3.status;
|
1591
2305
|
_context6.t1 = code;
|
1592
2306
|
_context6.next = _context6.t1 === 400 ? 14 : _context6.t1 === 409 ? 15 : _context6.t1 === 500 ? 16 : 16;
|
1593
2307
|
break;
|
2308
|
+
|
1594
2309
|
case 14:
|
1595
2310
|
throw new IdentityCreationBadRequest();
|
2311
|
+
|
1596
2312
|
case 15:
|
1597
2313
|
throw new IdentityCreationConflict();
|
2314
|
+
|
1598
2315
|
case 16:
|
1599
2316
|
throw new IdentityCreationFailed();
|
2317
|
+
|
1600
2318
|
case 17:
|
1601
2319
|
throw new IdentityCreationFailed();
|
2320
|
+
|
1602
2321
|
case 18:
|
1603
2322
|
return _context6.abrupt("return", resp);
|
2323
|
+
|
1604
2324
|
case 19:
|
1605
2325
|
case "end":
|
1606
2326
|
return _context6.stop();
|
@@ -1608,50 +2328,65 @@ var GuardService = /*#__PURE__*/function () {
|
|
1608
2328
|
}
|
1609
2329
|
}, _callee6, this, [[0, 7]]);
|
1610
2330
|
}));
|
2331
|
+
|
1611
2332
|
function identityCreate(_x5) {
|
1612
2333
|
return _identityCreate.apply(this, arguments);
|
1613
2334
|
}
|
2335
|
+
|
1614
2336
|
return identityCreate;
|
1615
|
-
}()
|
1616
|
-
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
|
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
|
+
|
1623
2348
|
_proto.identityGet =
|
1624
2349
|
/*#__PURE__*/
|
1625
2350
|
function () {
|
1626
|
-
var _identityGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2351
|
+
var _identityGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(identityID, skipCache) {
|
1627
2352
|
var _tokens$accessToken, _tokens$refreshToken;
|
2353
|
+
|
1628
2354
|
var tokens, cacheKey, identity;
|
1629
|
-
return
|
2355
|
+
return runtime_1.wrap(function _callee7$(_context7) {
|
1630
2356
|
while (1) {
|
1631
2357
|
switch (_context7.prev = _context7.next) {
|
1632
2358
|
case 0:
|
1633
2359
|
if (skipCache === void 0) {
|
1634
2360
|
skipCache = false;
|
1635
2361
|
}
|
2362
|
+
|
1636
2363
|
tokens = this.api.getTokens();
|
1637
2364
|
cacheKey = ((_tokens$accessToken = tokens.accessToken) != null ? _tokens$accessToken : '') + ((_tokens$refreshToken = tokens.refreshToken) != null ? _tokens$refreshToken : '') + identityID;
|
2365
|
+
|
1638
2366
|
if (!(skipCache || !tokens.accessToken || !this.identityCache[cacheKey])) {
|
1639
2367
|
_context7.next = 10;
|
1640
2368
|
break;
|
1641
2369
|
}
|
2370
|
+
|
1642
2371
|
_context7.next = 6;
|
1643
2372
|
return this.api.get(this.baseURL + "/v1/identities/" + identityID);
|
2373
|
+
|
1644
2374
|
case 6:
|
1645
2375
|
identity = _context7.sent;
|
2376
|
+
|
1646
2377
|
if (!skipCache) {
|
1647
2378
|
_context7.next = 9;
|
1648
2379
|
break;
|
1649
2380
|
}
|
2381
|
+
|
1650
2382
|
return _context7.abrupt("return", identity);
|
2383
|
+
|
1651
2384
|
case 9:
|
1652
2385
|
this.identityCache[cacheKey] = identity;
|
2386
|
+
|
1653
2387
|
case 10:
|
1654
2388
|
return _context7.abrupt("return", this.identityCache[cacheKey]);
|
2389
|
+
|
1655
2390
|
case 11:
|
1656
2391
|
case "end":
|
1657
2392
|
return _context7.stop();
|
@@ -1659,40 +2394,52 @@ var GuardService = /*#__PURE__*/function () {
|
|
1659
2394
|
}
|
1660
2395
|
}, _callee7, this);
|
1661
2396
|
}));
|
2397
|
+
|
1662
2398
|
function identityGet(_x6, _x7) {
|
1663
2399
|
return _identityGet.apply(this, arguments);
|
1664
2400
|
}
|
2401
|
+
|
1665
2402
|
return identityGet;
|
1666
|
-
}()
|
1667
|
-
|
1668
|
-
|
1669
|
-
|
1670
|
-
|
1671
|
-
|
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
|
+
|
1672
2412
|
_proto.whoAmI =
|
1673
2413
|
/*#__PURE__*/
|
1674
2414
|
function () {
|
1675
|
-
var _whoAmI = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2415
|
+
var _whoAmI = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(refreshCache) {
|
1676
2416
|
var _this$api$getTokens$a;
|
2417
|
+
|
1677
2418
|
var cacheKey;
|
1678
|
-
return
|
2419
|
+
return runtime_1.wrap(function _callee8$(_context8) {
|
1679
2420
|
while (1) {
|
1680
2421
|
switch (_context8.prev = _context8.next) {
|
1681
2422
|
case 0:
|
1682
2423
|
if (refreshCache === void 0) {
|
1683
2424
|
refreshCache = false;
|
1684
2425
|
}
|
2426
|
+
|
1685
2427
|
cacheKey = (_this$api$getTokens$a = this.api.getTokens().accessToken) != null ? _this$api$getTokens$a : '';
|
2428
|
+
|
1686
2429
|
if (!(!this.whoAmICache[cacheKey] || refreshCache)) {
|
1687
2430
|
_context8.next = 6;
|
1688
2431
|
break;
|
1689
2432
|
}
|
2433
|
+
|
1690
2434
|
_context8.next = 5;
|
1691
2435
|
return this.api.get(this.baseURL + "/v1/auth/whoami");
|
2436
|
+
|
1692
2437
|
case 5:
|
1693
2438
|
this.whoAmICache[cacheKey] = _context8.sent;
|
2439
|
+
|
1694
2440
|
case 6:
|
1695
2441
|
return _context8.abrupt("return", this.whoAmICache[cacheKey]);
|
2442
|
+
|
1696
2443
|
case 7:
|
1697
2444
|
case "end":
|
1698
2445
|
return _context8.stop();
|
@@ -1700,26 +2447,32 @@ var GuardService = /*#__PURE__*/function () {
|
|
1700
2447
|
}
|
1701
2448
|
}, _callee8, this);
|
1702
2449
|
}));
|
2450
|
+
|
1703
2451
|
function whoAmI(_x8) {
|
1704
2452
|
return _whoAmI.apply(this, arguments);
|
1705
2453
|
}
|
2454
|
+
|
1706
2455
|
return whoAmI;
|
1707
|
-
}()
|
1708
|
-
|
1709
|
-
|
1710
|
-
|
1711
|
-
|
1712
|
-
|
1713
|
-
|
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
|
+
|
1714
2466
|
_proto.identityUpdate =
|
1715
2467
|
/*#__PURE__*/
|
1716
2468
|
function () {
|
1717
|
-
var _identityUpdate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
1718
|
-
return
|
2469
|
+
var _identityUpdate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(identityID, req) {
|
2470
|
+
return runtime_1.wrap(function _callee9$(_context9) {
|
1719
2471
|
while (1) {
|
1720
2472
|
switch (_context9.prev = _context9.next) {
|
1721
2473
|
case 0:
|
1722
2474
|
return _context9.abrupt("return", this.api.put(this.baseURL + "/v1/identities/" + identityID, req));
|
2475
|
+
|
1723
2476
|
case 1:
|
1724
2477
|
case "end":
|
1725
2478
|
return _context9.stop();
|
@@ -1727,24 +2480,29 @@ var GuardService = /*#__PURE__*/function () {
|
|
1727
2480
|
}
|
1728
2481
|
}, _callee9, this);
|
1729
2482
|
}));
|
2483
|
+
|
1730
2484
|
function identityUpdate(_x9, _x10) {
|
1731
2485
|
return _identityUpdate.apply(this, arguments);
|
1732
2486
|
}
|
2487
|
+
|
1733
2488
|
return identityUpdate;
|
1734
|
-
}()
|
1735
|
-
|
1736
|
-
|
1737
|
-
|
1738
|
-
|
1739
|
-
|
1740
|
-
|
1741
|
-
|
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
|
+
|
1742
2500
|
_proto.identityMFAQRCode =
|
1743
2501
|
/*#__PURE__*/
|
1744
2502
|
function () {
|
1745
|
-
var _identityMFAQRCode = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2503
|
+
var _identityMFAQRCode = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(identityID, password) {
|
1746
2504
|
var req;
|
1747
|
-
return
|
2505
|
+
return runtime_1.wrap(function _callee10$(_context10) {
|
1748
2506
|
while (1) {
|
1749
2507
|
switch (_context10.prev = _context10.next) {
|
1750
2508
|
case 0:
|
@@ -1756,6 +2514,7 @@ var GuardService = /*#__PURE__*/function () {
|
|
1756
2514
|
Accept: 'application/json'
|
1757
2515
|
}
|
1758
2516
|
}));
|
2517
|
+
|
1759
2518
|
case 2:
|
1760
2519
|
case "end":
|
1761
2520
|
return _context10.stop();
|
@@ -1763,25 +2522,31 @@ var GuardService = /*#__PURE__*/function () {
|
|
1763
2522
|
}
|
1764
2523
|
}, _callee10, this);
|
1765
2524
|
}));
|
2525
|
+
|
1766
2526
|
function identityMFAQRCode(_x11, _x12) {
|
1767
2527
|
return _identityMFAQRCode.apply(this, arguments);
|
1768
2528
|
}
|
2529
|
+
|
1769
2530
|
return identityMFAQRCode;
|
1770
|
-
}()
|
1771
|
-
|
1772
|
-
|
1773
|
-
|
1774
|
-
|
1775
|
-
|
2531
|
+
}()
|
2532
|
+
/**
|
2533
|
+
* Attempt to resend the email confirmation email
|
2534
|
+
*
|
2535
|
+
* @param req IdentityResendConfirmEmailRequest
|
2536
|
+
* @return void
|
2537
|
+
*/
|
2538
|
+
;
|
2539
|
+
|
1776
2540
|
_proto.identitySendConfirmEmail =
|
1777
2541
|
/*#__PURE__*/
|
1778
2542
|
function () {
|
1779
|
-
var _identitySendConfirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
1780
|
-
return
|
2543
|
+
var _identitySendConfirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(req) {
|
2544
|
+
return runtime_1.wrap(function _callee11$(_context11) {
|
1781
2545
|
while (1) {
|
1782
2546
|
switch (_context11.prev = _context11.next) {
|
1783
2547
|
case 0:
|
1784
2548
|
return _context11.abrupt("return", this.api.post(this.baseURL + "/v1/identity/confirm", req));
|
2549
|
+
|
1785
2550
|
case 1:
|
1786
2551
|
case "end":
|
1787
2552
|
return _context11.stop();
|
@@ -1789,25 +2554,31 @@ var GuardService = /*#__PURE__*/function () {
|
|
1789
2554
|
}
|
1790
2555
|
}, _callee11, this);
|
1791
2556
|
}));
|
2557
|
+
|
1792
2558
|
function identitySendConfirmEmail(_x13) {
|
1793
2559
|
return _identitySendConfirmEmail.apply(this, arguments);
|
1794
2560
|
}
|
2561
|
+
|
1795
2562
|
return identitySendConfirmEmail;
|
1796
|
-
}()
|
1797
|
-
|
1798
|
-
|
1799
|
-
|
1800
|
-
|
1801
|
-
|
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
|
+
|
1802
2572
|
_proto.identityGetByCustomerEmail =
|
1803
2573
|
/*#__PURE__*/
|
1804
2574
|
function () {
|
1805
|
-
var _identityGetByCustomerEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
1806
|
-
return
|
2575
|
+
var _identityGetByCustomerEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(email) {
|
2576
|
+
return runtime_1.wrap(function _callee12$(_context12) {
|
1807
2577
|
while (1) {
|
1808
2578
|
switch (_context12.prev = _context12.next) {
|
1809
2579
|
case 0:
|
1810
2580
|
return _context12.abrupt("return", this.identityGetByHash(email.substring(email.indexOf('+') + 1, email.indexOf('@'))));
|
2581
|
+
|
1811
2582
|
case 1:
|
1812
2583
|
case "end":
|
1813
2584
|
return _context12.stop();
|
@@ -1815,25 +2586,31 @@ var GuardService = /*#__PURE__*/function () {
|
|
1815
2586
|
}
|
1816
2587
|
}, _callee12, this);
|
1817
2588
|
}));
|
2589
|
+
|
1818
2590
|
function identityGetByCustomerEmail(_x14) {
|
1819
2591
|
return _identityGetByCustomerEmail.apply(this, arguments);
|
1820
2592
|
}
|
2593
|
+
|
1821
2594
|
return identityGetByCustomerEmail;
|
1822
|
-
}()
|
1823
|
-
|
1824
|
-
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
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
|
+
|
1828
2604
|
_proto.identityGetByHash =
|
1829
2605
|
/*#__PURE__*/
|
1830
2606
|
function () {
|
1831
|
-
var _identityGetByHash = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
1832
|
-
return
|
2607
|
+
var _identityGetByHash = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee13(b64Hash) {
|
2608
|
+
return runtime_1.wrap(function _callee13$(_context13) {
|
1833
2609
|
while (1) {
|
1834
2610
|
switch (_context13.prev = _context13.next) {
|
1835
2611
|
case 0:
|
1836
2612
|
return _context13.abrupt("return", this.identityGet(b64Hash.replace(/\+/g, '-').replace(/\//g, '_')));
|
2613
|
+
|
1837
2614
|
case 1:
|
1838
2615
|
case "end":
|
1839
2616
|
return _context13.stop();
|
@@ -1841,11 +2618,14 @@ var GuardService = /*#__PURE__*/function () {
|
|
1841
2618
|
}
|
1842
2619
|
}, _callee13, this);
|
1843
2620
|
}));
|
2621
|
+
|
1844
2622
|
function identityGetByHash(_x15) {
|
1845
2623
|
return _identityGetByHash.apply(this, arguments);
|
1846
2624
|
}
|
2625
|
+
|
1847
2626
|
return identityGetByHash;
|
1848
2627
|
}();
|
2628
|
+
|
1849
2629
|
return GuardService;
|
1850
2630
|
}();
|
1851
2631
|
|
@@ -1859,7 +2639,10 @@ var SearchService = /*#__PURE__*/function () {
|
|
1859
2639
|
* @param consultUUID
|
1860
2640
|
* @param terms the search terms to be indexed
|
1861
2641
|
*/
|
2642
|
+
|
2643
|
+
|
1862
2644
|
var _proto = SearchService.prototype;
|
2645
|
+
|
1863
2646
|
_proto.index = function index(consultUUID, terms) {
|
1864
2647
|
return this.api.post(this.baseURL + "/v1/index", {
|
1865
2648
|
consultUUID: consultUUID,
|
@@ -1869,12 +2652,15 @@ var SearchService = /*#__PURE__*/function () {
|
|
1869
2652
|
/**
|
1870
2653
|
* Searches for the consultations corresponding to the search terms entered in the query
|
1871
2654
|
* @param terms array of search terms
|
1872
|
-
|
2655
|
+
*/
|
2656
|
+
;
|
2657
|
+
|
1873
2658
|
_proto.search = function search(terms) {
|
1874
2659
|
return this.api.post(this.baseURL + "/v1/search", {
|
1875
2660
|
terms: terms
|
1876
2661
|
});
|
1877
2662
|
};
|
2663
|
+
|
1878
2664
|
return SearchService;
|
1879
2665
|
}();
|
1880
2666
|
|
@@ -1891,7 +2677,10 @@ var PracticeService = /*#__PURE__*/function () {
|
|
1891
2677
|
* @param accounts (optional) if set true it the Practice field accounts will be set
|
1892
2678
|
* @returns the found practice or undefined
|
1893
2679
|
*/
|
2680
|
+
|
2681
|
+
|
1894
2682
|
var _proto = PracticeService.prototype;
|
2683
|
+
|
1895
2684
|
_proto.practiceGetFromURL = function practiceGetFromURL(practiceURL, params) {
|
1896
2685
|
return this.api.get(this.baseURL + "/v1/practices", {
|
1897
2686
|
params: _extends({
|
@@ -1899,6 +2688,7 @@ var PracticeService = /*#__PURE__*/function () {
|
|
1899
2688
|
}, params)
|
1900
2689
|
});
|
1901
2690
|
};
|
2691
|
+
|
1902
2692
|
_proto.practiceGetFromUuid = function practiceGetFromUuid(practiceUuid, locale, withAccounts) {
|
1903
2693
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid, {
|
1904
2694
|
params: {
|
@@ -1906,13 +2696,15 @@ var PracticeService = /*#__PURE__*/function () {
|
|
1906
2696
|
accounts: withAccounts
|
1907
2697
|
}
|
1908
2698
|
});
|
1909
|
-
}
|
1910
|
-
|
2699
|
+
} /// Practice Configs
|
2700
|
+
|
1911
2701
|
/**
|
1912
2702
|
* This function retrieves all configs of a specific practice
|
1913
2703
|
* @param practiceUuid uuid of the practice
|
1914
2704
|
* @returns the practice configs
|
1915
|
-
|
2705
|
+
*/
|
2706
|
+
;
|
2707
|
+
|
1916
2708
|
_proto.practiceConfigGetFromPracticeUuid = function practiceConfigGetFromPracticeUuid(practiceUuid) {
|
1917
2709
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/configs");
|
1918
2710
|
}
|
@@ -1921,7 +2713,9 @@ var PracticeService = /*#__PURE__*/function () {
|
|
1921
2713
|
* @param practiceUuid uuid of the practice
|
1922
2714
|
* @param kind of the config
|
1923
2715
|
* @returns the practice config
|
1924
|
-
|
2716
|
+
*/
|
2717
|
+
;
|
2718
|
+
|
1925
2719
|
_proto.practiceConfigGetByKindForPracticeUuid = function practiceConfigGetByKindForPracticeUuid(practiceUuid, kind) {
|
1926
2720
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/configs/" + kind);
|
1927
2721
|
}
|
@@ -1930,7 +2724,9 @@ var PracticeService = /*#__PURE__*/function () {
|
|
1930
2724
|
* @param practiceUuid uuid of the practice
|
1931
2725
|
* @param config the config to add to the practice
|
1932
2726
|
* @returns the created practice config
|
1933
|
-
|
2727
|
+
*/
|
2728
|
+
;
|
2729
|
+
|
1934
2730
|
_proto.practiceConfigCreateForPracticeUuid = function practiceConfigCreateForPracticeUuid(practiceUuid, config) {
|
1935
2731
|
return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/configs", config);
|
1936
2732
|
}
|
@@ -1939,15 +2735,18 @@ var PracticeService = /*#__PURE__*/function () {
|
|
1939
2735
|
* @param practiceUuid uuid of the practice
|
1940
2736
|
* @param config the config to update
|
1941
2737
|
* @returns the practice config
|
1942
|
-
|
2738
|
+
*/
|
2739
|
+
;
|
2740
|
+
|
1943
2741
|
_proto.practiceConfigUpdate = function practiceConfigUpdate(config) {
|
1944
2742
|
return this.api.put(this.baseURL + "/v1/practices/" + config.uuidPractice + "/configs/" + config.kind, config);
|
1945
|
-
}
|
1946
|
-
/// Accounts
|
2743
|
+
} /// Accounts
|
1947
2744
|
;
|
2745
|
+
|
1948
2746
|
_proto.practiceGetAccounts = function practiceGetAccounts(practiceUuid) {
|
1949
2747
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/accounts");
|
1950
2748
|
};
|
2749
|
+
|
1951
2750
|
_proto.practiceGetAccount = function practiceGetAccount(practiceUuid, accountUuid) {
|
1952
2751
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/accounts/" + accountUuid);
|
1953
2752
|
}
|
@@ -1956,7 +2755,9 @@ var PracticeService = /*#__PURE__*/function () {
|
|
1956
2755
|
* @param practiceUuid the uuid of the practice
|
1957
2756
|
* @param kind (optional) the kind of WorkflowType to filter in
|
1958
2757
|
* @returns a list of PracticeWorkflow
|
1959
|
-
|
2758
|
+
*/
|
2759
|
+
;
|
2760
|
+
|
1960
2761
|
_proto.practiceGetWorkflows = function practiceGetWorkflows(practiceUuid, kind) {
|
1961
2762
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/workflows", {
|
1962
2763
|
params: {
|
@@ -1964,11 +2765,12 @@ var PracticeService = /*#__PURE__*/function () {
|
|
1964
2765
|
}
|
1965
2766
|
});
|
1966
2767
|
};
|
2768
|
+
|
1967
2769
|
_proto.practiceGetWorkflow = function practiceGetWorkflow(practiceUuid, workflowType) {
|
1968
2770
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/workflows/" + workflowType);
|
1969
|
-
}
|
1970
|
-
/// Plans
|
2771
|
+
} /// Plans
|
1971
2772
|
;
|
2773
|
+
|
1972
2774
|
_proto.practiceGetPlans = function practiceGetPlans(practiceUuid, planType) {
|
1973
2775
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/plans", {
|
1974
2776
|
params: {
|
@@ -1976,14 +2778,16 @@ var PracticeService = /*#__PURE__*/function () {
|
|
1976
2778
|
}
|
1977
2779
|
});
|
1978
2780
|
};
|
2781
|
+
|
1979
2782
|
_proto.practiceGetPlan = function practiceGetPlan(practiceUuid, planId) {
|
1980
2783
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/plans/" + planId);
|
1981
2784
|
};
|
2785
|
+
|
1982
2786
|
_proto.practiceGetPlanPrices = function practiceGetPlanPrices(practiceUuid, planId) {
|
1983
2787
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/plans/" + planId + "/prices");
|
1984
|
-
}
|
1985
|
-
// Payments
|
2788
|
+
} // Payments
|
1986
2789
|
;
|
2790
|
+
|
1987
2791
|
_proto.practiceGetPayments = function practiceGetPayments(practiceUuid, statusPayment, withConsultUUIDNULL, perPage, indexPage) {
|
1988
2792
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments", {
|
1989
2793
|
params: {
|
@@ -1994,14 +2798,16 @@ var PracticeService = /*#__PURE__*/function () {
|
|
1994
2798
|
}
|
1995
2799
|
});
|
1996
2800
|
};
|
2801
|
+
|
1997
2802
|
_proto.practiceGetPayment = function practiceGetPayment(practiceUuid, idStripeInvoiceOrPaymentIntent) {
|
1998
2803
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/" + idStripeInvoiceOrPaymentIntent);
|
1999
2804
|
};
|
2805
|
+
|
2000
2806
|
_proto.practiceGetPaymentForStripePaymentIntentWithID = function practiceGetPaymentForStripePaymentIntentWithID(practiceUuid, stripePaymentIntentId) {
|
2001
2807
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/" + stripePaymentIntentId);
|
2002
|
-
}
|
2003
|
-
// Payments Intent
|
2808
|
+
} // Payments Intent
|
2004
2809
|
;
|
2810
|
+
|
2005
2811
|
_proto.practiceGetPaymentsIntents = function practiceGetPaymentsIntents(practiceUuid, planType) {
|
2006
2812
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents", {
|
2007
2813
|
params: {
|
@@ -2013,7 +2819,9 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2013
2819
|
* This function return the user hased email to be use for creating payment intent
|
2014
2820
|
* @param email the email to hash
|
2015
2821
|
* @returns a hashed email
|
2016
|
-
|
2822
|
+
*/
|
2823
|
+
;
|
2824
|
+
|
2017
2825
|
_proto.getPaymentIntentHashedEmail = function getPaymentIntentHashedEmail(email) {
|
2018
2826
|
return hashToBase64String(email.toLowerCase());
|
2019
2827
|
}
|
@@ -2027,7 +2835,9 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2027
2835
|
* @param promotionCode (optional) promotion code to apply
|
2028
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.).
|
2029
2837
|
* @returns
|
2030
|
-
|
2838
|
+
*/
|
2839
|
+
;
|
2840
|
+
|
2031
2841
|
_proto.practiceCreatePaymentsIntent = function practiceCreatePaymentsIntent(practiceUuid, planId, userEmail, isoLocality, url_subdomain, requestMetadata) {
|
2032
2842
|
return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/", {
|
2033
2843
|
idPlan: planId,
|
@@ -2040,6 +2850,7 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2040
2850
|
}
|
2041
2851
|
});
|
2042
2852
|
};
|
2853
|
+
|
2043
2854
|
_proto.practiceGetPaymentsIntent = function practiceGetPaymentsIntent(practiceUuid, paymentIntentId) {
|
2044
2855
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/" + paymentIntentId);
|
2045
2856
|
}
|
@@ -2052,7 +2863,9 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2052
2863
|
* @param promotionCode (optional) promotional code to apply
|
2053
2864
|
* @param finalize (optional) if true will finalize the PracticePaymentIntent and related Stripe.Invoice. Once, finalized you cannot modify the PracticePaymentIntent anymore.
|
2054
2865
|
* @returns the updated PracticePaymentIntent
|
2055
|
-
|
2866
|
+
*/
|
2867
|
+
;
|
2868
|
+
|
2056
2869
|
_proto.practiceUpdatePaymentsIntent = function practiceUpdatePaymentsIntent(practiceUuid, idPraticePaymentIntent, practicePaymentIntent, userEmail, promotionCode, finalize) {
|
2057
2870
|
return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/" + idPraticePaymentIntent, _extends({}, practicePaymentIntent, {
|
2058
2871
|
hashUserEmail: userEmail ? this.getPaymentIntentHashedEmail(userEmail) : undefined
|
@@ -2067,103 +2880,125 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2067
2880
|
* Invoice
|
2068
2881
|
* @param practiceUuid UUID of the practice to get the invoice from
|
2069
2882
|
* @param invoiceId ID of the invoice in stripe
|
2070
|
-
|
2883
|
+
*/
|
2884
|
+
;
|
2885
|
+
|
2071
2886
|
_proto.getInvoice = function getInvoice(practiceUuid, invoiceId) {
|
2072
2887
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/invoices/" + invoiceId);
|
2073
|
-
}
|
2074
|
-
// Practitioner
|
2888
|
+
} // Practitioner
|
2075
2889
|
;
|
2890
|
+
|
2076
2891
|
_proto.practiceGetPractitioners = function practiceGetPractitioners(practiceUuid) {
|
2077
2892
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners");
|
2078
2893
|
};
|
2894
|
+
|
2079
2895
|
_proto.practiceUpdatePractitioner = function practiceUpdatePractitioner(practiceUuid, practitionerUuid, requestBody) {
|
2080
2896
|
return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid, requestBody);
|
2081
2897
|
};
|
2898
|
+
|
2082
2899
|
_proto.practiceGetPractitioner = function practiceGetPractitioner(practiceUuid, practitionerUuid) {
|
2083
2900
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid);
|
2084
|
-
}
|
2085
|
-
// Practitioner Licenses
|
2901
|
+
} // Practitioner Licenses
|
2086
2902
|
;
|
2903
|
+
|
2087
2904
|
_proto.practiceGetPractitionerLicenses = function practiceGetPractitionerLicenses(practiceUuid, practitionerUuid) {
|
2088
2905
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses");
|
2089
2906
|
};
|
2907
|
+
|
2090
2908
|
_proto.practiceCreatePractitionerLicense = function practiceCreatePractitionerLicense(practiceUuid, practitionerUuid, requestBody) {
|
2091
2909
|
return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses", requestBody);
|
2092
2910
|
};
|
2911
|
+
|
2093
2912
|
_proto.practiceUpdatePractitionerLicense = function practiceUpdatePractitionerLicense(practiceUuid, practitionerUuid, licenseId, requestBody) {
|
2094
2913
|
return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses/" + licenseId, requestBody);
|
2095
2914
|
};
|
2915
|
+
|
2096
2916
|
_proto.practiceGetPractitionerLicense = function practiceGetPractitionerLicense(practiceUuid, practitionerUuid, licenseId) {
|
2097
2917
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses/" + licenseId);
|
2098
|
-
}
|
2099
|
-
// Practitioner Preferences
|
2918
|
+
} // Practitioner Preferences
|
2100
2919
|
;
|
2920
|
+
|
2101
2921
|
_proto.practiceGetPractitionerPreferences = function practiceGetPractitionerPreferences(practiceUuid, practitionerUuid) {
|
2102
2922
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences");
|
2103
2923
|
};
|
2924
|
+
|
2104
2925
|
_proto.practiceCreatePractitionerPreference = function practiceCreatePractitionerPreference(practiceUuid, practitionerUuid, requestBody) {
|
2105
2926
|
return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences", requestBody);
|
2106
2927
|
};
|
2928
|
+
|
2107
2929
|
_proto.practiceUpdatePractitionerPreference = function practiceUpdatePractitionerPreference(practiceUuid, practitionerUuid, preferenceId, requestBody) {
|
2108
2930
|
return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences/" + preferenceId, requestBody);
|
2109
2931
|
};
|
2932
|
+
|
2110
2933
|
_proto.practiceGetPractitionerPreference = function practiceGetPractitionerPreference(practiceUuid, practitionerUuid, preferenceId) {
|
2111
2934
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences/" + preferenceId);
|
2112
|
-
}
|
2113
|
-
// Practitioner Roles
|
2935
|
+
} // Practitioner Roles
|
2114
2936
|
;
|
2937
|
+
|
2115
2938
|
_proto.practiceGetPractitionerRoles = function practiceGetPractitionerRoles(practiceUuid, practitionerUuid) {
|
2116
2939
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles");
|
2117
2940
|
};
|
2941
|
+
|
2118
2942
|
_proto.practiceCreatePractitionerRole = function practiceCreatePractitionerRole(practiceUuid, practitionerUuid, requestBody) {
|
2119
2943
|
return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles", requestBody);
|
2120
2944
|
};
|
2945
|
+
|
2121
2946
|
_proto.practiceDeletePractitionerRoles = function practiceDeletePractitionerRoles(practiceUuid, practitionerUuid) {
|
2122
2947
|
return this.api.deleteRequest(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles");
|
2123
2948
|
};
|
2949
|
+
|
2124
2950
|
_proto.practiceUpdatePractitionerRole = function practiceUpdatePractitionerRole(practiceUuid, practitionerUuid, roleId, requestBody) {
|
2125
2951
|
return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles/" + roleId, requestBody);
|
2126
2952
|
};
|
2953
|
+
|
2127
2954
|
_proto.practiceGetPractitionerRole = function practiceGetPractitionerRole(practiceUuid, practitionerUuid, roleId) {
|
2128
2955
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles/" + roleId);
|
2129
2956
|
};
|
2957
|
+
|
2130
2958
|
_proto.practiceDeletePractitionerRole = function practiceDeletePractitionerRole(practiceUuid, practitionerUuid, roleId) {
|
2131
2959
|
return this.api.deleteRequest(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles/" + roleId);
|
2132
|
-
}
|
2133
|
-
|
2960
|
+
} // Practitioner signature
|
2961
|
+
|
2134
2962
|
/**
|
2135
2963
|
* This function returns the practitioner's signature as a Blob
|
2136
2964
|
* @param practiceUuid the practice uuid of the practitioner
|
2137
2965
|
* @param practitionerUuid the practitioner uuid
|
2138
2966
|
* @returns a blob representing the signature
|
2139
|
-
|
2967
|
+
*/
|
2968
|
+
;
|
2969
|
+
|
2140
2970
|
_proto.practiceGetPractitionerSignature = function practiceGetPractitionerSignature(practiceUuid, practitionerUuid) {
|
2141
2971
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/signature", {
|
2142
2972
|
responseType: 'blob'
|
2143
2973
|
});
|
2144
|
-
}
|
2145
|
-
// Assignments
|
2974
|
+
} // Assignments
|
2146
2975
|
;
|
2976
|
+
|
2147
2977
|
_proto.practiceGetAssignments = function practiceGetAssignments(practiceUuid) {
|
2148
2978
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments");
|
2149
2979
|
};
|
2980
|
+
|
2150
2981
|
_proto.practiceCreateAssignment = function practiceCreateAssignment(practiceUuid, requestBody) {
|
2151
2982
|
return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments", requestBody);
|
2152
2983
|
};
|
2984
|
+
|
2153
2985
|
_proto.practiceUpdateAssignment = function practiceUpdateAssignment(practiceUuid, assignmentId, requestBody) {
|
2154
2986
|
return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments/" + assignmentId, requestBody);
|
2155
2987
|
};
|
2988
|
+
|
2156
2989
|
_proto.practiceGetAssignment = function practiceGetAssignment(practiceUuid, assignmentId) {
|
2157
2990
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments/" + assignmentId);
|
2158
|
-
}
|
2159
|
-
// Quotas
|
2991
|
+
} // Quotas
|
2160
2992
|
;
|
2993
|
+
|
2161
2994
|
_proto.practiceGetQuotas = function practiceGetQuotas(practiceUuid) {
|
2162
2995
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/quotas");
|
2163
2996
|
};
|
2997
|
+
|
2164
2998
|
_proto.practiceGetQuota = function practiceGetQuota(practiceUuid, quotaId) {
|
2165
2999
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/quotas/" + quotaId);
|
2166
3000
|
};
|
3001
|
+
|
2167
3002
|
return PracticeService;
|
2168
3003
|
}();
|
2169
3004
|
|
@@ -2172,10 +3007,12 @@ var TellerService = /*#__PURE__*/function () {
|
|
2172
3007
|
this.api = api;
|
2173
3008
|
this.baseURL = baseURL;
|
2174
3009
|
}
|
3010
|
+
|
2175
3011
|
var _proto = TellerService.prototype;
|
3012
|
+
|
2176
3013
|
_proto.lockboxDataStore = /*#__PURE__*/function () {
|
2177
|
-
var _lockboxDataStore = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2178
|
-
return
|
3014
|
+
var _lockboxDataStore = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(lockboxUuid, req, lockboxOwnerUuid, previousDataUuid) {
|
3015
|
+
return runtime_1.wrap(function _callee$(_context) {
|
2179
3016
|
while (1) {
|
2180
3017
|
switch (_context.prev = _context.next) {
|
2181
3018
|
case 0:
|
@@ -2185,6 +3022,7 @@ var TellerService = /*#__PURE__*/function () {
|
|
2185
3022
|
data_uuid: previousDataUuid
|
2186
3023
|
}
|
2187
3024
|
}));
|
3025
|
+
|
2188
3026
|
case 1:
|
2189
3027
|
case "end":
|
2190
3028
|
return _context.stop();
|
@@ -2192,11 +3030,14 @@ var TellerService = /*#__PURE__*/function () {
|
|
2192
3030
|
}
|
2193
3031
|
}, _callee, this);
|
2194
3032
|
}));
|
3033
|
+
|
2195
3034
|
function lockboxDataStore(_x, _x2, _x3, _x4) {
|
2196
3035
|
return _lockboxDataStore.apply(this, arguments);
|
2197
3036
|
}
|
3037
|
+
|
2198
3038
|
return lockboxDataStore;
|
2199
3039
|
}();
|
3040
|
+
|
2200
3041
|
_proto.updateConsultByUUID = function updateConsultByUUID(patientUuid, uuidConsult, statusMedical, closedReasonType, closedReasonDescription, neverExpires) {
|
2201
3042
|
return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult, {
|
2202
3043
|
patientUuid: patientUuid,
|
@@ -2214,7 +3055,9 @@ var TellerService = /*#__PURE__*/function () {
|
|
2214
3055
|
* @param consultationShortId the consultation short id
|
2215
3056
|
* @param fax the address where to send the fax
|
2216
3057
|
* @returns void
|
2217
|
-
|
3058
|
+
*/
|
3059
|
+
;
|
3060
|
+
|
2218
3061
|
_proto.notifyFaxFailed = function notifyFaxFailed(practiceUuid, consultationUuid, consultationShortId, fax) {
|
2219
3062
|
return this.api.post(this.baseURL + "/v1/fax-failed", {
|
2220
3063
|
consultationUuid: consultationUuid,
|
@@ -2231,7 +3074,9 @@ var TellerService = /*#__PURE__*/function () {
|
|
2231
3074
|
* @todo - Make service only exposed route
|
2232
3075
|
* @param uuidConsult the uuid of the consult to reassign
|
2233
3076
|
* @param newPractitionerUuid the uuid of the practitioner that will get reassigned
|
2234
|
-
|
3077
|
+
*/
|
3078
|
+
;
|
3079
|
+
|
2235
3080
|
_proto.reassignmentEmail = function reassignmentEmail(uuidConsult, newPractitionerUuid) {
|
2236
3081
|
return this.api.post(this.baseURL + "/v1/consult/" + uuidConsult + "/reassignment-email", {
|
2237
3082
|
newPractitionerUuid: newPractitionerUuid
|
@@ -2243,7 +3088,9 @@ var TellerService = /*#__PURE__*/function () {
|
|
2243
3088
|
* @param consult
|
2244
3089
|
* @param patientUuid
|
2245
3090
|
* @returns void
|
2246
|
-
|
3091
|
+
*/
|
3092
|
+
;
|
3093
|
+
|
2247
3094
|
_proto.sendOnlineFaxSuccessfulEmail = function sendOnlineFaxSuccessfulEmail(consult, patientUuid) {
|
2248
3095
|
return this.api.post(this.baseURL + "/v1/online-fax-notify", {
|
2249
3096
|
consult: consult,
|
@@ -2254,10 +3101,13 @@ var TellerService = /*#__PURE__*/function () {
|
|
2254
3101
|
* This function will send an email to patient to allow them to resume the consult.
|
2255
3102
|
* @param req the body of the resume consult request
|
2256
3103
|
* @returns void
|
2257
|
-
|
3104
|
+
*/
|
3105
|
+
;
|
3106
|
+
|
2258
3107
|
_proto.sendResumeConsultEmail = function sendResumeConsultEmail(req) {
|
2259
3108
|
return this.api.post(this.baseURL + "/v1/resume-consult-email", req);
|
2260
3109
|
};
|
3110
|
+
|
2261
3111
|
return TellerService;
|
2262
3112
|
}();
|
2263
3113
|
|
@@ -2266,14 +3116,17 @@ var VaultService = /*#__PURE__*/function () {
|
|
2266
3116
|
this.api = api;
|
2267
3117
|
this.baseURL = baseURL;
|
2268
3118
|
}
|
3119
|
+
|
2269
3120
|
var _proto = VaultService.prototype;
|
3121
|
+
|
2270
3122
|
_proto.lockboxCreate = /*#__PURE__*/function () {
|
2271
|
-
var _lockboxCreate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2272
|
-
return
|
3123
|
+
var _lockboxCreate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(lockboxMetadata) {
|
3124
|
+
return runtime_1.wrap(function _callee$(_context) {
|
2273
3125
|
while (1) {
|
2274
3126
|
switch (_context.prev = _context.next) {
|
2275
3127
|
case 0:
|
2276
3128
|
return _context.abrupt("return", this.api.post(this.baseURL + "/v1/lockbox", lockboxMetadata));
|
3129
|
+
|
2277
3130
|
case 1:
|
2278
3131
|
case "end":
|
2279
3132
|
return _context.stop();
|
@@ -2281,14 +3134,17 @@ var VaultService = /*#__PURE__*/function () {
|
|
2281
3134
|
}
|
2282
3135
|
}, _callee, this);
|
2283
3136
|
}));
|
3137
|
+
|
2284
3138
|
function lockboxCreate(_x) {
|
2285
3139
|
return _lockboxCreate.apply(this, arguments);
|
2286
3140
|
}
|
3141
|
+
|
2287
3142
|
return lockboxCreate;
|
2288
3143
|
}();
|
3144
|
+
|
2289
3145
|
_proto.lockboxMetadataAdd = /*#__PURE__*/function () {
|
2290
|
-
var _lockboxMetadataAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2291
|
-
return
|
3146
|
+
var _lockboxMetadataAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(lockboxUuid, lockboxMetadata, lockboxOwnerUuid) {
|
3147
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
2292
3148
|
while (1) {
|
2293
3149
|
switch (_context2.prev = _context2.next) {
|
2294
3150
|
case 0:
|
@@ -2297,6 +3153,7 @@ var VaultService = /*#__PURE__*/function () {
|
|
2297
3153
|
lockbox_owner_uuid: lockboxOwnerUuid
|
2298
3154
|
}
|
2299
3155
|
}));
|
3156
|
+
|
2300
3157
|
case 1:
|
2301
3158
|
case "end":
|
2302
3159
|
return _context2.stop();
|
@@ -2304,14 +3161,17 @@ var VaultService = /*#__PURE__*/function () {
|
|
2304
3161
|
}
|
2305
3162
|
}, _callee2, this);
|
2306
3163
|
}));
|
3164
|
+
|
2307
3165
|
function lockboxMetadataAdd(_x2, _x3, _x4) {
|
2308
3166
|
return _lockboxMetadataAdd.apply(this, arguments);
|
2309
3167
|
}
|
3168
|
+
|
2310
3169
|
return lockboxMetadataAdd;
|
2311
3170
|
}();
|
3171
|
+
|
2312
3172
|
_proto.lockboxSecretGet = /*#__PURE__*/function () {
|
2313
|
-
var _lockboxSecretGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2314
|
-
return
|
3173
|
+
var _lockboxSecretGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(lockboxUuid, lockboxOwnerUuid) {
|
3174
|
+
return runtime_1.wrap(function _callee3$(_context3) {
|
2315
3175
|
while (1) {
|
2316
3176
|
switch (_context3.prev = _context3.next) {
|
2317
3177
|
case 0:
|
@@ -2320,6 +3180,7 @@ var VaultService = /*#__PURE__*/function () {
|
|
2320
3180
|
lockbox_owner_uuid: lockboxOwnerUuid
|
2321
3181
|
}
|
2322
3182
|
}));
|
3183
|
+
|
2323
3184
|
case 1:
|
2324
3185
|
case "end":
|
2325
3186
|
return _context3.stop();
|
@@ -2327,14 +3188,17 @@ var VaultService = /*#__PURE__*/function () {
|
|
2327
3188
|
}
|
2328
3189
|
}, _callee3, this);
|
2329
3190
|
}));
|
3191
|
+
|
2330
3192
|
function lockboxSecretGet(_x5, _x6) {
|
2331
3193
|
return _lockboxSecretGet.apply(this, arguments);
|
2332
3194
|
}
|
3195
|
+
|
2333
3196
|
return lockboxSecretGet;
|
2334
3197
|
}();
|
3198
|
+
|
2335
3199
|
_proto.lockboxGrant = /*#__PURE__*/function () {
|
2336
|
-
var _lockboxGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2337
|
-
return
|
3200
|
+
var _lockboxGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(lockboxUuid, req, lockboxOwnerUuid) {
|
3201
|
+
return runtime_1.wrap(function _callee4$(_context4) {
|
2338
3202
|
while (1) {
|
2339
3203
|
switch (_context4.prev = _context4.next) {
|
2340
3204
|
case 0:
|
@@ -2343,6 +3207,7 @@ var VaultService = /*#__PURE__*/function () {
|
|
2343
3207
|
lockbox_owner_uuid: lockboxOwnerUuid
|
2344
3208
|
}
|
2345
3209
|
}));
|
3210
|
+
|
2346
3211
|
case 1:
|
2347
3212
|
case "end":
|
2348
3213
|
return _context4.stop();
|
@@ -2350,24 +3215,30 @@ var VaultService = /*#__PURE__*/function () {
|
|
2350
3215
|
}
|
2351
3216
|
}, _callee4, this);
|
2352
3217
|
}));
|
3218
|
+
|
2353
3219
|
function lockboxGrant(_x7, _x8, _x9) {
|
2354
3220
|
return _lockboxGrant.apply(this, arguments);
|
2355
3221
|
}
|
3222
|
+
|
2356
3223
|
return lockboxGrant;
|
2357
|
-
}()
|
2358
|
-
|
2359
|
-
|
2360
|
-
|
2361
|
-
|
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
|
+
|
2362
3232
|
_proto.grantsGet =
|
2363
3233
|
/*#__PURE__*/
|
2364
3234
|
function () {
|
2365
|
-
var _grantsGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2366
|
-
return
|
3235
|
+
var _grantsGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5() {
|
3236
|
+
return runtime_1.wrap(function _callee5$(_context5) {
|
2367
3237
|
while (1) {
|
2368
3238
|
switch (_context5.prev = _context5.next) {
|
2369
3239
|
case 0:
|
2370
3240
|
return _context5.abrupt("return", this.api.get(this.baseURL + "/v1/grants"));
|
3241
|
+
|
2371
3242
|
case 1:
|
2372
3243
|
case "end":
|
2373
3244
|
return _context5.stop();
|
@@ -2375,25 +3246,30 @@ var VaultService = /*#__PURE__*/function () {
|
|
2375
3246
|
}
|
2376
3247
|
}, _callee5, this);
|
2377
3248
|
}));
|
3249
|
+
|
2378
3250
|
function grantsGet() {
|
2379
3251
|
return _grantsGet.apply(this, arguments);
|
2380
3252
|
}
|
3253
|
+
|
2381
3254
|
return grantsGet;
|
2382
|
-
}()
|
2383
|
-
|
2384
|
-
|
2385
|
-
|
2386
|
-
|
2387
|
-
|
2388
|
-
|
2389
|
-
|
2390
|
-
|
2391
|
-
|
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
|
+
|
2392
3268
|
_proto.lockboxDataStore =
|
2393
3269
|
/*#__PURE__*/
|
2394
3270
|
function () {
|
2395
|
-
var _lockboxDataStore = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2396
|
-
return
|
3271
|
+
var _lockboxDataStore = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(lockboxUuid, req, lockboxOwnerUuid, previousDataUuid) {
|
3272
|
+
return runtime_1.wrap(function _callee6$(_context6) {
|
2397
3273
|
while (1) {
|
2398
3274
|
switch (_context6.prev = _context6.next) {
|
2399
3275
|
case 0:
|
@@ -2403,6 +3279,7 @@ var VaultService = /*#__PURE__*/function () {
|
|
2403
3279
|
data_uuid: previousDataUuid
|
2404
3280
|
}
|
2405
3281
|
}));
|
3282
|
+
|
2406
3283
|
case 1:
|
2407
3284
|
case "end":
|
2408
3285
|
return _context6.stop();
|
@@ -2410,21 +3287,25 @@ var VaultService = /*#__PURE__*/function () {
|
|
2410
3287
|
}
|
2411
3288
|
}, _callee6, this);
|
2412
3289
|
}));
|
3290
|
+
|
2413
3291
|
function lockboxDataStore(_x10, _x11, _x12, _x13) {
|
2414
3292
|
return _lockboxDataStore.apply(this, arguments);
|
2415
3293
|
}
|
3294
|
+
|
2416
3295
|
return lockboxDataStore;
|
2417
3296
|
}();
|
3297
|
+
|
2418
3298
|
_proto.lockboxDataGet = /*#__PURE__*/function () {
|
2419
|
-
var _lockboxDataGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3299
|
+
var _lockboxDataGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(lockboxUuid, dataUuid, lockboxOwnerUuid, stream) {
|
2420
3300
|
var data;
|
2421
|
-
return
|
3301
|
+
return runtime_1.wrap(function _callee7$(_context7) {
|
2422
3302
|
while (1) {
|
2423
3303
|
switch (_context7.prev = _context7.next) {
|
2424
3304
|
case 0:
|
2425
3305
|
if (stream === void 0) {
|
2426
3306
|
stream = true;
|
2427
3307
|
}
|
3308
|
+
|
2428
3309
|
_context7.next = 3;
|
2429
3310
|
return this.api.get(this.baseURL + "/v1/lockboxes/" + lockboxUuid + "/data/" + dataUuid, {
|
2430
3311
|
params: {
|
@@ -2432,17 +3313,22 @@ var VaultService = /*#__PURE__*/function () {
|
|
2432
3313
|
stream: stream
|
2433
3314
|
}
|
2434
3315
|
});
|
3316
|
+
|
2435
3317
|
case 3:
|
2436
3318
|
data = _context7.sent;
|
3319
|
+
|
2437
3320
|
if (!stream) {
|
2438
3321
|
_context7.next = 6;
|
2439
3322
|
break;
|
2440
3323
|
}
|
3324
|
+
|
2441
3325
|
return _context7.abrupt("return", {
|
2442
3326
|
data: data
|
2443
3327
|
});
|
3328
|
+
|
2444
3329
|
case 6:
|
2445
3330
|
return _context7.abrupt("return", data);
|
3331
|
+
|
2446
3332
|
case 7:
|
2447
3333
|
case "end":
|
2448
3334
|
return _context7.stop();
|
@@ -2450,14 +3336,17 @@ var VaultService = /*#__PURE__*/function () {
|
|
2450
3336
|
}
|
2451
3337
|
}, _callee7, this);
|
2452
3338
|
}));
|
3339
|
+
|
2453
3340
|
function lockboxDataGet(_x14, _x15, _x16, _x17) {
|
2454
3341
|
return _lockboxDataGet.apply(this, arguments);
|
2455
3342
|
}
|
3343
|
+
|
2456
3344
|
return lockboxDataGet;
|
2457
3345
|
}();
|
3346
|
+
|
2458
3347
|
_proto.lockboxManifestGet = /*#__PURE__*/function () {
|
2459
|
-
var _lockboxManifestGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2460
|
-
return
|
3348
|
+
var _lockboxManifestGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(lockboxUuid, filter, lockboxOwnerUuid) {
|
3349
|
+
return runtime_1.wrap(function _callee8$(_context8) {
|
2461
3350
|
while (1) {
|
2462
3351
|
switch (_context8.prev = _context8.next) {
|
2463
3352
|
case 0:
|
@@ -2467,6 +3356,7 @@ var VaultService = /*#__PURE__*/function () {
|
|
2467
3356
|
filter: filter
|
2468
3357
|
}
|
2469
3358
|
}));
|
3359
|
+
|
2470
3360
|
case 1:
|
2471
3361
|
case "end":
|
2472
3362
|
return _context8.stop();
|
@@ -2474,14 +3364,17 @@ var VaultService = /*#__PURE__*/function () {
|
|
2474
3364
|
}
|
2475
3365
|
}, _callee8, this);
|
2476
3366
|
}));
|
3367
|
+
|
2477
3368
|
function lockboxManifestGet(_x18, _x19, _x20) {
|
2478
3369
|
return _lockboxManifestGet.apply(this, arguments);
|
2479
3370
|
}
|
3371
|
+
|
2480
3372
|
return lockboxManifestGet;
|
2481
3373
|
}();
|
3374
|
+
|
2482
3375
|
_proto.lockboxMetadataGet = /*#__PURE__*/function () {
|
2483
|
-
var _lockboxMetadataGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2484
|
-
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) {
|
2485
3378
|
while (1) {
|
2486
3379
|
switch (_context9.prev = _context9.next) {
|
2487
3380
|
case 0:
|
@@ -2493,6 +3386,7 @@ var VaultService = /*#__PURE__*/function () {
|
|
2493
3386
|
filter: filter
|
2494
3387
|
}
|
2495
3388
|
}));
|
3389
|
+
|
2496
3390
|
case 1:
|
2497
3391
|
case "end":
|
2498
3392
|
return _context9.stop();
|
@@ -2500,22 +3394,27 @@ var VaultService = /*#__PURE__*/function () {
|
|
2500
3394
|
}
|
2501
3395
|
}, _callee9, this);
|
2502
3396
|
}));
|
3397
|
+
|
2503
3398
|
function lockboxMetadataGet(_x21, _x22, _x23, _x24, _x25) {
|
2504
3399
|
return _lockboxMetadataGet.apply(this, arguments);
|
2505
3400
|
}
|
3401
|
+
|
2506
3402
|
return lockboxMetadataGet;
|
2507
|
-
}()
|
2508
|
-
|
2509
|
-
|
2510
|
-
|
2511
|
-
|
2512
|
-
|
2513
|
-
|
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
|
+
|
2514
3413
|
_proto.vaultIndexPut =
|
2515
3414
|
/*#__PURE__*/
|
2516
3415
|
function () {
|
2517
|
-
var _vaultIndexPut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2518
|
-
return
|
3416
|
+
var _vaultIndexPut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(entries, indexOwnerUuid) {
|
3417
|
+
return runtime_1.wrap(function _callee10$(_context10) {
|
2519
3418
|
while (1) {
|
2520
3419
|
switch (_context10.prev = _context10.next) {
|
2521
3420
|
case 0:
|
@@ -2524,6 +3423,7 @@ var VaultService = /*#__PURE__*/function () {
|
|
2524
3423
|
index_owner_uuid: indexOwnerUuid
|
2525
3424
|
}
|
2526
3425
|
}));
|
3426
|
+
|
2527
3427
|
case 1:
|
2528
3428
|
case "end":
|
2529
3429
|
return _context10.stop();
|
@@ -2531,24 +3431,30 @@ var VaultService = /*#__PURE__*/function () {
|
|
2531
3431
|
}
|
2532
3432
|
}, _callee10, this);
|
2533
3433
|
}));
|
3434
|
+
|
2534
3435
|
function vaultIndexPut(_x26, _x27) {
|
2535
3436
|
return _vaultIndexPut.apply(this, arguments);
|
2536
3437
|
}
|
3438
|
+
|
2537
3439
|
return vaultIndexPut;
|
2538
|
-
}()
|
2539
|
-
|
2540
|
-
|
2541
|
-
|
2542
|
-
|
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
|
+
|
2543
3448
|
_proto.vaultIndexSnapshotPut =
|
2544
3449
|
/*#__PURE__*/
|
2545
3450
|
function () {
|
2546
|
-
var _vaultIndexSnapshotPut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2547
|
-
return
|
3451
|
+
var _vaultIndexSnapshotPut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(entry) {
|
3452
|
+
return runtime_1.wrap(function _callee11$(_context11) {
|
2548
3453
|
while (1) {
|
2549
3454
|
switch (_context11.prev = _context11.next) {
|
2550
3455
|
case 0:
|
2551
3456
|
return _context11.abrupt("return", this.api.put(this.baseURL + "/v1/index-snapshot", entry));
|
3457
|
+
|
2552
3458
|
case 1:
|
2553
3459
|
case "end":
|
2554
3460
|
return _context11.stop();
|
@@ -2556,23 +3462,28 @@ var VaultService = /*#__PURE__*/function () {
|
|
2556
3462
|
}
|
2557
3463
|
}, _callee11, this);
|
2558
3464
|
}));
|
3465
|
+
|
2559
3466
|
function vaultIndexSnapshotPut(_x28) {
|
2560
3467
|
return _vaultIndexSnapshotPut.apply(this, arguments);
|
2561
3468
|
}
|
3469
|
+
|
2562
3470
|
return vaultIndexSnapshotPut;
|
2563
|
-
}()
|
2564
|
-
|
2565
|
-
|
2566
|
-
|
2567
|
-
|
2568
|
-
|
2569
|
-
|
2570
|
-
|
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
|
+
|
2571
3482
|
_proto.vaultIndexGet =
|
2572
3483
|
/*#__PURE__*/
|
2573
3484
|
function () {
|
2574
|
-
var _vaultIndexGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2575
|
-
return
|
3485
|
+
var _vaultIndexGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(indexKeys, identifiers, timestamp) {
|
3486
|
+
return runtime_1.wrap(function _callee12$(_context12) {
|
2576
3487
|
while (1) {
|
2577
3488
|
switch (_context12.prev = _context12.next) {
|
2578
3489
|
case 0:
|
@@ -2583,6 +3494,7 @@ var VaultService = /*#__PURE__*/function () {
|
|
2583
3494
|
timestamp: timestamp
|
2584
3495
|
}
|
2585
3496
|
}));
|
3497
|
+
|
2586
3498
|
case 1:
|
2587
3499
|
case "end":
|
2588
3500
|
return _context12.stop();
|
@@ -2590,11 +3502,14 @@ var VaultService = /*#__PURE__*/function () {
|
|
2590
3502
|
}
|
2591
3503
|
}, _callee12, this);
|
2592
3504
|
}));
|
3505
|
+
|
2593
3506
|
function vaultIndexGet(_x29, _x30, _x31) {
|
2594
3507
|
return _vaultIndexGet.apply(this, arguments);
|
2595
3508
|
}
|
3509
|
+
|
2596
3510
|
return vaultIndexGet;
|
2597
3511
|
}();
|
3512
|
+
|
2598
3513
|
return VaultService;
|
2599
3514
|
}();
|
2600
3515
|
|
@@ -2607,7 +3522,10 @@ var WorkflowService = /*#__PURE__*/function () {
|
|
2607
3522
|
* This function returns all workflows
|
2608
3523
|
* @returns desired workflow
|
2609
3524
|
*/
|
3525
|
+
|
3526
|
+
|
2610
3527
|
var _proto = WorkflowService.prototype;
|
3528
|
+
|
2611
3529
|
_proto.getWorkflows = function getWorkflows() {
|
2612
3530
|
return this.api.get(this.v1Url + "/workflows");
|
2613
3531
|
}
|
@@ -2618,7 +3536,9 @@ var WorkflowService = /*#__PURE__*/function () {
|
|
2618
3536
|
* @param locale (optional) The desired locale of the workflow (default: 'en')
|
2619
3537
|
* @param createdAt (optional) The creation date of the workflow (also used for versionning)
|
2620
3538
|
* @returns desired workflow
|
2621
|
-
|
3539
|
+
*/
|
3540
|
+
;
|
3541
|
+
|
2622
3542
|
_proto.getWorkflow = function getWorkflow(id, locale, createdAt) {
|
2623
3543
|
return this.api.get(this.v1Url + "/workflows/" + id, {
|
2624
3544
|
params: {
|
@@ -2627,6 +3547,7 @@ var WorkflowService = /*#__PURE__*/function () {
|
|
2627
3547
|
}
|
2628
3548
|
});
|
2629
3549
|
};
|
3550
|
+
|
2630
3551
|
return WorkflowService;
|
2631
3552
|
}();
|
2632
3553
|
|
@@ -2637,18 +3558,20 @@ var WorkflowService = /*#__PURE__*/function () {
|
|
2637
3558
|
* @param useLocalStorage (default: true) if true store tokens into local storage (only for browsers)
|
2638
3559
|
* @returns an instance of each services with a provided url
|
2639
3560
|
*/
|
3561
|
+
|
2640
3562
|
var init = function init(services, authenticationCallback, useLocalStorage) {
|
2641
3563
|
if (useLocalStorage === void 0) {
|
2642
3564
|
useLocalStorage = true;
|
2643
3565
|
}
|
3566
|
+
|
2644
3567
|
var tellerBaseURL = services.tellerBaseURL,
|
2645
|
-
|
2646
|
-
|
2647
|
-
|
2648
|
-
|
2649
|
-
|
2650
|
-
|
2651
|
-
|
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;
|
2652
3575
|
var apiService = new APIService(useLocalStorage, undefined, authenticationCallback);
|
2653
3576
|
return {
|
2654
3577
|
apiService: apiService,
|