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