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