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