oro-sdk-apis 3.2.3 → 3.2.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/models/workflow.d.ts +1 -0
- package/dist/oro-sdk-apis.cjs.development.js +192 -694
- package/dist/oro-sdk-apis.cjs.development.js.map +1 -1
- package/dist/oro-sdk-apis.cjs.production.min.js +1 -1
- package/dist/oro-sdk-apis.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk-apis.esm.js +192 -728
- package/dist/oro-sdk-apis.esm.js.map +1 -1
- package/dist/services/practice.d.ts +2 -2
- package/package.json +1 -1
- package/src/models/workflow.ts +17 -16
- package/src/services/practice.ts +14 -3
@@ -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";
|
@@ -1212,6 +1026,7 @@ var VaultDataMissing = /*#__PURE__*/function (_Error8) {
|
|
1212
1026
|
(function (MetadataCategory) {
|
1213
1027
|
MetadataCategory["ChildPersonal"] = "ChildPersonal";
|
1214
1028
|
MetadataCategory["Consultation"] = "Consultation";
|
1029
|
+
MetadataCategory["Refill"] = "Refill";
|
1215
1030
|
MetadataCategory["DataRetrieval"] = "DataRetrieval";
|
1216
1031
|
MetadataCategory["Followup"] = "Followup";
|
1217
1032
|
MetadataCategory["Recovery"] = "Recovery";
|
@@ -1237,9 +1052,7 @@ var ConsultService = /*#__PURE__*/function () {
|
|
1237
1052
|
this.api = api;
|
1238
1053
|
this.baseURL = baseURL;
|
1239
1054
|
}
|
1240
|
-
|
1241
1055
|
var _proto = ConsultService.prototype;
|
1242
|
-
|
1243
1056
|
_proto.consultCreate = function consultCreate(c) {
|
1244
1057
|
return this.api.post(this.baseURL + "/v1/consults", c);
|
1245
1058
|
}
|
@@ -1259,9 +1072,7 @@ var ConsultService = /*#__PURE__*/function () {
|
|
1259
1072
|
* @param filterIsoLocality the of isoLocality to filter with
|
1260
1073
|
* @param filterAssignee array of practitioner uuids with which you want to filter the consultations
|
1261
1074
|
* @returns a number of consult
|
1262
|
-
|
1263
|
-
;
|
1264
|
-
|
1075
|
+
*/;
|
1265
1076
|
_proto.countConsults = function countConsults(uuidPractice, uuidRequester, statusesMedical, statusesExclude, shortId, columnToSortTo, orderToSortTo, perPage, indexPage, filterAssignedDoctor, filterCurrentPractitioner, filterIsoLocality, filterAssignee) {
|
1266
1077
|
return this.api.head(this.baseURL + "/v1/consults", {
|
1267
1078
|
params: {
|
@@ -1283,11 +1094,9 @@ var ConsultService = /*#__PURE__*/function () {
|
|
1283
1094
|
if (!resContentRange || typeof resContentRange !== 'string' && typeof resContentRange !== 'number') {
|
1284
1095
|
return 0;
|
1285
1096
|
}
|
1286
|
-
|
1287
1097
|
if (typeof resContentRange === 'number') {
|
1288
1098
|
return resContentRange;
|
1289
1099
|
}
|
1290
|
-
|
1291
1100
|
return parseInt(resContentRange);
|
1292
1101
|
});
|
1293
1102
|
}
|
@@ -1306,9 +1115,7 @@ var ConsultService = /*#__PURE__*/function () {
|
|
1306
1115
|
* @param filterCurrentPractitioner the uuid of the current assistant assigned to filter with
|
1307
1116
|
* @param filterIsoLocality the of isoLocality to filter with
|
1308
1117
|
* @returns a list of consult
|
1309
|
-
|
1310
|
-
;
|
1311
|
-
|
1118
|
+
*/;
|
1312
1119
|
_proto.getConsults = function getConsults(uuidPractice, uuidRequester, statusesMedical, statusesExclude, shortId, columnToSortTo, orderToSortTo, perPage, indexPage, filterAssignedDoctor, filterCurrentPractitioner, filterIsoLocality, filterAssignee) {
|
1313
1120
|
return this.api.get(this.baseURL + "/v1/consults", {
|
1314
1121
|
params: {
|
@@ -1328,7 +1135,6 @@ var ConsultService = /*#__PURE__*/function () {
|
|
1328
1135
|
}
|
1329
1136
|
});
|
1330
1137
|
};
|
1331
|
-
|
1332
1138
|
_proto.getConsultByUUID = function getConsultByUUID(uuidConsult, uuidPractice) {
|
1333
1139
|
return this.api.get(this.baseURL + "/v1/consults/" + uuidConsult, {
|
1334
1140
|
params: {
|
@@ -1336,7 +1142,6 @@ var ConsultService = /*#__PURE__*/function () {
|
|
1336
1142
|
}
|
1337
1143
|
});
|
1338
1144
|
};
|
1339
|
-
|
1340
1145
|
_proto.updateConsultByUUID = function updateConsultByUUID(uuidConsult, consult, uuidPractice, uuidRequester) {
|
1341
1146
|
return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult, consult, {
|
1342
1147
|
params: {
|
@@ -1345,7 +1150,6 @@ var ConsultService = /*#__PURE__*/function () {
|
|
1345
1150
|
}
|
1346
1151
|
});
|
1347
1152
|
};
|
1348
|
-
|
1349
1153
|
_proto.getConsultFaxStatuses = function getConsultFaxStatuses(uuidConsult) {
|
1350
1154
|
return this.api.get(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions", {
|
1351
1155
|
params: {
|
@@ -1353,64 +1157,52 @@ var ConsultService = /*#__PURE__*/function () {
|
|
1353
1157
|
}
|
1354
1158
|
});
|
1355
1159
|
};
|
1356
|
-
|
1357
|
-
|
1160
|
+
_proto.postConsultTransmission = function postConsultTransmission(uuidConsult, nameDriver, addressOrPhoneToSendTo, file, nameReceiver, txtTransmissionTitle, txtTransmissionNotes
|
1161
|
+
// numTry ?: number,
|
1358
1162
|
// delay ?: number,
|
1359
1163
|
) {
|
1360
1164
|
if (nameDriver === void 0) {
|
1361
1165
|
nameDriver = 'Documo';
|
1362
1166
|
}
|
1363
|
-
|
1364
1167
|
var data = new FormData();
|
1365
1168
|
data.append('nameDriverReceiver', nameDriver);
|
1366
|
-
|
1367
1169
|
if (addressOrPhoneToSendTo) {
|
1368
1170
|
data.append('addressReceiver', addressOrPhoneToSendTo);
|
1369
1171
|
}
|
1370
|
-
|
1371
1172
|
if (file) {
|
1372
1173
|
data.append('file', file);
|
1373
1174
|
}
|
1374
|
-
|
1375
1175
|
if (nameReceiver) {
|
1376
1176
|
data.append('nameReceiver', nameReceiver);
|
1377
1177
|
}
|
1378
|
-
|
1379
1178
|
if (txtTransmissionTitle) {
|
1380
1179
|
data.append('txtTransmissionTitle', txtTransmissionTitle);
|
1381
1180
|
}
|
1382
|
-
|
1383
1181
|
if (txtTransmissionNotes) {
|
1384
1182
|
data.append('txtTransmissionNotes', txtTransmissionNotes);
|
1385
1183
|
}
|
1386
|
-
|
1387
1184
|
return this.api.post(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions", data, {
|
1388
1185
|
headers: {
|
1389
1186
|
'Content-Type': 'multipart/form-data;'
|
1390
1187
|
}
|
1391
1188
|
});
|
1392
1189
|
};
|
1393
|
-
|
1394
1190
|
_proto.postConsultFax = function postConsultFax(uuidConsult, addressReceiver, file) {
|
1395
1191
|
return this.postConsultTransmission(uuidConsult, 'Documo', addressReceiver, file);
|
1396
1192
|
};
|
1397
|
-
|
1398
1193
|
_proto.postConsultEmail = function postConsultEmail(uuidConsult, file) {
|
1399
1194
|
return this.postConsultTransmission(uuidConsult, 'Pharmacierge', undefined, file);
|
1400
1195
|
};
|
1401
|
-
|
1402
1196
|
_proto.retryConsultFax = function retryConsultFax(uuidConsult, transmissionId) {
|
1403
1197
|
return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions/" + transmissionId, {
|
1404
1198
|
status: exports.TransmissionStatus.Retrying
|
1405
1199
|
});
|
1406
1200
|
};
|
1407
|
-
|
1408
1201
|
_proto.updateConsultTransmissionStatus = function updateConsultTransmissionStatus(transmissionId, uuidConsult, newStatus) {
|
1409
1202
|
return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions/" + transmissionId, {
|
1410
1203
|
status: newStatus
|
1411
1204
|
});
|
1412
1205
|
};
|
1413
|
-
|
1414
1206
|
return ConsultService;
|
1415
1207
|
}();
|
1416
1208
|
|
@@ -1419,9 +1211,7 @@ var DiagnosisService = /*#__PURE__*/function () {
|
|
1419
1211
|
this.api = api;
|
1420
1212
|
this.baseURL = baseURL;
|
1421
1213
|
}
|
1422
|
-
|
1423
1214
|
var _proto = DiagnosisService.prototype;
|
1424
|
-
|
1425
1215
|
_proto.getDiagnoses = function getDiagnoses() {
|
1426
1216
|
return this.api.get(this.baseURL + "/v1/diagnoses");
|
1427
1217
|
}
|
@@ -1429,21 +1219,16 @@ var DiagnosisService = /*#__PURE__*/function () {
|
|
1429
1219
|
* Get a diagnosis by uuid that belongs to your practice
|
1430
1220
|
* @param uuidDiagnosis the uuid of the diagnosis
|
1431
1221
|
* @returns a diagnosis
|
1432
|
-
|
1433
|
-
;
|
1434
|
-
|
1222
|
+
*/;
|
1435
1223
|
_proto.getDiagnosisByUuid = function getDiagnosisByUuid(uuidDiagnosis) {
|
1436
1224
|
return this.api.get(this.baseURL + "/v1/diagnoses/" + uuidDiagnosis);
|
1437
1225
|
};
|
1438
|
-
|
1439
1226
|
_proto.createDiagnosis = function createDiagnosis(diagnosis) {
|
1440
1227
|
return this.api.post(this.baseURL + "/v1/diagnoses", diagnosis);
|
1441
1228
|
};
|
1442
|
-
|
1443
1229
|
_proto.updateDiagnosis = function updateDiagnosis(uuid, diagnosis) {
|
1444
1230
|
return this.api.put(this.baseURL + "/v1/diagnoses/" + uuid, diagnosis);
|
1445
1231
|
};
|
1446
|
-
|
1447
1232
|
_proto.getTreatmentsFromDiagnosisUuid = function getTreatmentsFromDiagnosisUuid(diagnosisUuid) {
|
1448
1233
|
return this.api.get(this.baseURL + "/v1/diagnoses/" + diagnosisUuid + "/treatments");
|
1449
1234
|
}
|
@@ -1451,9 +1236,7 @@ var DiagnosisService = /*#__PURE__*/function () {
|
|
1451
1236
|
* This function returns treatment plans associated to a consult
|
1452
1237
|
* @param uuidConsult the consult uuid to fetch
|
1453
1238
|
* @returns an array of TreatmentPlan
|
1454
|
-
|
1455
|
-
;
|
1456
|
-
|
1239
|
+
*/;
|
1457
1240
|
_proto.getTreatmentPlansFromConsultUuid = function getTreatmentPlansFromConsultUuid(uuidConsult) {
|
1458
1241
|
return this.api.get(this.baseURL + "/v1/treatment-plans/", {
|
1459
1242
|
params: {
|
@@ -1465,9 +1248,7 @@ var DiagnosisService = /*#__PURE__*/function () {
|
|
1465
1248
|
* creates a new treatment for the specified diagnosis
|
1466
1249
|
* @param diagnosisUuid uuid of the diagnosis that the treatment is linked to
|
1467
1250
|
* @param treatmentRequest the treatment to be inserted
|
1468
|
-
|
1469
|
-
;
|
1470
|
-
|
1251
|
+
*/;
|
1471
1252
|
_proto.createTreatment = function createTreatment(diagnosisUuid, treatmentRequest) {
|
1472
1253
|
return this.api.post(this.baseURL + "/v1/diagnoses/" + diagnosisUuid + "/treatments", treatmentRequest);
|
1473
1254
|
}
|
@@ -1475,9 +1256,7 @@ var DiagnosisService = /*#__PURE__*/function () {
|
|
1475
1256
|
* This function returns populated treatment plans associated to a consult
|
1476
1257
|
* @param uuidConsult the consult uuid to fetch
|
1477
1258
|
* @returns a TreatmentPlans object
|
1478
|
-
|
1479
|
-
;
|
1480
|
-
|
1259
|
+
*/;
|
1481
1260
|
_proto.getTreatmentPlansPopulatedFromConsultUuid = function getTreatmentPlansPopulatedFromConsultUuid(uuidConsult) {
|
1482
1261
|
return this.api.get(this.baseURL + "/v1/treatment-plans/", {
|
1483
1262
|
params: {
|
@@ -1486,11 +1265,9 @@ var DiagnosisService = /*#__PURE__*/function () {
|
|
1486
1265
|
}
|
1487
1266
|
});
|
1488
1267
|
};
|
1489
|
-
|
1490
1268
|
_proto.postPlans = function postPlans(plans) {
|
1491
1269
|
return this.api.post(this.baseURL + "/v1/treatment-plans", plans);
|
1492
1270
|
};
|
1493
|
-
|
1494
1271
|
_proto.updateTreatmentPlan = function updateTreatmentPlan(uuidPlan, uuidConsult, diagnosisRequest, plan, refill) {
|
1495
1272
|
return this.api.put(this.baseURL + "/v1/treatment-plans/" + uuidPlan, {
|
1496
1273
|
uuidConsult: uuidConsult,
|
@@ -1499,7 +1276,6 @@ var DiagnosisService = /*#__PURE__*/function () {
|
|
1499
1276
|
refill: refill
|
1500
1277
|
});
|
1501
1278
|
};
|
1502
|
-
|
1503
1279
|
_proto.acceptTreatmentPlan = function acceptTreatmentPlan(uuidPlan, uuidConsult) {
|
1504
1280
|
return this.api.put(this.baseURL + "/v1/treatment-plans/" + uuidPlan + "/accept", {
|
1505
1281
|
uuidConsult: uuidConsult
|
@@ -1508,9 +1284,7 @@ var DiagnosisService = /*#__PURE__*/function () {
|
|
1508
1284
|
/**
|
1509
1285
|
* retrieves all the drugs of the specified practice
|
1510
1286
|
* @param uuidPractice
|
1511
|
-
|
1512
|
-
;
|
1513
|
-
|
1287
|
+
*/;
|
1514
1288
|
_proto.getAllDrugs =
|
1515
1289
|
/*#__PURE__*/
|
1516
1290
|
function () {
|
@@ -1522,20 +1296,15 @@ var DiagnosisService = /*#__PURE__*/function () {
|
|
1522
1296
|
case 0:
|
1523
1297
|
_context.next = 2;
|
1524
1298
|
return this.api.get(this.baseURL + "/v1/drugs/practice/" + uuidPractice);
|
1525
|
-
|
1526
1299
|
case 2:
|
1527
1300
|
res = _context.sent;
|
1528
|
-
|
1529
1301
|
if (!(res && res.foundDrugs)) {
|
1530
1302
|
_context.next = 5;
|
1531
1303
|
break;
|
1532
1304
|
}
|
1533
|
-
|
1534
1305
|
return _context.abrupt("return", res.foundDrugs);
|
1535
|
-
|
1536
1306
|
case 5:
|
1537
1307
|
return _context.abrupt("return", undefined);
|
1538
|
-
|
1539
1308
|
case 6:
|
1540
1309
|
case "end":
|
1541
1310
|
return _context.stop();
|
@@ -1543,14 +1312,11 @@ var DiagnosisService = /*#__PURE__*/function () {
|
|
1543
1312
|
}
|
1544
1313
|
}, _callee, this);
|
1545
1314
|
}));
|
1546
|
-
|
1547
1315
|
function getAllDrugs(_x) {
|
1548
1316
|
return _getAllDrugs.apply(this, arguments);
|
1549
1317
|
}
|
1550
|
-
|
1551
1318
|
return getAllDrugs;
|
1552
1319
|
}();
|
1553
|
-
|
1554
1320
|
return DiagnosisService;
|
1555
1321
|
}();
|
1556
1322
|
|
@@ -1559,7 +1325,6 @@ var GuardService = /*#__PURE__*/function () {
|
|
1559
1325
|
this.api = api;
|
1560
1326
|
this.baseURL = baseURL;
|
1561
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
|
1562
|
-
|
1563
1328
|
this.identityCache = {};
|
1564
1329
|
this.whoAmICache = {};
|
1565
1330
|
}
|
@@ -1574,10 +1339,7 @@ var GuardService = /*#__PURE__*/function () {
|
|
1574
1339
|
* ```
|
1575
1340
|
* @param tokens
|
1576
1341
|
*/
|
1577
|
-
|
1578
|
-
|
1579
1342
|
var _proto = GuardService.prototype;
|
1580
|
-
|
1581
1343
|
_proto.setTokens = function setTokens(tokens) {
|
1582
1344
|
this.api.setTokens(_extends({}, this.api.getTokens(), tokens));
|
1583
1345
|
}
|
@@ -1586,15 +1348,12 @@ var GuardService = /*#__PURE__*/function () {
|
|
1586
1348
|
*
|
1587
1349
|
* @param req The credentials required to get an access token
|
1588
1350
|
* @returns AuthTokenResponse
|
1589
|
-
|
1590
|
-
;
|
1591
|
-
|
1351
|
+
*/;
|
1592
1352
|
_proto.m2mToken =
|
1593
1353
|
/*#__PURE__*/
|
1594
1354
|
function () {
|
1595
1355
|
var _m2mToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(req) {
|
1596
1356
|
var resp, config, _e$response, code;
|
1597
|
-
|
1598
1357
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
1599
1358
|
while (1) {
|
1600
1359
|
switch (_context.prev = _context.next) {
|
@@ -1605,7 +1364,6 @@ var GuardService = /*#__PURE__*/function () {
|
|
1605
1364
|
};
|
1606
1365
|
_context.next = 4;
|
1607
1366
|
return this.api.post(this.baseURL + "/v1/m2m/token", req, config);
|
1608
|
-
|
1609
1367
|
case 4:
|
1610
1368
|
resp = _context.sent;
|
1611
1369
|
this.api.setTokens({
|
@@ -1613,37 +1371,28 @@ var GuardService = /*#__PURE__*/function () {
|
|
1613
1371
|
});
|
1614
1372
|
_context.next = 20;
|
1615
1373
|
break;
|
1616
|
-
|
1617
1374
|
case 8:
|
1618
1375
|
_context.prev = 8;
|
1619
1376
|
_context.t0 = _context["catch"](0);
|
1620
1377
|
console.error('Error while posting m2m token:', _context.t0);
|
1621
|
-
|
1622
1378
|
if (!_context.t0.isAxiosError) {
|
1623
1379
|
_context.next = 19;
|
1624
1380
|
break;
|
1625
1381
|
}
|
1626
|
-
|
1627
1382
|
code = (_e$response = _context.t0.response) == null ? void 0 : _e$response.status;
|
1628
1383
|
_context.t1 = code;
|
1629
1384
|
_context.next = _context.t1 === 400 ? 16 : _context.t1 === 500 ? 17 : _context.t1 === 401 ? 18 : 18;
|
1630
1385
|
break;
|
1631
|
-
|
1632
1386
|
case 16:
|
1633
1387
|
throw new AuthenticationBadRequest();
|
1634
|
-
|
1635
1388
|
case 17:
|
1636
1389
|
throw new AuthenticationServerError();
|
1637
|
-
|
1638
1390
|
case 18:
|
1639
1391
|
throw new AuthenticationFailed();
|
1640
|
-
|
1641
1392
|
case 19:
|
1642
1393
|
throw new AuthenticationFailed();
|
1643
|
-
|
1644
1394
|
case 20:
|
1645
1395
|
return _context.abrupt("return", resp);
|
1646
|
-
|
1647
1396
|
case 21:
|
1648
1397
|
case "end":
|
1649
1398
|
return _context.stop();
|
@@ -1651,28 +1400,22 @@ var GuardService = /*#__PURE__*/function () {
|
|
1651
1400
|
}
|
1652
1401
|
}, _callee, this, [[0, 8]]);
|
1653
1402
|
}));
|
1654
|
-
|
1655
1403
|
function m2mToken(_x) {
|
1656
1404
|
return _m2mToken.apply(this, arguments);
|
1657
1405
|
}
|
1658
|
-
|
1659
1406
|
return m2mToken;
|
1660
|
-
}()
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1665
|
-
|
1666
|
-
|
1667
|
-
*/
|
1668
|
-
;
|
1669
|
-
|
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
|
+
*/;
|
1670
1414
|
_proto.authToken =
|
1671
1415
|
/*#__PURE__*/
|
1672
1416
|
function () {
|
1673
1417
|
var _authToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(req) {
|
1674
1418
|
var resp, config, _e$response2, code;
|
1675
|
-
|
1676
1419
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
1677
1420
|
while (1) {
|
1678
1421
|
switch (_context2.prev = _context2.next) {
|
@@ -1683,7 +1426,6 @@ var GuardService = /*#__PURE__*/function () {
|
|
1683
1426
|
};
|
1684
1427
|
_context2.next = 4;
|
1685
1428
|
return this.api.post(this.baseURL + "/v1/auth/token", req, config);
|
1686
|
-
|
1687
1429
|
case 4:
|
1688
1430
|
resp = _context2.sent;
|
1689
1431
|
this.api.setTokens({
|
@@ -1692,40 +1434,30 @@ var GuardService = /*#__PURE__*/function () {
|
|
1692
1434
|
});
|
1693
1435
|
_context2.next = 21;
|
1694
1436
|
break;
|
1695
|
-
|
1696
1437
|
case 8:
|
1697
1438
|
_context2.prev = 8;
|
1698
1439
|
_context2.t0 = _context2["catch"](0);
|
1699
1440
|
console.error('Error while posting auth token:', _context2.t0);
|
1700
|
-
|
1701
1441
|
if (!_context2.t0.isAxiosError) {
|
1702
1442
|
_context2.next = 20;
|
1703
1443
|
break;
|
1704
1444
|
}
|
1705
|
-
|
1706
1445
|
code = (_e$response2 = _context2.t0.response) == null ? void 0 : _e$response2.status;
|
1707
1446
|
_context2.t1 = code;
|
1708
1447
|
_context2.next = _context2.t1 === 400 ? 16 : _context2.t1 === 424 ? 17 : _context2.t1 === 500 ? 18 : _context2.t1 === 401 ? 19 : 19;
|
1709
1448
|
break;
|
1710
|
-
|
1711
1449
|
case 16:
|
1712
1450
|
throw new AuthenticationBadRequest();
|
1713
|
-
|
1714
1451
|
case 17:
|
1715
1452
|
throw new AuthenticationUnconfirmedEmail();
|
1716
|
-
|
1717
1453
|
case 18:
|
1718
1454
|
throw new AuthenticationServerError();
|
1719
|
-
|
1720
1455
|
case 19:
|
1721
1456
|
throw new AuthenticationFailed();
|
1722
|
-
|
1723
1457
|
case 20:
|
1724
1458
|
throw new AuthenticationFailed();
|
1725
|
-
|
1726
1459
|
case 21:
|
1727
1460
|
return _context2.abrupt("return", resp);
|
1728
|
-
|
1729
1461
|
case 22:
|
1730
1462
|
case "end":
|
1731
1463
|
return _context2.stop();
|
@@ -1733,20 +1465,15 @@ var GuardService = /*#__PURE__*/function () {
|
|
1733
1465
|
}
|
1734
1466
|
}, _callee2, this, [[0, 8]]);
|
1735
1467
|
}));
|
1736
|
-
|
1737
1468
|
function authToken(_x2) {
|
1738
1469
|
return _authToken.apply(this, arguments);
|
1739
1470
|
}
|
1740
|
-
|
1741
1471
|
return authToken;
|
1742
|
-
}()
|
1743
|
-
|
1744
|
-
|
1745
|
-
|
1746
|
-
|
1747
|
-
*/
|
1748
|
-
;
|
1749
|
-
|
1472
|
+
}() /**
|
1473
|
+
* Get new access and refresh token
|
1474
|
+
*
|
1475
|
+
* @returns AuthTokenResponse
|
1476
|
+
*/;
|
1750
1477
|
_proto.authRefresh =
|
1751
1478
|
/*#__PURE__*/
|
1752
1479
|
function () {
|
@@ -1761,7 +1488,6 @@ var GuardService = /*#__PURE__*/function () {
|
|
1761
1488
|
useRefreshToken: true
|
1762
1489
|
};
|
1763
1490
|
return _context3.abrupt("return", this.api.put(this.baseURL + "/v1/auth/token", null, config));
|
1764
|
-
|
1765
1491
|
case 2:
|
1766
1492
|
case "end":
|
1767
1493
|
return _context3.stop();
|
@@ -1769,20 +1495,15 @@ var GuardService = /*#__PURE__*/function () {
|
|
1769
1495
|
}
|
1770
1496
|
}, _callee3, this);
|
1771
1497
|
}));
|
1772
|
-
|
1773
1498
|
function authRefresh(_x3) {
|
1774
1499
|
return _authRefresh.apply(this, arguments);
|
1775
1500
|
}
|
1776
|
-
|
1777
1501
|
return authRefresh;
|
1778
|
-
}()
|
1779
|
-
|
1780
|
-
|
1781
|
-
|
1782
|
-
|
1783
|
-
*/
|
1784
|
-
;
|
1785
|
-
|
1502
|
+
}() /**
|
1503
|
+
* Call guard to overwrite existing refresh token cookie
|
1504
|
+
*
|
1505
|
+
* @returns void
|
1506
|
+
*/;
|
1786
1507
|
_proto.authLogout =
|
1787
1508
|
/*#__PURE__*/
|
1788
1509
|
function () {
|
@@ -1792,7 +1513,6 @@ var GuardService = /*#__PURE__*/function () {
|
|
1792
1513
|
switch (_context4.prev = _context4.next) {
|
1793
1514
|
case 0:
|
1794
1515
|
return _context4.abrupt("return", this.api.get(this.baseURL + "/v1/auth/logout"));
|
1795
|
-
|
1796
1516
|
case 1:
|
1797
1517
|
case "end":
|
1798
1518
|
return _context4.stop();
|
@@ -1800,21 +1520,16 @@ var GuardService = /*#__PURE__*/function () {
|
|
1800
1520
|
}
|
1801
1521
|
}, _callee4, this);
|
1802
1522
|
}));
|
1803
|
-
|
1804
1523
|
function authLogout() {
|
1805
1524
|
return _authLogout.apply(this, arguments);
|
1806
1525
|
}
|
1807
|
-
|
1808
1526
|
return authLogout;
|
1809
|
-
}()
|
1810
|
-
|
1811
|
-
|
1812
|
-
|
1813
|
-
|
1814
|
-
|
1815
|
-
*/
|
1816
|
-
;
|
1817
|
-
|
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
|
+
*/;
|
1818
1533
|
_proto.authRecover =
|
1819
1534
|
/*#__PURE__*/
|
1820
1535
|
function () {
|
@@ -1824,7 +1539,6 @@ var GuardService = /*#__PURE__*/function () {
|
|
1824
1539
|
switch (_context5.prev = _context5.next) {
|
1825
1540
|
case 0:
|
1826
1541
|
return _context5.abrupt("return", this.api.post(this.baseURL + "/v1/auth/recover", req));
|
1827
|
-
|
1828
1542
|
case 1:
|
1829
1543
|
case "end":
|
1830
1544
|
return _context5.stop();
|
@@ -1832,28 +1546,22 @@ var GuardService = /*#__PURE__*/function () {
|
|
1832
1546
|
}
|
1833
1547
|
}, _callee5, this);
|
1834
1548
|
}));
|
1835
|
-
|
1836
1549
|
function authRecover(_x4) {
|
1837
1550
|
return _authRecover.apply(this, arguments);
|
1838
1551
|
}
|
1839
|
-
|
1840
1552
|
return authRecover;
|
1841
|
-
}()
|
1842
|
-
|
1843
|
-
|
1844
|
-
|
1845
|
-
|
1846
|
-
|
1847
|
-
|
1848
|
-
*/
|
1849
|
-
;
|
1850
|
-
|
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
|
+
*/;
|
1851
1560
|
_proto.identityCreate =
|
1852
1561
|
/*#__PURE__*/
|
1853
1562
|
function () {
|
1854
1563
|
var _identityCreate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(req) {
|
1855
1564
|
var resp, _e$response3, code;
|
1856
|
-
|
1857
1565
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
1858
1566
|
while (1) {
|
1859
1567
|
switch (_context6.prev = _context6.next) {
|
@@ -1861,7 +1569,6 @@ var GuardService = /*#__PURE__*/function () {
|
|
1861
1569
|
_context6.prev = 0;
|
1862
1570
|
_context6.next = 3;
|
1863
1571
|
return this.api.post(this.baseURL + "/v1/identities", req);
|
1864
|
-
|
1865
1572
|
case 3:
|
1866
1573
|
resp = _context6.sent;
|
1867
1574
|
this.api.setTokens({
|
@@ -1869,36 +1576,27 @@ var GuardService = /*#__PURE__*/function () {
|
|
1869
1576
|
});
|
1870
1577
|
_context6.next = 18;
|
1871
1578
|
break;
|
1872
|
-
|
1873
1579
|
case 7:
|
1874
1580
|
_context6.prev = 7;
|
1875
1581
|
_context6.t0 = _context6["catch"](0);
|
1876
|
-
|
1877
1582
|
if (!_context6.t0.isAxiosError) {
|
1878
1583
|
_context6.next = 17;
|
1879
1584
|
break;
|
1880
1585
|
}
|
1881
|
-
|
1882
1586
|
code = (_e$response3 = _context6.t0.response) == null ? void 0 : _e$response3.status;
|
1883
1587
|
_context6.t1 = code;
|
1884
1588
|
_context6.next = _context6.t1 === 400 ? 14 : _context6.t1 === 409 ? 15 : _context6.t1 === 500 ? 16 : 16;
|
1885
1589
|
break;
|
1886
|
-
|
1887
1590
|
case 14:
|
1888
1591
|
throw new IdentityCreationBadRequest();
|
1889
|
-
|
1890
1592
|
case 15:
|
1891
1593
|
throw new IdentityCreationConflict();
|
1892
|
-
|
1893
1594
|
case 16:
|
1894
1595
|
throw new IdentityCreationFailed();
|
1895
|
-
|
1896
1596
|
case 17:
|
1897
1597
|
throw new IdentityCreationFailed();
|
1898
|
-
|
1899
1598
|
case 18:
|
1900
1599
|
return _context6.abrupt("return", resp);
|
1901
|
-
|
1902
1600
|
case 19:
|
1903
1601
|
case "end":
|
1904
1602
|
return _context6.stop();
|
@@ -1906,29 +1604,23 @@ var GuardService = /*#__PURE__*/function () {
|
|
1906
1604
|
}
|
1907
1605
|
}, _callee6, this, [[0, 7]]);
|
1908
1606
|
}));
|
1909
|
-
|
1910
1607
|
function identityCreate(_x5) {
|
1911
1608
|
return _identityCreate.apply(this, arguments);
|
1912
1609
|
}
|
1913
|
-
|
1914
1610
|
return identityCreate;
|
1915
|
-
}()
|
1916
|
-
|
1917
|
-
|
1918
|
-
|
1919
|
-
|
1920
|
-
|
1921
|
-
|
1922
|
-
|
1923
|
-
*/
|
1924
|
-
;
|
1925
|
-
|
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
|
+
*/;
|
1926
1619
|
_proto.identityGet =
|
1927
1620
|
/*#__PURE__*/
|
1928
1621
|
function () {
|
1929
1622
|
var _identityGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(identityID, skipCache) {
|
1930
1623
|
var _tokens$accessToken, _tokens$refreshToken;
|
1931
|
-
|
1932
1624
|
var tokens, cacheKey, identity;
|
1933
1625
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
1934
1626
|
while (1) {
|
@@ -1937,34 +1629,25 @@ var GuardService = /*#__PURE__*/function () {
|
|
1937
1629
|
if (skipCache === void 0) {
|
1938
1630
|
skipCache = false;
|
1939
1631
|
}
|
1940
|
-
|
1941
1632
|
tokens = this.api.getTokens();
|
1942
1633
|
cacheKey = ((_tokens$accessToken = tokens.accessToken) != null ? _tokens$accessToken : '') + ((_tokens$refreshToken = tokens.refreshToken) != null ? _tokens$refreshToken : '') + identityID;
|
1943
|
-
|
1944
1634
|
if (!(skipCache || !tokens.accessToken || !this.identityCache[cacheKey])) {
|
1945
1635
|
_context7.next = 10;
|
1946
1636
|
break;
|
1947
1637
|
}
|
1948
|
-
|
1949
1638
|
_context7.next = 6;
|
1950
1639
|
return this.api.get(this.baseURL + "/v1/identities/" + identityID);
|
1951
|
-
|
1952
1640
|
case 6:
|
1953
1641
|
identity = _context7.sent;
|
1954
|
-
|
1955
1642
|
if (!skipCache) {
|
1956
1643
|
_context7.next = 9;
|
1957
1644
|
break;
|
1958
1645
|
}
|
1959
|
-
|
1960
1646
|
return _context7.abrupt("return", identity);
|
1961
|
-
|
1962
1647
|
case 9:
|
1963
1648
|
this.identityCache[cacheKey] = identity;
|
1964
|
-
|
1965
1649
|
case 10:
|
1966
1650
|
return _context7.abrupt("return", this.identityCache[cacheKey]);
|
1967
|
-
|
1968
1651
|
case 11:
|
1969
1652
|
case "end":
|
1970
1653
|
return _context7.stop();
|
@@ -1972,27 +1655,21 @@ var GuardService = /*#__PURE__*/function () {
|
|
1972
1655
|
}
|
1973
1656
|
}, _callee7, this);
|
1974
1657
|
}));
|
1975
|
-
|
1976
1658
|
function identityGet(_x6, _x7) {
|
1977
1659
|
return _identityGet.apply(this, arguments);
|
1978
1660
|
}
|
1979
|
-
|
1980
1661
|
return identityGet;
|
1981
|
-
}()
|
1982
|
-
|
1983
|
-
|
1984
|
-
|
1985
|
-
|
1986
|
-
|
1987
|
-
*/
|
1988
|
-
;
|
1989
|
-
|
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
|
+
*/;
|
1990
1668
|
_proto.whoAmI =
|
1991
1669
|
/*#__PURE__*/
|
1992
1670
|
function () {
|
1993
1671
|
var _whoAmI = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(refreshCache) {
|
1994
1672
|
var _this$api$getTokens$a;
|
1995
|
-
|
1996
1673
|
var cacheKey;
|
1997
1674
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
1998
1675
|
while (1) {
|
@@ -2001,23 +1678,17 @@ var GuardService = /*#__PURE__*/function () {
|
|
2001
1678
|
if (refreshCache === void 0) {
|
2002
1679
|
refreshCache = false;
|
2003
1680
|
}
|
2004
|
-
|
2005
1681
|
cacheKey = (_this$api$getTokens$a = this.api.getTokens().accessToken) != null ? _this$api$getTokens$a : '';
|
2006
|
-
|
2007
1682
|
if (!(!this.whoAmICache[cacheKey] || refreshCache)) {
|
2008
1683
|
_context8.next = 6;
|
2009
1684
|
break;
|
2010
1685
|
}
|
2011
|
-
|
2012
1686
|
_context8.next = 5;
|
2013
1687
|
return this.api.get(this.baseURL + "/v1/auth/whoami");
|
2014
|
-
|
2015
1688
|
case 5:
|
2016
1689
|
this.whoAmICache[cacheKey] = _context8.sent;
|
2017
|
-
|
2018
1690
|
case 6:
|
2019
1691
|
return _context8.abrupt("return", this.whoAmICache[cacheKey]);
|
2020
|
-
|
2021
1692
|
case 7:
|
2022
1693
|
case "end":
|
2023
1694
|
return _context8.stop();
|
@@ -2025,22 +1696,17 @@ var GuardService = /*#__PURE__*/function () {
|
|
2025
1696
|
}
|
2026
1697
|
}, _callee8, this);
|
2027
1698
|
}));
|
2028
|
-
|
2029
1699
|
function whoAmI(_x8) {
|
2030
1700
|
return _whoAmI.apply(this, arguments);
|
2031
1701
|
}
|
2032
|
-
|
2033
1702
|
return whoAmI;
|
2034
|
-
}()
|
2035
|
-
|
2036
|
-
|
2037
|
-
|
2038
|
-
|
2039
|
-
|
2040
|
-
|
2041
|
-
*/
|
2042
|
-
;
|
2043
|
-
|
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
|
+
*/;
|
2044
1710
|
_proto.identityUpdate =
|
2045
1711
|
/*#__PURE__*/
|
2046
1712
|
function () {
|
@@ -2050,7 +1716,6 @@ var GuardService = /*#__PURE__*/function () {
|
|
2050
1716
|
switch (_context9.prev = _context9.next) {
|
2051
1717
|
case 0:
|
2052
1718
|
return _context9.abrupt("return", this.api.put(this.baseURL + "/v1/identities/" + identityID, req));
|
2053
|
-
|
2054
1719
|
case 1:
|
2055
1720
|
case "end":
|
2056
1721
|
return _context9.stop();
|
@@ -2058,23 +1723,18 @@ var GuardService = /*#__PURE__*/function () {
|
|
2058
1723
|
}
|
2059
1724
|
}, _callee9, this);
|
2060
1725
|
}));
|
2061
|
-
|
2062
1726
|
function identityUpdate(_x9, _x10) {
|
2063
1727
|
return _identityUpdate.apply(this, arguments);
|
2064
1728
|
}
|
2065
|
-
|
2066
1729
|
return identityUpdate;
|
2067
|
-
}()
|
2068
|
-
|
2069
|
-
|
2070
|
-
|
2071
|
-
|
2072
|
-
|
2073
|
-
|
2074
|
-
|
2075
|
-
*/
|
2076
|
-
;
|
2077
|
-
|
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
|
+
*/;
|
2078
1738
|
_proto.identityMFAQRCode =
|
2079
1739
|
/*#__PURE__*/
|
2080
1740
|
function () {
|
@@ -2092,7 +1752,6 @@ var GuardService = /*#__PURE__*/function () {
|
|
2092
1752
|
Accept: 'application/json'
|
2093
1753
|
}
|
2094
1754
|
}));
|
2095
|
-
|
2096
1755
|
case 2:
|
2097
1756
|
case "end":
|
2098
1757
|
return _context10.stop();
|
@@ -2100,21 +1759,16 @@ var GuardService = /*#__PURE__*/function () {
|
|
2100
1759
|
}
|
2101
1760
|
}, _callee10, this);
|
2102
1761
|
}));
|
2103
|
-
|
2104
1762
|
function identityMFAQRCode(_x11, _x12) {
|
2105
1763
|
return _identityMFAQRCode.apply(this, arguments);
|
2106
1764
|
}
|
2107
|
-
|
2108
1765
|
return identityMFAQRCode;
|
2109
|
-
}()
|
2110
|
-
|
2111
|
-
|
2112
|
-
|
2113
|
-
|
2114
|
-
|
2115
|
-
*/
|
2116
|
-
;
|
2117
|
-
|
1766
|
+
}() /**
|
1767
|
+
* Attempt to resend the email confirmation email
|
1768
|
+
*
|
1769
|
+
* @param req IdentityResendConfirmEmailRequest
|
1770
|
+
* @return void
|
1771
|
+
*/;
|
2118
1772
|
_proto.identitySendConfirmEmail =
|
2119
1773
|
/*#__PURE__*/
|
2120
1774
|
function () {
|
@@ -2124,7 +1778,6 @@ var GuardService = /*#__PURE__*/function () {
|
|
2124
1778
|
switch (_context11.prev = _context11.next) {
|
2125
1779
|
case 0:
|
2126
1780
|
return _context11.abrupt("return", this.api.post(this.baseURL + "/v1/identity/confirm", req));
|
2127
|
-
|
2128
1781
|
case 1:
|
2129
1782
|
case "end":
|
2130
1783
|
return _context11.stop();
|
@@ -2132,21 +1785,16 @@ var GuardService = /*#__PURE__*/function () {
|
|
2132
1785
|
}
|
2133
1786
|
}, _callee11, this);
|
2134
1787
|
}));
|
2135
|
-
|
2136
1788
|
function identitySendConfirmEmail(_x13) {
|
2137
1789
|
return _identitySendConfirmEmail.apply(this, arguments);
|
2138
1790
|
}
|
2139
|
-
|
2140
1791
|
return identitySendConfirmEmail;
|
2141
|
-
}()
|
2142
|
-
|
2143
|
-
|
2144
|
-
|
2145
|
-
|
2146
|
-
|
2147
|
-
*/
|
2148
|
-
;
|
2149
|
-
|
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
|
+
*/;
|
2150
1798
|
_proto.identityGetByCustomerEmail =
|
2151
1799
|
/*#__PURE__*/
|
2152
1800
|
function () {
|
@@ -2156,7 +1804,6 @@ var GuardService = /*#__PURE__*/function () {
|
|
2156
1804
|
switch (_context12.prev = _context12.next) {
|
2157
1805
|
case 0:
|
2158
1806
|
return _context12.abrupt("return", this.identityGetByHash(email.substring(email.indexOf('+') + 1, email.indexOf('@'))));
|
2159
|
-
|
2160
1807
|
case 1:
|
2161
1808
|
case "end":
|
2162
1809
|
return _context12.stop();
|
@@ -2164,21 +1811,16 @@ var GuardService = /*#__PURE__*/function () {
|
|
2164
1811
|
}
|
2165
1812
|
}, _callee12, this);
|
2166
1813
|
}));
|
2167
|
-
|
2168
1814
|
function identityGetByCustomerEmail(_x14) {
|
2169
1815
|
return _identityGetByCustomerEmail.apply(this, arguments);
|
2170
1816
|
}
|
2171
|
-
|
2172
1817
|
return identityGetByCustomerEmail;
|
2173
|
-
}()
|
2174
|
-
|
2175
|
-
|
2176
|
-
|
2177
|
-
|
2178
|
-
|
2179
|
-
*/
|
2180
|
-
;
|
2181
|
-
|
1818
|
+
}() /**
|
1819
|
+
* Get an identity using a base64 hash
|
1820
|
+
*
|
1821
|
+
* @param b64Hash base64 hash of the identity
|
1822
|
+
* @returns IdentityResponse
|
1823
|
+
*/;
|
2182
1824
|
_proto.identityGetByHash =
|
2183
1825
|
/*#__PURE__*/
|
2184
1826
|
function () {
|
@@ -2188,7 +1830,6 @@ var GuardService = /*#__PURE__*/function () {
|
|
2188
1830
|
switch (_context13.prev = _context13.next) {
|
2189
1831
|
case 0:
|
2190
1832
|
return _context13.abrupt("return", this.identityGet(b64Hash.replace(/\+/g, '-').replace(/\//g, '_')));
|
2191
|
-
|
2192
1833
|
case 1:
|
2193
1834
|
case "end":
|
2194
1835
|
return _context13.stop();
|
@@ -2196,14 +1837,11 @@ var GuardService = /*#__PURE__*/function () {
|
|
2196
1837
|
}
|
2197
1838
|
}, _callee13, this);
|
2198
1839
|
}));
|
2199
|
-
|
2200
1840
|
function identityGetByHash(_x15) {
|
2201
1841
|
return _identityGetByHash.apply(this, arguments);
|
2202
1842
|
}
|
2203
|
-
|
2204
1843
|
return identityGetByHash;
|
2205
1844
|
}();
|
2206
|
-
|
2207
1845
|
return GuardService;
|
2208
1846
|
}();
|
2209
1847
|
|
@@ -2217,10 +1855,7 @@ var SearchService = /*#__PURE__*/function () {
|
|
2217
1855
|
* @param consultUUID
|
2218
1856
|
* @param terms the search terms to be indexed
|
2219
1857
|
*/
|
2220
|
-
|
2221
|
-
|
2222
1858
|
var _proto = SearchService.prototype;
|
2223
|
-
|
2224
1859
|
_proto.index = function index(consultUUID, terms) {
|
2225
1860
|
return this.api.post(this.baseURL + "/v1/index", {
|
2226
1861
|
consultUUID: consultUUID,
|
@@ -2230,15 +1865,12 @@ var SearchService = /*#__PURE__*/function () {
|
|
2230
1865
|
/**
|
2231
1866
|
* Searches for the consultations corresponding to the search terms entered in the query
|
2232
1867
|
* @param terms array of search terms
|
2233
|
-
|
2234
|
-
;
|
2235
|
-
|
1868
|
+
*/;
|
2236
1869
|
_proto.search = function search(terms) {
|
2237
1870
|
return this.api.post(this.baseURL + "/v1/search", {
|
2238
1871
|
terms: terms
|
2239
1872
|
});
|
2240
1873
|
};
|
2241
|
-
|
2242
1874
|
return SearchService;
|
2243
1875
|
}();
|
2244
1876
|
|
@@ -2255,10 +1887,7 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2255
1887
|
* @param accounts (optional) if set true it the Practice field accounts will be set
|
2256
1888
|
* @returns the found practice or undefined
|
2257
1889
|
*/
|
2258
|
-
|
2259
|
-
|
2260
1890
|
var _proto = PracticeService.prototype;
|
2261
|
-
|
2262
1891
|
_proto.practiceGetFromURL = function practiceGetFromURL(practiceURL, params) {
|
2263
1892
|
return this.api.get(this.baseURL + "/v1/practices", {
|
2264
1893
|
params: _extends({
|
@@ -2266,7 +1895,6 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2266
1895
|
}, params)
|
2267
1896
|
});
|
2268
1897
|
};
|
2269
|
-
|
2270
1898
|
_proto.practiceGetFromUuid = function practiceGetFromUuid(practiceUuid, locale, withAccounts) {
|
2271
1899
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid, {
|
2272
1900
|
params: {
|
@@ -2274,15 +1902,13 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2274
1902
|
accounts: withAccounts
|
2275
1903
|
}
|
2276
1904
|
});
|
2277
|
-
}
|
2278
|
-
|
1905
|
+
}
|
1906
|
+
/// Practice Configs
|
2279
1907
|
/**
|
2280
1908
|
* This function retrieves all configs of a specific practice
|
2281
1909
|
* @param practiceUuid uuid of the practice
|
2282
1910
|
* @returns the practice configs
|
2283
|
-
|
2284
|
-
;
|
2285
|
-
|
1911
|
+
*/;
|
2286
1912
|
_proto.practiceConfigGetFromPracticeUuid = function practiceConfigGetFromPracticeUuid(practiceUuid) {
|
2287
1913
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/configs");
|
2288
1914
|
}
|
@@ -2291,9 +1917,7 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2291
1917
|
* @param practiceUuid uuid of the practice
|
2292
1918
|
* @param kind of the config
|
2293
1919
|
* @returns the practice config
|
2294
|
-
|
2295
|
-
;
|
2296
|
-
|
1920
|
+
*/;
|
2297
1921
|
_proto.practiceConfigGetByKindForPracticeUuid = function practiceConfigGetByKindForPracticeUuid(practiceUuid, kind) {
|
2298
1922
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/configs/" + kind);
|
2299
1923
|
}
|
@@ -2302,9 +1926,7 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2302
1926
|
* @param practiceUuid uuid of the practice
|
2303
1927
|
* @param config the config to add to the practice
|
2304
1928
|
* @returns the created practice config
|
2305
|
-
|
2306
|
-
;
|
2307
|
-
|
1929
|
+
*/;
|
2308
1930
|
_proto.practiceConfigCreateForPracticeUuid = function practiceConfigCreateForPracticeUuid(practiceUuid, config) {
|
2309
1931
|
return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/configs", config);
|
2310
1932
|
}
|
@@ -2313,18 +1935,15 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2313
1935
|
* @param practiceUuid uuid of the practice
|
2314
1936
|
* @param config the config to update
|
2315
1937
|
* @returns the practice config
|
2316
|
-
|
2317
|
-
;
|
2318
|
-
|
1938
|
+
*/;
|
2319
1939
|
_proto.practiceConfigUpdate = function practiceConfigUpdate(config) {
|
2320
1940
|
return this.api.put(this.baseURL + "/v1/practices/" + config.uuidPractice + "/configs/" + config.kind, config);
|
2321
|
-
}
|
1941
|
+
}
|
1942
|
+
/// Accounts
|
2322
1943
|
;
|
2323
|
-
|
2324
1944
|
_proto.practiceGetAccounts = function practiceGetAccounts(practiceUuid) {
|
2325
1945
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/accounts");
|
2326
1946
|
};
|
2327
|
-
|
2328
1947
|
_proto.practiceGetAccount = function practiceGetAccount(practiceUuid, accountUuid) {
|
2329
1948
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/accounts/" + accountUuid);
|
2330
1949
|
}
|
@@ -2333,9 +1952,7 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2333
1952
|
* @param practiceUuid the uuid of the practice
|
2334
1953
|
* @param kind (optional) the kind of WorkflowType to filter in
|
2335
1954
|
* @returns a list of PracticeWorkflow
|
2336
|
-
|
2337
|
-
;
|
2338
|
-
|
1955
|
+
*/;
|
2339
1956
|
_proto.practiceGetWorkflows = function practiceGetWorkflows(practiceUuid, kind) {
|
2340
1957
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/workflows", {
|
2341
1958
|
params: {
|
@@ -2343,12 +1960,11 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2343
1960
|
}
|
2344
1961
|
});
|
2345
1962
|
};
|
2346
|
-
|
2347
1963
|
_proto.practiceGetWorkflow = function practiceGetWorkflow(practiceUuid, workflowType) {
|
2348
1964
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/workflows/" + workflowType);
|
2349
|
-
}
|
1965
|
+
}
|
1966
|
+
/// Plans
|
2350
1967
|
;
|
2351
|
-
|
2352
1968
|
_proto.practiceGetPlans = function practiceGetPlans(practiceUuid, planType) {
|
2353
1969
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/plans", {
|
2354
1970
|
params: {
|
@@ -2356,33 +1972,32 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2356
1972
|
}
|
2357
1973
|
});
|
2358
1974
|
};
|
2359
|
-
|
2360
1975
|
_proto.practiceGetPlan = function practiceGetPlan(practiceUuid, planId) {
|
2361
1976
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/plans/" + planId);
|
2362
1977
|
};
|
2363
|
-
|
2364
1978
|
_proto.practiceGetPlanPrices = function practiceGetPlanPrices(practiceUuid, planId) {
|
2365
1979
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/plans/" + planId + "/prices");
|
2366
|
-
}
|
1980
|
+
}
|
1981
|
+
// Payments
|
2367
1982
|
;
|
2368
|
-
|
2369
|
-
_proto.practiceGetPayments = function practiceGetPayments(practiceUuid, planType) {
|
1983
|
+
_proto.practiceGetPayments = function practiceGetPayments(practiceUuid, statusPayment, withConsultUUIDNULL, perPage, indexPage) {
|
2370
1984
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments", {
|
2371
1985
|
params: {
|
2372
|
-
|
1986
|
+
status: statusPayment,
|
1987
|
+
withConsultUUIDNULL: withConsultUUIDNULL,
|
1988
|
+
perPage: perPage,
|
1989
|
+
indexPage: indexPage
|
2373
1990
|
}
|
2374
1991
|
});
|
2375
1992
|
};
|
2376
|
-
|
2377
1993
|
_proto.practiceGetPayment = function practiceGetPayment(practiceUuid, idStripeInvoiceOrPaymentIntent) {
|
2378
1994
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/" + idStripeInvoiceOrPaymentIntent);
|
2379
1995
|
};
|
2380
|
-
|
2381
1996
|
_proto.practiceGetPaymentForStripePaymentIntentWithID = function practiceGetPaymentForStripePaymentIntentWithID(practiceUuid, stripePaymentIntentId) {
|
2382
1997
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/" + stripePaymentIntentId);
|
2383
|
-
}
|
1998
|
+
}
|
1999
|
+
// Payments Intent
|
2384
2000
|
;
|
2385
|
-
|
2386
2001
|
_proto.practiceGetPaymentsIntents = function practiceGetPaymentsIntents(practiceUuid, planType) {
|
2387
2002
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents", {
|
2388
2003
|
params: {
|
@@ -2394,9 +2009,7 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2394
2009
|
* This function return the user hased email to be use for creating payment intent
|
2395
2010
|
* @param email the email to hash
|
2396
2011
|
* @returns a hashed email
|
2397
|
-
|
2398
|
-
;
|
2399
|
-
|
2012
|
+
*/;
|
2400
2013
|
_proto.getPaymentIntentHashedEmail = function getPaymentIntentHashedEmail(email) {
|
2401
2014
|
return hashToBase64String(email.toLowerCase());
|
2402
2015
|
}
|
@@ -2410,9 +2023,7 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2410
2023
|
* @param promotionCode (optional) promotion code to apply
|
2411
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.).
|
2412
2025
|
* @returns
|
2413
|
-
|
2414
|
-
;
|
2415
|
-
|
2026
|
+
*/;
|
2416
2027
|
_proto.practiceCreatePaymentsIntent = function practiceCreatePaymentsIntent(practiceUuid, planId, userEmail, isoLocality, url_subdomain, requestMetadata) {
|
2417
2028
|
return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/", {
|
2418
2029
|
idPlan: planId,
|
@@ -2425,7 +2036,6 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2425
2036
|
}
|
2426
2037
|
});
|
2427
2038
|
};
|
2428
|
-
|
2429
2039
|
_proto.practiceGetPaymentsIntent = function practiceGetPaymentsIntent(practiceUuid, paymentIntentId) {
|
2430
2040
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/" + paymentIntentId);
|
2431
2041
|
}
|
@@ -2438,9 +2048,7 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2438
2048
|
* @param promotionCode (optional) promotional code to apply
|
2439
2049
|
* @param finalize (optional) if true will finalize the PracticePaymentIntent and related Stripe.Invoice. Once, finalized you cannot modify the PracticePaymentIntent anymore.
|
2440
2050
|
* @returns the updated PracticePaymentIntent
|
2441
|
-
|
2442
|
-
;
|
2443
|
-
|
2051
|
+
*/;
|
2444
2052
|
_proto.practiceUpdatePaymentsIntent = function practiceUpdatePaymentsIntent(practiceUuid, idPraticePaymentIntent, practicePaymentIntent, userEmail, promotionCode, finalize) {
|
2445
2053
|
return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/" + idPraticePaymentIntent, _extends({}, practicePaymentIntent, {
|
2446
2054
|
hashUserEmail: userEmail ? this.getPaymentIntentHashedEmail(userEmail) : undefined
|
@@ -2455,125 +2063,103 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2455
2063
|
* Invoice
|
2456
2064
|
* @param practiceUuid UUID of the practice to get the invoice from
|
2457
2065
|
* @param invoiceId ID of the invoice in stripe
|
2458
|
-
|
2459
|
-
;
|
2460
|
-
|
2066
|
+
*/;
|
2461
2067
|
_proto.getInvoice = function getInvoice(practiceUuid, invoiceId) {
|
2462
2068
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/invoices/" + invoiceId);
|
2463
|
-
}
|
2069
|
+
}
|
2070
|
+
// Practitioner
|
2464
2071
|
;
|
2465
|
-
|
2466
2072
|
_proto.practiceGetPractitioners = function practiceGetPractitioners(practiceUuid) {
|
2467
2073
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners");
|
2468
2074
|
};
|
2469
|
-
|
2470
2075
|
_proto.practiceUpdatePractitioner = function practiceUpdatePractitioner(practiceUuid, practitionerUuid, requestBody) {
|
2471
2076
|
return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid, requestBody);
|
2472
2077
|
};
|
2473
|
-
|
2474
2078
|
_proto.practiceGetPractitioner = function practiceGetPractitioner(practiceUuid, practitionerUuid) {
|
2475
2079
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid);
|
2476
|
-
}
|
2080
|
+
}
|
2081
|
+
// Practitioner Licenses
|
2477
2082
|
;
|
2478
|
-
|
2479
2083
|
_proto.practiceGetPractitionerLicenses = function practiceGetPractitionerLicenses(practiceUuid, practitionerUuid) {
|
2480
2084
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses");
|
2481
2085
|
};
|
2482
|
-
|
2483
2086
|
_proto.practiceCreatePractitionerLicense = function practiceCreatePractitionerLicense(practiceUuid, practitionerUuid, requestBody) {
|
2484
2087
|
return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses", requestBody);
|
2485
2088
|
};
|
2486
|
-
|
2487
2089
|
_proto.practiceUpdatePractitionerLicense = function practiceUpdatePractitionerLicense(practiceUuid, practitionerUuid, licenseId, requestBody) {
|
2488
2090
|
return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses/" + licenseId, requestBody);
|
2489
2091
|
};
|
2490
|
-
|
2491
2092
|
_proto.practiceGetPractitionerLicense = function practiceGetPractitionerLicense(practiceUuid, practitionerUuid, licenseId) {
|
2492
2093
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses/" + licenseId);
|
2493
|
-
}
|
2094
|
+
}
|
2095
|
+
// Practitioner Preferences
|
2494
2096
|
;
|
2495
|
-
|
2496
2097
|
_proto.practiceGetPractitionerPreferences = function practiceGetPractitionerPreferences(practiceUuid, practitionerUuid) {
|
2497
2098
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences");
|
2498
2099
|
};
|
2499
|
-
|
2500
2100
|
_proto.practiceCreatePractitionerPreference = function practiceCreatePractitionerPreference(practiceUuid, practitionerUuid, requestBody) {
|
2501
2101
|
return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences", requestBody);
|
2502
2102
|
};
|
2503
|
-
|
2504
2103
|
_proto.practiceUpdatePractitionerPreference = function practiceUpdatePractitionerPreference(practiceUuid, practitionerUuid, preferenceId, requestBody) {
|
2505
2104
|
return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences/" + preferenceId, requestBody);
|
2506
2105
|
};
|
2507
|
-
|
2508
2106
|
_proto.practiceGetPractitionerPreference = function practiceGetPractitionerPreference(practiceUuid, practitionerUuid, preferenceId) {
|
2509
2107
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences/" + preferenceId);
|
2510
|
-
}
|
2108
|
+
}
|
2109
|
+
// Practitioner Roles
|
2511
2110
|
;
|
2512
|
-
|
2513
2111
|
_proto.practiceGetPractitionerRoles = function practiceGetPractitionerRoles(practiceUuid, practitionerUuid) {
|
2514
2112
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles");
|
2515
2113
|
};
|
2516
|
-
|
2517
2114
|
_proto.practiceCreatePractitionerRole = function practiceCreatePractitionerRole(practiceUuid, practitionerUuid, requestBody) {
|
2518
2115
|
return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles", requestBody);
|
2519
2116
|
};
|
2520
|
-
|
2521
2117
|
_proto.practiceDeletePractitionerRoles = function practiceDeletePractitionerRoles(practiceUuid, practitionerUuid) {
|
2522
2118
|
return this.api.deleteRequest(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles");
|
2523
2119
|
};
|
2524
|
-
|
2525
2120
|
_proto.practiceUpdatePractitionerRole = function practiceUpdatePractitionerRole(practiceUuid, practitionerUuid, roleId, requestBody) {
|
2526
2121
|
return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles/" + roleId, requestBody);
|
2527
2122
|
};
|
2528
|
-
|
2529
2123
|
_proto.practiceGetPractitionerRole = function practiceGetPractitionerRole(practiceUuid, practitionerUuid, roleId) {
|
2530
2124
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles/" + roleId);
|
2531
2125
|
};
|
2532
|
-
|
2533
2126
|
_proto.practiceDeletePractitionerRole = function practiceDeletePractitionerRole(practiceUuid, practitionerUuid, roleId) {
|
2534
2127
|
return this.api.deleteRequest(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles/" + roleId);
|
2535
|
-
}
|
2536
|
-
|
2128
|
+
}
|
2129
|
+
// Practitioner signature
|
2537
2130
|
/**
|
2538
2131
|
* This function returns the practitioner's signature as a Blob
|
2539
2132
|
* @param practiceUuid the practice uuid of the practitioner
|
2540
2133
|
* @param practitionerUuid the practitioner uuid
|
2541
2134
|
* @returns a blob representing the signature
|
2542
|
-
|
2543
|
-
;
|
2544
|
-
|
2135
|
+
*/;
|
2545
2136
|
_proto.practiceGetPractitionerSignature = function practiceGetPractitionerSignature(practiceUuid, practitionerUuid) {
|
2546
2137
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/signature", {
|
2547
2138
|
responseType: 'blob'
|
2548
2139
|
});
|
2549
|
-
}
|
2140
|
+
}
|
2141
|
+
// Assignments
|
2550
2142
|
;
|
2551
|
-
|
2552
2143
|
_proto.practiceGetAssignments = function practiceGetAssignments(practiceUuid) {
|
2553
2144
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments");
|
2554
2145
|
};
|
2555
|
-
|
2556
2146
|
_proto.practiceCreateAssignment = function practiceCreateAssignment(practiceUuid, requestBody) {
|
2557
2147
|
return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments", requestBody);
|
2558
2148
|
};
|
2559
|
-
|
2560
2149
|
_proto.practiceUpdateAssignment = function practiceUpdateAssignment(practiceUuid, assignmentId, requestBody) {
|
2561
2150
|
return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments/" + assignmentId, requestBody);
|
2562
2151
|
};
|
2563
|
-
|
2564
2152
|
_proto.practiceGetAssignment = function practiceGetAssignment(practiceUuid, assignmentId) {
|
2565
2153
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments/" + assignmentId);
|
2566
|
-
}
|
2154
|
+
}
|
2155
|
+
// Quotas
|
2567
2156
|
;
|
2568
|
-
|
2569
2157
|
_proto.practiceGetQuotas = function practiceGetQuotas(practiceUuid) {
|
2570
2158
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/quotas");
|
2571
2159
|
};
|
2572
|
-
|
2573
2160
|
_proto.practiceGetQuota = function practiceGetQuota(practiceUuid, quotaId) {
|
2574
2161
|
return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/quotas/" + quotaId);
|
2575
2162
|
};
|
2576
|
-
|
2577
2163
|
return PracticeService;
|
2578
2164
|
}();
|
2579
2165
|
|
@@ -2582,9 +2168,7 @@ var TellerService = /*#__PURE__*/function () {
|
|
2582
2168
|
this.api = api;
|
2583
2169
|
this.baseURL = baseURL;
|
2584
2170
|
}
|
2585
|
-
|
2586
2171
|
var _proto = TellerService.prototype;
|
2587
|
-
|
2588
2172
|
_proto.lockboxDataStore = /*#__PURE__*/function () {
|
2589
2173
|
var _lockboxDataStore = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(lockboxUuid, req, lockboxOwnerUuid, previousDataUuid) {
|
2590
2174
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -2597,7 +2181,6 @@ var TellerService = /*#__PURE__*/function () {
|
|
2597
2181
|
data_uuid: previousDataUuid
|
2598
2182
|
}
|
2599
2183
|
}));
|
2600
|
-
|
2601
2184
|
case 1:
|
2602
2185
|
case "end":
|
2603
2186
|
return _context.stop();
|
@@ -2605,14 +2188,11 @@ var TellerService = /*#__PURE__*/function () {
|
|
2605
2188
|
}
|
2606
2189
|
}, _callee, this);
|
2607
2190
|
}));
|
2608
|
-
|
2609
2191
|
function lockboxDataStore(_x, _x2, _x3, _x4) {
|
2610
2192
|
return _lockboxDataStore.apply(this, arguments);
|
2611
2193
|
}
|
2612
|
-
|
2613
2194
|
return lockboxDataStore;
|
2614
2195
|
}();
|
2615
|
-
|
2616
2196
|
_proto.updateConsultByUUID = function updateConsultByUUID(patientUuid, uuidConsult, statusMedical, closedReasonType, closedReasonDescription, neverExpires) {
|
2617
2197
|
return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult, {
|
2618
2198
|
patientUuid: patientUuid,
|
@@ -2630,9 +2210,7 @@ var TellerService = /*#__PURE__*/function () {
|
|
2630
2210
|
* @param consultationShortId the consultation short id
|
2631
2211
|
* @param fax the address where to send the fax
|
2632
2212
|
* @returns void
|
2633
|
-
|
2634
|
-
;
|
2635
|
-
|
2213
|
+
*/;
|
2636
2214
|
_proto.notifyFaxFailed = function notifyFaxFailed(practiceUuid, consultationUuid, consultationShortId, fax) {
|
2637
2215
|
return this.api.post(this.baseURL + "/v1/fax-failed", {
|
2638
2216
|
consultationUuid: consultationUuid,
|
@@ -2649,9 +2227,7 @@ var TellerService = /*#__PURE__*/function () {
|
|
2649
2227
|
* @todo - Make service only exposed route
|
2650
2228
|
* @param uuidConsult the uuid of the consult to reassign
|
2651
2229
|
* @param newPractitionerUuid the uuid of the practitioner that will get reassigned
|
2652
|
-
|
2653
|
-
;
|
2654
|
-
|
2230
|
+
*/;
|
2655
2231
|
_proto.reassignmentEmail = function reassignmentEmail(uuidConsult, newPractitionerUuid) {
|
2656
2232
|
return this.api.post(this.baseURL + "/v1/consult/" + uuidConsult + "/reassignment-email", {
|
2657
2233
|
newPractitionerUuid: newPractitionerUuid
|
@@ -2663,9 +2239,7 @@ var TellerService = /*#__PURE__*/function () {
|
|
2663
2239
|
* @param consult
|
2664
2240
|
* @param patientUuid
|
2665
2241
|
* @returns void
|
2666
|
-
|
2667
|
-
;
|
2668
|
-
|
2242
|
+
*/;
|
2669
2243
|
_proto.sendOnlineFaxSuccessfulEmail = function sendOnlineFaxSuccessfulEmail(consult, patientUuid) {
|
2670
2244
|
return this.api.post(this.baseURL + "/v1/online-fax-notify", {
|
2671
2245
|
consult: consult,
|
@@ -2676,13 +2250,10 @@ var TellerService = /*#__PURE__*/function () {
|
|
2676
2250
|
* This function will send an email to patient to allow them to resume the consult.
|
2677
2251
|
* @param req the body of the resume consult request
|
2678
2252
|
* @returns void
|
2679
|
-
|
2680
|
-
;
|
2681
|
-
|
2253
|
+
*/;
|
2682
2254
|
_proto.sendResumeConsultEmail = function sendResumeConsultEmail(req) {
|
2683
2255
|
return this.api.post(this.baseURL + "/v1/resume-consult-email", req);
|
2684
2256
|
};
|
2685
|
-
|
2686
2257
|
return TellerService;
|
2687
2258
|
}();
|
2688
2259
|
|
@@ -2691,9 +2262,7 @@ var VaultService = /*#__PURE__*/function () {
|
|
2691
2262
|
this.api = api;
|
2692
2263
|
this.baseURL = baseURL;
|
2693
2264
|
}
|
2694
|
-
|
2695
2265
|
var _proto = VaultService.prototype;
|
2696
|
-
|
2697
2266
|
_proto.lockboxCreate = /*#__PURE__*/function () {
|
2698
2267
|
var _lockboxCreate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(lockboxMetadata) {
|
2699
2268
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -2701,7 +2270,6 @@ var VaultService = /*#__PURE__*/function () {
|
|
2701
2270
|
switch (_context.prev = _context.next) {
|
2702
2271
|
case 0:
|
2703
2272
|
return _context.abrupt("return", this.api.post(this.baseURL + "/v1/lockbox", lockboxMetadata));
|
2704
|
-
|
2705
2273
|
case 1:
|
2706
2274
|
case "end":
|
2707
2275
|
return _context.stop();
|
@@ -2709,14 +2277,11 @@ var VaultService = /*#__PURE__*/function () {
|
|
2709
2277
|
}
|
2710
2278
|
}, _callee, this);
|
2711
2279
|
}));
|
2712
|
-
|
2713
2280
|
function lockboxCreate(_x) {
|
2714
2281
|
return _lockboxCreate.apply(this, arguments);
|
2715
2282
|
}
|
2716
|
-
|
2717
2283
|
return lockboxCreate;
|
2718
2284
|
}();
|
2719
|
-
|
2720
2285
|
_proto.lockboxMetadataAdd = /*#__PURE__*/function () {
|
2721
2286
|
var _lockboxMetadataAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(lockboxUuid, lockboxMetadata, lockboxOwnerUuid) {
|
2722
2287
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
@@ -2728,7 +2293,6 @@ var VaultService = /*#__PURE__*/function () {
|
|
2728
2293
|
lockbox_owner_uuid: lockboxOwnerUuid
|
2729
2294
|
}
|
2730
2295
|
}));
|
2731
|
-
|
2732
2296
|
case 1:
|
2733
2297
|
case "end":
|
2734
2298
|
return _context2.stop();
|
@@ -2736,14 +2300,11 @@ var VaultService = /*#__PURE__*/function () {
|
|
2736
2300
|
}
|
2737
2301
|
}, _callee2, this);
|
2738
2302
|
}));
|
2739
|
-
|
2740
2303
|
function lockboxMetadataAdd(_x2, _x3, _x4) {
|
2741
2304
|
return _lockboxMetadataAdd.apply(this, arguments);
|
2742
2305
|
}
|
2743
|
-
|
2744
2306
|
return lockboxMetadataAdd;
|
2745
2307
|
}();
|
2746
|
-
|
2747
2308
|
_proto.lockboxSecretGet = /*#__PURE__*/function () {
|
2748
2309
|
var _lockboxSecretGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(lockboxUuid, lockboxOwnerUuid) {
|
2749
2310
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
@@ -2755,7 +2316,6 @@ var VaultService = /*#__PURE__*/function () {
|
|
2755
2316
|
lockbox_owner_uuid: lockboxOwnerUuid
|
2756
2317
|
}
|
2757
2318
|
}));
|
2758
|
-
|
2759
2319
|
case 1:
|
2760
2320
|
case "end":
|
2761
2321
|
return _context3.stop();
|
@@ -2763,14 +2323,11 @@ var VaultService = /*#__PURE__*/function () {
|
|
2763
2323
|
}
|
2764
2324
|
}, _callee3, this);
|
2765
2325
|
}));
|
2766
|
-
|
2767
2326
|
function lockboxSecretGet(_x5, _x6) {
|
2768
2327
|
return _lockboxSecretGet.apply(this, arguments);
|
2769
2328
|
}
|
2770
|
-
|
2771
2329
|
return lockboxSecretGet;
|
2772
2330
|
}();
|
2773
|
-
|
2774
2331
|
_proto.lockboxGrant = /*#__PURE__*/function () {
|
2775
2332
|
var _lockboxGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(lockboxUuid, req, lockboxOwnerUuid) {
|
2776
2333
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
@@ -2782,7 +2339,6 @@ var VaultService = /*#__PURE__*/function () {
|
|
2782
2339
|
lockbox_owner_uuid: lockboxOwnerUuid
|
2783
2340
|
}
|
2784
2341
|
}));
|
2785
|
-
|
2786
2342
|
case 1:
|
2787
2343
|
case "end":
|
2788
2344
|
return _context4.stop();
|
@@ -2790,20 +2346,15 @@ var VaultService = /*#__PURE__*/function () {
|
|
2790
2346
|
}
|
2791
2347
|
}, _callee4, this);
|
2792
2348
|
}));
|
2793
|
-
|
2794
2349
|
function lockboxGrant(_x7, _x8, _x9) {
|
2795
2350
|
return _lockboxGrant.apply(this, arguments);
|
2796
2351
|
}
|
2797
|
-
|
2798
2352
|
return lockboxGrant;
|
2799
|
-
}()
|
2800
|
-
|
2801
|
-
|
2802
|
-
|
2803
|
-
|
2804
|
-
*/
|
2805
|
-
;
|
2806
|
-
|
2353
|
+
}() /**
|
2354
|
+
* Get all lockboxes granted to user
|
2355
|
+
* @param filter filter of lockbox metadata
|
2356
|
+
* @returns decrypted lockboxes granted to user
|
2357
|
+
*/;
|
2807
2358
|
_proto.grantsGet =
|
2808
2359
|
/*#__PURE__*/
|
2809
2360
|
function () {
|
@@ -2813,7 +2364,6 @@ var VaultService = /*#__PURE__*/function () {
|
|
2813
2364
|
switch (_context5.prev = _context5.next) {
|
2814
2365
|
case 0:
|
2815
2366
|
return _context5.abrupt("return", this.api.get(this.baseURL + "/v1/grants"));
|
2816
|
-
|
2817
2367
|
case 1:
|
2818
2368
|
case "end":
|
2819
2369
|
return _context5.stop();
|
@@ -2821,25 +2371,20 @@ var VaultService = /*#__PURE__*/function () {
|
|
2821
2371
|
}
|
2822
2372
|
}, _callee5, this);
|
2823
2373
|
}));
|
2824
|
-
|
2825
2374
|
function grantsGet() {
|
2826
2375
|
return _grantsGet.apply(this, arguments);
|
2827
2376
|
}
|
2828
|
-
|
2829
2377
|
return grantsGet;
|
2830
|
-
}()
|
2831
|
-
|
2832
|
-
|
2833
|
-
|
2834
|
-
|
2835
|
-
|
2836
|
-
|
2837
|
-
|
2838
|
-
|
2839
|
-
|
2840
|
-
*/
|
2841
|
-
;
|
2842
|
-
|
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
|
+
*/;
|
2843
2388
|
_proto.lockboxDataStore =
|
2844
2389
|
/*#__PURE__*/
|
2845
2390
|
function () {
|
@@ -2854,7 +2399,6 @@ var VaultService = /*#__PURE__*/function () {
|
|
2854
2399
|
data_uuid: previousDataUuid
|
2855
2400
|
}
|
2856
2401
|
}));
|
2857
|
-
|
2858
2402
|
case 1:
|
2859
2403
|
case "end":
|
2860
2404
|
return _context6.stop();
|
@@ -2862,14 +2406,11 @@ var VaultService = /*#__PURE__*/function () {
|
|
2862
2406
|
}
|
2863
2407
|
}, _callee6, this);
|
2864
2408
|
}));
|
2865
|
-
|
2866
2409
|
function lockboxDataStore(_x10, _x11, _x12, _x13) {
|
2867
2410
|
return _lockboxDataStore.apply(this, arguments);
|
2868
2411
|
}
|
2869
|
-
|
2870
2412
|
return lockboxDataStore;
|
2871
2413
|
}();
|
2872
|
-
|
2873
2414
|
_proto.lockboxDataGet = /*#__PURE__*/function () {
|
2874
2415
|
var _lockboxDataGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(lockboxUuid, dataUuid, lockboxOwnerUuid, stream) {
|
2875
2416
|
var data;
|
@@ -2880,7 +2421,6 @@ var VaultService = /*#__PURE__*/function () {
|
|
2880
2421
|
if (stream === void 0) {
|
2881
2422
|
stream = true;
|
2882
2423
|
}
|
2883
|
-
|
2884
2424
|
_context7.next = 3;
|
2885
2425
|
return this.api.get(this.baseURL + "/v1/lockboxes/" + lockboxUuid + "/data/" + dataUuid, {
|
2886
2426
|
params: {
|
@@ -2888,22 +2428,17 @@ var VaultService = /*#__PURE__*/function () {
|
|
2888
2428
|
stream: stream
|
2889
2429
|
}
|
2890
2430
|
});
|
2891
|
-
|
2892
2431
|
case 3:
|
2893
2432
|
data = _context7.sent;
|
2894
|
-
|
2895
2433
|
if (!stream) {
|
2896
2434
|
_context7.next = 6;
|
2897
2435
|
break;
|
2898
2436
|
}
|
2899
|
-
|
2900
2437
|
return _context7.abrupt("return", {
|
2901
2438
|
data: data
|
2902
2439
|
});
|
2903
|
-
|
2904
2440
|
case 6:
|
2905
2441
|
return _context7.abrupt("return", data);
|
2906
|
-
|
2907
2442
|
case 7:
|
2908
2443
|
case "end":
|
2909
2444
|
return _context7.stop();
|
@@ -2911,14 +2446,11 @@ var VaultService = /*#__PURE__*/function () {
|
|
2911
2446
|
}
|
2912
2447
|
}, _callee7, this);
|
2913
2448
|
}));
|
2914
|
-
|
2915
2449
|
function lockboxDataGet(_x14, _x15, _x16, _x17) {
|
2916
2450
|
return _lockboxDataGet.apply(this, arguments);
|
2917
2451
|
}
|
2918
|
-
|
2919
2452
|
return lockboxDataGet;
|
2920
2453
|
}();
|
2921
|
-
|
2922
2454
|
_proto.lockboxManifestGet = /*#__PURE__*/function () {
|
2923
2455
|
var _lockboxManifestGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(lockboxUuid, filter, lockboxOwnerUuid) {
|
2924
2456
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
@@ -2931,7 +2463,6 @@ var VaultService = /*#__PURE__*/function () {
|
|
2931
2463
|
filter: filter
|
2932
2464
|
}
|
2933
2465
|
}));
|
2934
|
-
|
2935
2466
|
case 1:
|
2936
2467
|
case "end":
|
2937
2468
|
return _context8.stop();
|
@@ -2939,14 +2470,11 @@ var VaultService = /*#__PURE__*/function () {
|
|
2939
2470
|
}
|
2940
2471
|
}, _callee8, this);
|
2941
2472
|
}));
|
2942
|
-
|
2943
2473
|
function lockboxManifestGet(_x18, _x19, _x20) {
|
2944
2474
|
return _lockboxManifestGet.apply(this, arguments);
|
2945
2475
|
}
|
2946
|
-
|
2947
2476
|
return lockboxManifestGet;
|
2948
2477
|
}();
|
2949
|
-
|
2950
2478
|
_proto.lockboxMetadataGet = /*#__PURE__*/function () {
|
2951
2479
|
var _lockboxMetadataGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(lockboxUuid, fields, groupby, filter, lockboxOwnerUuid) {
|
2952
2480
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
@@ -2961,7 +2489,6 @@ var VaultService = /*#__PURE__*/function () {
|
|
2961
2489
|
filter: filter
|
2962
2490
|
}
|
2963
2491
|
}));
|
2964
|
-
|
2965
2492
|
case 1:
|
2966
2493
|
case "end":
|
2967
2494
|
return _context9.stop();
|
@@ -2969,22 +2496,17 @@ var VaultService = /*#__PURE__*/function () {
|
|
2969
2496
|
}
|
2970
2497
|
}, _callee9, this);
|
2971
2498
|
}));
|
2972
|
-
|
2973
2499
|
function lockboxMetadataGet(_x21, _x22, _x23, _x24, _x25) {
|
2974
2500
|
return _lockboxMetadataGet.apply(this, arguments);
|
2975
2501
|
}
|
2976
|
-
|
2977
2502
|
return lockboxMetadataGet;
|
2978
|
-
}()
|
2979
|
-
|
2980
|
-
|
2981
|
-
|
2982
|
-
|
2983
|
-
|
2984
|
-
|
2985
|
-
*/
|
2986
|
-
;
|
2987
|
-
|
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
|
+
*/;
|
2988
2510
|
_proto.vaultIndexPut =
|
2989
2511
|
/*#__PURE__*/
|
2990
2512
|
function () {
|
@@ -2998,7 +2520,6 @@ var VaultService = /*#__PURE__*/function () {
|
|
2998
2520
|
index_owner_uuid: indexOwnerUuid
|
2999
2521
|
}
|
3000
2522
|
}));
|
3001
|
-
|
3002
2523
|
case 1:
|
3003
2524
|
case "end":
|
3004
2525
|
return _context10.stop();
|
@@ -3006,20 +2527,15 @@ var VaultService = /*#__PURE__*/function () {
|
|
3006
2527
|
}
|
3007
2528
|
}, _callee10, this);
|
3008
2529
|
}));
|
3009
|
-
|
3010
2530
|
function vaultIndexPut(_x26, _x27) {
|
3011
2531
|
return _vaultIndexPut.apply(this, arguments);
|
3012
2532
|
}
|
3013
|
-
|
3014
2533
|
return vaultIndexPut;
|
3015
|
-
}()
|
3016
|
-
|
3017
|
-
|
3018
|
-
|
3019
|
-
|
3020
|
-
*/
|
3021
|
-
;
|
3022
|
-
|
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
|
+
*/;
|
3023
2539
|
_proto.vaultIndexSnapshotPut =
|
3024
2540
|
/*#__PURE__*/
|
3025
2541
|
function () {
|
@@ -3029,7 +2545,6 @@ var VaultService = /*#__PURE__*/function () {
|
|
3029
2545
|
switch (_context11.prev = _context11.next) {
|
3030
2546
|
case 0:
|
3031
2547
|
return _context11.abrupt("return", this.api.put(this.baseURL + "/v1/index-snapshot", entry));
|
3032
|
-
|
3033
2548
|
case 1:
|
3034
2549
|
case "end":
|
3035
2550
|
return _context11.stop();
|
@@ -3037,23 +2552,18 @@ var VaultService = /*#__PURE__*/function () {
|
|
3037
2552
|
}
|
3038
2553
|
}, _callee11, this);
|
3039
2554
|
}));
|
3040
|
-
|
3041
2555
|
function vaultIndexSnapshotPut(_x28) {
|
3042
2556
|
return _vaultIndexSnapshotPut.apply(this, arguments);
|
3043
2557
|
}
|
3044
|
-
|
3045
2558
|
return vaultIndexSnapshotPut;
|
3046
|
-
}()
|
3047
|
-
|
3048
|
-
|
3049
|
-
|
3050
|
-
|
3051
|
-
|
3052
|
-
|
3053
|
-
|
3054
|
-
*/
|
3055
|
-
;
|
3056
|
-
|
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
|
+
*/;
|
3057
2567
|
_proto.vaultIndexGet =
|
3058
2568
|
/*#__PURE__*/
|
3059
2569
|
function () {
|
@@ -3069,7 +2579,6 @@ var VaultService = /*#__PURE__*/function () {
|
|
3069
2579
|
timestamp: timestamp
|
3070
2580
|
}
|
3071
2581
|
}));
|
3072
|
-
|
3073
2582
|
case 1:
|
3074
2583
|
case "end":
|
3075
2584
|
return _context12.stop();
|
@@ -3077,14 +2586,11 @@ var VaultService = /*#__PURE__*/function () {
|
|
3077
2586
|
}
|
3078
2587
|
}, _callee12, this);
|
3079
2588
|
}));
|
3080
|
-
|
3081
2589
|
function vaultIndexGet(_x29, _x30, _x31) {
|
3082
2590
|
return _vaultIndexGet.apply(this, arguments);
|
3083
2591
|
}
|
3084
|
-
|
3085
2592
|
return vaultIndexGet;
|
3086
2593
|
}();
|
3087
|
-
|
3088
2594
|
return VaultService;
|
3089
2595
|
}();
|
3090
2596
|
|
@@ -3097,10 +2603,7 @@ var WorkflowService = /*#__PURE__*/function () {
|
|
3097
2603
|
* This function returns all workflows
|
3098
2604
|
* @returns desired workflow
|
3099
2605
|
*/
|
3100
|
-
|
3101
|
-
|
3102
2606
|
var _proto = WorkflowService.prototype;
|
3103
|
-
|
3104
2607
|
_proto.getWorkflows = function getWorkflows() {
|
3105
2608
|
return this.api.get(this.v1Url + "/workflows");
|
3106
2609
|
}
|
@@ -3111,9 +2614,7 @@ var WorkflowService = /*#__PURE__*/function () {
|
|
3111
2614
|
* @param locale (optional) The desired locale of the workflow (default: 'en')
|
3112
2615
|
* @param createdAt (optional) The creation date of the workflow (also used for versionning)
|
3113
2616
|
* @returns desired workflow
|
3114
|
-
|
3115
|
-
;
|
3116
|
-
|
2617
|
+
*/;
|
3117
2618
|
_proto.getWorkflow = function getWorkflow(id, locale, createdAt) {
|
3118
2619
|
return this.api.get(this.v1Url + "/workflows/" + id, {
|
3119
2620
|
params: {
|
@@ -3122,7 +2623,6 @@ var WorkflowService = /*#__PURE__*/function () {
|
|
3122
2623
|
}
|
3123
2624
|
});
|
3124
2625
|
};
|
3125
|
-
|
3126
2626
|
return WorkflowService;
|
3127
2627
|
}();
|
3128
2628
|
|
@@ -3133,20 +2633,18 @@ var WorkflowService = /*#__PURE__*/function () {
|
|
3133
2633
|
* @param useLocalStorage (default: true) if true store tokens into local storage (only for browsers)
|
3134
2634
|
* @returns an instance of each services with a provided url
|
3135
2635
|
*/
|
3136
|
-
|
3137
2636
|
var init = function init(services, authenticationCallback, useLocalStorage) {
|
3138
2637
|
if (useLocalStorage === void 0) {
|
3139
2638
|
useLocalStorage = true;
|
3140
2639
|
}
|
3141
|
-
|
3142
2640
|
var tellerBaseURL = services.tellerBaseURL,
|
3143
|
-
|
3144
|
-
|
3145
|
-
|
3146
|
-
|
3147
|
-
|
3148
|
-
|
3149
|
-
|
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;
|
3150
2648
|
var apiService = new APIService(useLocalStorage, undefined, authenticationCallback);
|
3151
2649
|
return {
|
3152
2650
|
apiService: apiService,
|