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