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