oro-sdk 3.15.0 → 3.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.ts +9 -24
- package/dist/models/error.d.ts +2 -0
- package/dist/oro-sdk.cjs.development.js +1251 -1830
- package/dist/oro-sdk.cjs.development.js.map +1 -1
- package/dist/oro-sdk.cjs.production.min.js +1 -1
- package/dist/oro-sdk.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk.esm.js +1253 -1833
- package/dist/oro-sdk.esm.js.map +1 -1
- package/dist/sdk-revision/client.d.ts +6 -15
- package/package.json +2 -2
- package/src/client.ts +67 -134
- package/src/helpers/patient-registration.ts +11 -5
- package/src/models/error.ts +7 -6
- package/src/sdk-revision/client.ts +14 -52
package/dist/oro-sdk.esm.js
CHANGED
@@ -1,10 +1,355 @@
|
|
1
|
-
import initApis__default, { MetadataCategory, MedicalStatus, IndexKey, DocumentType, AxiosService } from 'oro-sdk-apis';
|
1
|
+
import initApis__default, { MetadataCategory, MedicalStatus, IndexKey, DocumentType, OtherRoleType, AxiosService } from 'oro-sdk-apis';
|
2
2
|
export * from 'oro-sdk-apis';
|
3
3
|
import { uuidParse, CryptoRSA } from 'oro-toolbox';
|
4
4
|
import * as oroToolbox from 'oro-toolbox';
|
5
5
|
export { oroToolbox as OroToolboxNamespace };
|
6
6
|
import { getMany } from 'idb-keyval';
|
7
7
|
|
8
|
+
function _regeneratorRuntime() {
|
9
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
10
|
+
|
11
|
+
_regeneratorRuntime = function () {
|
12
|
+
return exports;
|
13
|
+
};
|
14
|
+
|
15
|
+
var exports = {},
|
16
|
+
Op = Object.prototype,
|
17
|
+
hasOwn = Op.hasOwnProperty,
|
18
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
19
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
20
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
21
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
22
|
+
|
23
|
+
function define(obj, key, value) {
|
24
|
+
return Object.defineProperty(obj, key, {
|
25
|
+
value: value,
|
26
|
+
enumerable: !0,
|
27
|
+
configurable: !0,
|
28
|
+
writable: !0
|
29
|
+
}), obj[key];
|
30
|
+
}
|
31
|
+
|
32
|
+
try {
|
33
|
+
define({}, "");
|
34
|
+
} catch (err) {
|
35
|
+
define = function (obj, key, value) {
|
36
|
+
return obj[key] = value;
|
37
|
+
};
|
38
|
+
}
|
39
|
+
|
40
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
41
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
42
|
+
generator = Object.create(protoGenerator.prototype),
|
43
|
+
context = new Context(tryLocsList || []);
|
44
|
+
return generator._invoke = function (innerFn, self, context) {
|
45
|
+
var state = "suspendedStart";
|
46
|
+
return function (method, arg) {
|
47
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
48
|
+
|
49
|
+
if ("completed" === state) {
|
50
|
+
if ("throw" === method) throw arg;
|
51
|
+
return doneResult();
|
52
|
+
}
|
53
|
+
|
54
|
+
for (context.method = method, context.arg = arg;;) {
|
55
|
+
var delegate = context.delegate;
|
56
|
+
|
57
|
+
if (delegate) {
|
58
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
59
|
+
|
60
|
+
if (delegateResult) {
|
61
|
+
if (delegateResult === ContinueSentinel) continue;
|
62
|
+
return delegateResult;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
67
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
68
|
+
context.dispatchException(context.arg);
|
69
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
70
|
+
state = "executing";
|
71
|
+
var record = tryCatch(innerFn, self, context);
|
72
|
+
|
73
|
+
if ("normal" === record.type) {
|
74
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
75
|
+
return {
|
76
|
+
value: record.arg,
|
77
|
+
done: context.done
|
78
|
+
};
|
79
|
+
}
|
80
|
+
|
81
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
82
|
+
}
|
83
|
+
};
|
84
|
+
}(innerFn, self, context), generator;
|
85
|
+
}
|
86
|
+
|
87
|
+
function tryCatch(fn, obj, arg) {
|
88
|
+
try {
|
89
|
+
return {
|
90
|
+
type: "normal",
|
91
|
+
arg: fn.call(obj, arg)
|
92
|
+
};
|
93
|
+
} catch (err) {
|
94
|
+
return {
|
95
|
+
type: "throw",
|
96
|
+
arg: err
|
97
|
+
};
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
exports.wrap = wrap;
|
102
|
+
var ContinueSentinel = {};
|
103
|
+
|
104
|
+
function Generator() {}
|
105
|
+
|
106
|
+
function GeneratorFunction() {}
|
107
|
+
|
108
|
+
function GeneratorFunctionPrototype() {}
|
109
|
+
|
110
|
+
var IteratorPrototype = {};
|
111
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
112
|
+
return this;
|
113
|
+
});
|
114
|
+
var getProto = Object.getPrototypeOf,
|
115
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
116
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
117
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
118
|
+
|
119
|
+
function defineIteratorMethods(prototype) {
|
120
|
+
["next", "throw", "return"].forEach(function (method) {
|
121
|
+
define(prototype, method, function (arg) {
|
122
|
+
return this._invoke(method, arg);
|
123
|
+
});
|
124
|
+
});
|
125
|
+
}
|
126
|
+
|
127
|
+
function AsyncIterator(generator, PromiseImpl) {
|
128
|
+
function invoke(method, arg, resolve, reject) {
|
129
|
+
var record = tryCatch(generator[method], generator, arg);
|
130
|
+
|
131
|
+
if ("throw" !== record.type) {
|
132
|
+
var result = record.arg,
|
133
|
+
value = result.value;
|
134
|
+
return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
135
|
+
invoke("next", value, resolve, reject);
|
136
|
+
}, function (err) {
|
137
|
+
invoke("throw", err, resolve, reject);
|
138
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
139
|
+
result.value = unwrapped, resolve(result);
|
140
|
+
}, function (error) {
|
141
|
+
return invoke("throw", error, resolve, reject);
|
142
|
+
});
|
143
|
+
}
|
144
|
+
|
145
|
+
reject(record.arg);
|
146
|
+
}
|
147
|
+
|
148
|
+
var previousPromise;
|
149
|
+
|
150
|
+
this._invoke = function (method, arg) {
|
151
|
+
function callInvokeWithMethodAndArg() {
|
152
|
+
return new PromiseImpl(function (resolve, reject) {
|
153
|
+
invoke(method, arg, resolve, reject);
|
154
|
+
});
|
155
|
+
}
|
156
|
+
|
157
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
158
|
+
};
|
159
|
+
}
|
160
|
+
|
161
|
+
function maybeInvokeDelegate(delegate, context) {
|
162
|
+
var method = delegate.iterator[context.method];
|
163
|
+
|
164
|
+
if (undefined === method) {
|
165
|
+
if (context.delegate = null, "throw" === context.method) {
|
166
|
+
if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
167
|
+
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
168
|
+
}
|
169
|
+
|
170
|
+
return ContinueSentinel;
|
171
|
+
}
|
172
|
+
|
173
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
174
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
175
|
+
var info = record.arg;
|
176
|
+
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);
|
177
|
+
}
|
178
|
+
|
179
|
+
function pushTryEntry(locs) {
|
180
|
+
var entry = {
|
181
|
+
tryLoc: locs[0]
|
182
|
+
};
|
183
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
184
|
+
}
|
185
|
+
|
186
|
+
function resetTryEntry(entry) {
|
187
|
+
var record = entry.completion || {};
|
188
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
189
|
+
}
|
190
|
+
|
191
|
+
function Context(tryLocsList) {
|
192
|
+
this.tryEntries = [{
|
193
|
+
tryLoc: "root"
|
194
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
195
|
+
}
|
196
|
+
|
197
|
+
function values(iterable) {
|
198
|
+
if (iterable) {
|
199
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
200
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
201
|
+
if ("function" == typeof iterable.next) return iterable;
|
202
|
+
|
203
|
+
if (!isNaN(iterable.length)) {
|
204
|
+
var i = -1,
|
205
|
+
next = function next() {
|
206
|
+
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
207
|
+
|
208
|
+
return next.value = undefined, next.done = !0, next;
|
209
|
+
};
|
210
|
+
|
211
|
+
return next.next = next;
|
212
|
+
}
|
213
|
+
}
|
214
|
+
|
215
|
+
return {
|
216
|
+
next: doneResult
|
217
|
+
};
|
218
|
+
}
|
219
|
+
|
220
|
+
function doneResult() {
|
221
|
+
return {
|
222
|
+
value: undefined,
|
223
|
+
done: !0
|
224
|
+
};
|
225
|
+
}
|
226
|
+
|
227
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
228
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
229
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
230
|
+
}, exports.mark = function (genFun) {
|
231
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
232
|
+
}, exports.awrap = function (arg) {
|
233
|
+
return {
|
234
|
+
__await: arg
|
235
|
+
};
|
236
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
237
|
+
return this;
|
238
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
239
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
240
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
241
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
242
|
+
return result.done ? result.value : iter.next();
|
243
|
+
});
|
244
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
245
|
+
return this;
|
246
|
+
}), define(Gp, "toString", function () {
|
247
|
+
return "[object Generator]";
|
248
|
+
}), exports.keys = function (object) {
|
249
|
+
var keys = [];
|
250
|
+
|
251
|
+
for (var key in object) keys.push(key);
|
252
|
+
|
253
|
+
return keys.reverse(), function next() {
|
254
|
+
for (; keys.length;) {
|
255
|
+
var key = keys.pop();
|
256
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
257
|
+
}
|
258
|
+
|
259
|
+
return next.done = !0, next;
|
260
|
+
};
|
261
|
+
}, exports.values = values, Context.prototype = {
|
262
|
+
constructor: Context,
|
263
|
+
reset: function (skipTempReset) {
|
264
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
265
|
+
},
|
266
|
+
stop: function () {
|
267
|
+
this.done = !0;
|
268
|
+
var rootRecord = this.tryEntries[0].completion;
|
269
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
270
|
+
return this.rval;
|
271
|
+
},
|
272
|
+
dispatchException: function (exception) {
|
273
|
+
if (this.done) throw exception;
|
274
|
+
var context = this;
|
275
|
+
|
276
|
+
function handle(loc, caught) {
|
277
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
278
|
+
}
|
279
|
+
|
280
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
281
|
+
var entry = this.tryEntries[i],
|
282
|
+
record = entry.completion;
|
283
|
+
if ("root" === entry.tryLoc) return handle("end");
|
284
|
+
|
285
|
+
if (entry.tryLoc <= this.prev) {
|
286
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
287
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
288
|
+
|
289
|
+
if (hasCatch && hasFinally) {
|
290
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
291
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
292
|
+
} else if (hasCatch) {
|
293
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
294
|
+
} else {
|
295
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
296
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
297
|
+
}
|
298
|
+
}
|
299
|
+
}
|
300
|
+
},
|
301
|
+
abrupt: function (type, arg) {
|
302
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
303
|
+
var entry = this.tryEntries[i];
|
304
|
+
|
305
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
306
|
+
var finallyEntry = entry;
|
307
|
+
break;
|
308
|
+
}
|
309
|
+
}
|
310
|
+
|
311
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
312
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
313
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
314
|
+
},
|
315
|
+
complete: function (record, afterLoc) {
|
316
|
+
if ("throw" === record.type) throw record.arg;
|
317
|
+
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
318
|
+
},
|
319
|
+
finish: function (finallyLoc) {
|
320
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
321
|
+
var entry = this.tryEntries[i];
|
322
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
323
|
+
}
|
324
|
+
},
|
325
|
+
catch: function (tryLoc) {
|
326
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
327
|
+
var entry = this.tryEntries[i];
|
328
|
+
|
329
|
+
if (entry.tryLoc === tryLoc) {
|
330
|
+
var record = entry.completion;
|
331
|
+
|
332
|
+
if ("throw" === record.type) {
|
333
|
+
var thrown = record.arg;
|
334
|
+
resetTryEntry(entry);
|
335
|
+
}
|
336
|
+
|
337
|
+
return thrown;
|
338
|
+
}
|
339
|
+
}
|
340
|
+
|
341
|
+
throw new Error("illegal catch attempt");
|
342
|
+
},
|
343
|
+
delegateYield: function (iterable, resultName, nextLoc) {
|
344
|
+
return this.delegate = {
|
345
|
+
iterator: values(iterable),
|
346
|
+
resultName: resultName,
|
347
|
+
nextLoc: nextLoc
|
348
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
349
|
+
}
|
350
|
+
}, exports;
|
351
|
+
}
|
352
|
+
|
8
353
|
function _wrapRegExp() {
|
9
354
|
_wrapRegExp = function (re, groups) {
|
10
355
|
return new BabelRegExp(re, void 0, groups);
|
@@ -120,914 +465,154 @@ function _inherits(subClass, superClass) {
|
|
120
465
|
}
|
121
466
|
});
|
122
467
|
Object.defineProperty(subClass, "prototype", {
|
123
|
-
writable: false
|
124
|
-
});
|
125
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
126
|
-
}
|
127
|
-
|
128
|
-
function _inheritsLoose(subClass, superClass) {
|
129
|
-
subClass.prototype = Object.create(superClass.prototype);
|
130
|
-
subClass.prototype.constructor = subClass;
|
131
|
-
|
132
|
-
_setPrototypeOf(subClass, superClass);
|
133
|
-
}
|
134
|
-
|
135
|
-
function _getPrototypeOf(o) {
|
136
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
137
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
138
|
-
};
|
139
|
-
return _getPrototypeOf(o);
|
140
|
-
}
|
141
|
-
|
142
|
-
function _setPrototypeOf(o, p) {
|
143
|
-
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
144
|
-
o.__proto__ = p;
|
145
|
-
return o;
|
146
|
-
};
|
147
|
-
|
148
|
-
return _setPrototypeOf(o, p);
|
149
|
-
}
|
150
|
-
|
151
|
-
function _isNativeReflectConstruct() {
|
152
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
153
|
-
if (Reflect.construct.sham) return false;
|
154
|
-
if (typeof Proxy === "function") return true;
|
155
|
-
|
156
|
-
try {
|
157
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
158
|
-
return true;
|
159
|
-
} catch (e) {
|
160
|
-
return false;
|
161
|
-
}
|
162
|
-
}
|
163
|
-
|
164
|
-
function _construct(Parent, args, Class) {
|
165
|
-
if (_isNativeReflectConstruct()) {
|
166
|
-
_construct = Reflect.construct;
|
167
|
-
} else {
|
168
|
-
_construct = function _construct(Parent, args, Class) {
|
169
|
-
var a = [null];
|
170
|
-
a.push.apply(a, args);
|
171
|
-
var Constructor = Function.bind.apply(Parent, a);
|
172
|
-
var instance = new Constructor();
|
173
|
-
if (Class) _setPrototypeOf(instance, Class.prototype);
|
174
|
-
return instance;
|
175
|
-
};
|
176
|
-
}
|
177
|
-
|
178
|
-
return _construct.apply(null, arguments);
|
179
|
-
}
|
180
|
-
|
181
|
-
function _isNativeFunction(fn) {
|
182
|
-
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
183
|
-
}
|
184
|
-
|
185
|
-
function _wrapNativeSuper(Class) {
|
186
|
-
var _cache = typeof Map === "function" ? new Map() : undefined;
|
187
|
-
|
188
|
-
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
189
|
-
if (Class === null || !_isNativeFunction(Class)) return Class;
|
190
|
-
|
191
|
-
if (typeof Class !== "function") {
|
192
|
-
throw new TypeError("Super expression must either be null or a function");
|
193
|
-
}
|
194
|
-
|
195
|
-
if (typeof _cache !== "undefined") {
|
196
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
197
|
-
|
198
|
-
_cache.set(Class, Wrapper);
|
199
|
-
}
|
200
|
-
|
201
|
-
function Wrapper() {
|
202
|
-
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
|
203
|
-
}
|
204
|
-
|
205
|
-
Wrapper.prototype = Object.create(Class.prototype, {
|
206
|
-
constructor: {
|
207
|
-
value: Wrapper,
|
208
|
-
enumerable: false,
|
209
|
-
writable: true,
|
210
|
-
configurable: true
|
211
|
-
}
|
212
|
-
});
|
213
|
-
return _setPrototypeOf(Wrapper, Class);
|
214
|
-
};
|
215
|
-
|
216
|
-
return _wrapNativeSuper(Class);
|
217
|
-
}
|
218
|
-
|
219
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
220
|
-
if (source == null) return {};
|
221
|
-
var target = {};
|
222
|
-
var sourceKeys = Object.keys(source);
|
223
|
-
var key, i;
|
224
|
-
|
225
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
226
|
-
key = sourceKeys[i];
|
227
|
-
if (excluded.indexOf(key) >= 0) continue;
|
228
|
-
target[key] = source[key];
|
229
|
-
}
|
230
|
-
|
231
|
-
return target;
|
232
|
-
}
|
233
|
-
|
234
|
-
function _unsupportedIterableToArray(o, minLen) {
|
235
|
-
if (!o) return;
|
236
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
237
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
238
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
239
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
240
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
241
|
-
}
|
242
|
-
|
243
|
-
function _arrayLikeToArray(arr, len) {
|
244
|
-
if (len == null || len > arr.length) len = arr.length;
|
245
|
-
|
246
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
247
|
-
|
248
|
-
return arr2;
|
249
|
-
}
|
250
|
-
|
251
|
-
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
252
|
-
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
253
|
-
if (it) return (it = it.call(o)).next.bind(it);
|
254
|
-
|
255
|
-
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
256
|
-
if (it) o = it;
|
257
|
-
var i = 0;
|
258
|
-
return function () {
|
259
|
-
if (i >= o.length) return {
|
260
|
-
done: true
|
261
|
-
};
|
262
|
-
return {
|
263
|
-
done: false,
|
264
|
-
value: o[i++]
|
265
|
-
};
|
266
|
-
};
|
267
|
-
}
|
268
|
-
|
269
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
270
|
-
}
|
271
|
-
|
272
|
-
function createCommonjsModule(fn, module) {
|
273
|
-
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
274
|
-
}
|
275
|
-
|
276
|
-
var runtime_1 = createCommonjsModule(function (module) {
|
277
|
-
/**
|
278
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
279
|
-
*
|
280
|
-
* This source code is licensed under the MIT license found in the
|
281
|
-
* LICENSE file in the root directory of this source tree.
|
282
|
-
*/
|
283
|
-
|
284
|
-
var runtime = (function (exports) {
|
285
|
-
|
286
|
-
var Op = Object.prototype;
|
287
|
-
var hasOwn = Op.hasOwnProperty;
|
288
|
-
var undefined$1; // More compressible than void 0.
|
289
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
290
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
291
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
292
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
293
|
-
|
294
|
-
function define(obj, key, value) {
|
295
|
-
Object.defineProperty(obj, key, {
|
296
|
-
value: value,
|
297
|
-
enumerable: true,
|
298
|
-
configurable: true,
|
299
|
-
writable: true
|
300
|
-
});
|
301
|
-
return obj[key];
|
302
|
-
}
|
303
|
-
try {
|
304
|
-
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
305
|
-
define({}, "");
|
306
|
-
} catch (err) {
|
307
|
-
define = function(obj, key, value) {
|
308
|
-
return obj[key] = value;
|
309
|
-
};
|
310
|
-
}
|
311
|
-
|
312
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
313
|
-
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
314
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
315
|
-
var generator = Object.create(protoGenerator.prototype);
|
316
|
-
var context = new Context(tryLocsList || []);
|
317
|
-
|
318
|
-
// The ._invoke method unifies the implementations of the .next,
|
319
|
-
// .throw, and .return methods.
|
320
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
321
|
-
|
322
|
-
return generator;
|
323
|
-
}
|
324
|
-
exports.wrap = wrap;
|
325
|
-
|
326
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
327
|
-
// record like context.tryEntries[i].completion. This interface could
|
328
|
-
// have been (and was previously) designed to take a closure to be
|
329
|
-
// invoked without arguments, but in all the cases we care about we
|
330
|
-
// already have an existing method we want to call, so there's no need
|
331
|
-
// to create a new function object. We can even get away with assuming
|
332
|
-
// the method takes exactly one argument, since that happens to be true
|
333
|
-
// in every case, so we don't have to touch the arguments object. The
|
334
|
-
// only additional allocation required is the completion record, which
|
335
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
336
|
-
function tryCatch(fn, obj, arg) {
|
337
|
-
try {
|
338
|
-
return { type: "normal", arg: fn.call(obj, arg) };
|
339
|
-
} catch (err) {
|
340
|
-
return { type: "throw", arg: err };
|
341
|
-
}
|
342
|
-
}
|
343
|
-
|
344
|
-
var GenStateSuspendedStart = "suspendedStart";
|
345
|
-
var GenStateSuspendedYield = "suspendedYield";
|
346
|
-
var GenStateExecuting = "executing";
|
347
|
-
var GenStateCompleted = "completed";
|
348
|
-
|
349
|
-
// Returning this object from the innerFn has the same effect as
|
350
|
-
// breaking out of the dispatch switch statement.
|
351
|
-
var ContinueSentinel = {};
|
352
|
-
|
353
|
-
// Dummy constructor functions that we use as the .constructor and
|
354
|
-
// .constructor.prototype properties for functions that return Generator
|
355
|
-
// objects. For full spec compliance, you may wish to configure your
|
356
|
-
// minifier not to mangle the names of these two functions.
|
357
|
-
function Generator() {}
|
358
|
-
function GeneratorFunction() {}
|
359
|
-
function GeneratorFunctionPrototype() {}
|
360
|
-
|
361
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
362
|
-
// don't natively support it.
|
363
|
-
var IteratorPrototype = {};
|
364
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
365
|
-
return this;
|
366
|
-
});
|
367
|
-
|
368
|
-
var getProto = Object.getPrototypeOf;
|
369
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
370
|
-
if (NativeIteratorPrototype &&
|
371
|
-
NativeIteratorPrototype !== Op &&
|
372
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
373
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
374
|
-
// of the polyfill.
|
375
|
-
IteratorPrototype = NativeIteratorPrototype;
|
376
|
-
}
|
377
|
-
|
378
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
379
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
380
|
-
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
381
|
-
define(Gp, "constructor", GeneratorFunctionPrototype);
|
382
|
-
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
383
|
-
GeneratorFunction.displayName = define(
|
384
|
-
GeneratorFunctionPrototype,
|
385
|
-
toStringTagSymbol,
|
386
|
-
"GeneratorFunction"
|
387
|
-
);
|
388
|
-
|
389
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
390
|
-
// Iterator interface in terms of a single ._invoke method.
|
391
|
-
function defineIteratorMethods(prototype) {
|
392
|
-
["next", "throw", "return"].forEach(function(method) {
|
393
|
-
define(prototype, method, function(arg) {
|
394
|
-
return this._invoke(method, arg);
|
395
|
-
});
|
396
|
-
});
|
397
|
-
}
|
398
|
-
|
399
|
-
exports.isGeneratorFunction = function(genFun) {
|
400
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
401
|
-
return ctor
|
402
|
-
? ctor === GeneratorFunction ||
|
403
|
-
// For the native GeneratorFunction constructor, the best we can
|
404
|
-
// do is to check its .name property.
|
405
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
406
|
-
: false;
|
407
|
-
};
|
408
|
-
|
409
|
-
exports.mark = function(genFun) {
|
410
|
-
if (Object.setPrototypeOf) {
|
411
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
412
|
-
} else {
|
413
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
414
|
-
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
415
|
-
}
|
416
|
-
genFun.prototype = Object.create(Gp);
|
417
|
-
return genFun;
|
418
|
-
};
|
419
|
-
|
420
|
-
// Within the body of any async function, `await x` is transformed to
|
421
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
422
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
423
|
-
// meant to be awaited.
|
424
|
-
exports.awrap = function(arg) {
|
425
|
-
return { __await: arg };
|
426
|
-
};
|
427
|
-
|
428
|
-
function AsyncIterator(generator, PromiseImpl) {
|
429
|
-
function invoke(method, arg, resolve, reject) {
|
430
|
-
var record = tryCatch(generator[method], generator, arg);
|
431
|
-
if (record.type === "throw") {
|
432
|
-
reject(record.arg);
|
433
|
-
} else {
|
434
|
-
var result = record.arg;
|
435
|
-
var value = result.value;
|
436
|
-
if (value &&
|
437
|
-
typeof value === "object" &&
|
438
|
-
hasOwn.call(value, "__await")) {
|
439
|
-
return PromiseImpl.resolve(value.__await).then(function(value) {
|
440
|
-
invoke("next", value, resolve, reject);
|
441
|
-
}, function(err) {
|
442
|
-
invoke("throw", err, resolve, reject);
|
443
|
-
});
|
444
|
-
}
|
445
|
-
|
446
|
-
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
447
|
-
// When a yielded Promise is resolved, its final value becomes
|
448
|
-
// the .value of the Promise<{value,done}> result for the
|
449
|
-
// current iteration.
|
450
|
-
result.value = unwrapped;
|
451
|
-
resolve(result);
|
452
|
-
}, function(error) {
|
453
|
-
// If a rejected Promise was yielded, throw the rejection back
|
454
|
-
// into the async generator function so it can be handled there.
|
455
|
-
return invoke("throw", error, resolve, reject);
|
456
|
-
});
|
457
|
-
}
|
458
|
-
}
|
459
|
-
|
460
|
-
var previousPromise;
|
461
|
-
|
462
|
-
function enqueue(method, arg) {
|
463
|
-
function callInvokeWithMethodAndArg() {
|
464
|
-
return new PromiseImpl(function(resolve, reject) {
|
465
|
-
invoke(method, arg, resolve, reject);
|
466
|
-
});
|
467
|
-
}
|
468
|
-
|
469
|
-
return previousPromise =
|
470
|
-
// If enqueue has been called before, then we want to wait until
|
471
|
-
// all previous Promises have been resolved before calling invoke,
|
472
|
-
// so that results are always delivered in the correct order. If
|
473
|
-
// enqueue has not been called before, then it is important to
|
474
|
-
// call invoke immediately, without waiting on a callback to fire,
|
475
|
-
// so that the async generator function has the opportunity to do
|
476
|
-
// any necessary setup in a predictable way. This predictability
|
477
|
-
// is why the Promise constructor synchronously invokes its
|
478
|
-
// executor callback, and why async functions synchronously
|
479
|
-
// execute code before the first await. Since we implement simple
|
480
|
-
// async functions in terms of async generators, it is especially
|
481
|
-
// important to get this right, even though it requires care.
|
482
|
-
previousPromise ? previousPromise.then(
|
483
|
-
callInvokeWithMethodAndArg,
|
484
|
-
// Avoid propagating failures to Promises returned by later
|
485
|
-
// invocations of the iterator.
|
486
|
-
callInvokeWithMethodAndArg
|
487
|
-
) : callInvokeWithMethodAndArg();
|
488
|
-
}
|
489
|
-
|
490
|
-
// Define the unified helper method that is used to implement .next,
|
491
|
-
// .throw, and .return (see defineIteratorMethods).
|
492
|
-
this._invoke = enqueue;
|
493
|
-
}
|
494
|
-
|
495
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
496
|
-
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
497
|
-
return this;
|
498
|
-
});
|
499
|
-
exports.AsyncIterator = AsyncIterator;
|
500
|
-
|
501
|
-
// Note that simple async functions are implemented on top of
|
502
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
503
|
-
// the final result produced by the iterator.
|
504
|
-
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
505
|
-
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
506
|
-
|
507
|
-
var iter = new AsyncIterator(
|
508
|
-
wrap(innerFn, outerFn, self, tryLocsList),
|
509
|
-
PromiseImpl
|
510
|
-
);
|
511
|
-
|
512
|
-
return exports.isGeneratorFunction(outerFn)
|
513
|
-
? iter // If outerFn is a generator, return the full iterator.
|
514
|
-
: iter.next().then(function(result) {
|
515
|
-
return result.done ? result.value : iter.next();
|
516
|
-
});
|
517
|
-
};
|
518
|
-
|
519
|
-
function makeInvokeMethod(innerFn, self, context) {
|
520
|
-
var state = GenStateSuspendedStart;
|
521
|
-
|
522
|
-
return function invoke(method, arg) {
|
523
|
-
if (state === GenStateExecuting) {
|
524
|
-
throw new Error("Generator is already running");
|
525
|
-
}
|
526
|
-
|
527
|
-
if (state === GenStateCompleted) {
|
528
|
-
if (method === "throw") {
|
529
|
-
throw arg;
|
530
|
-
}
|
531
|
-
|
532
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
533
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
534
|
-
return doneResult();
|
535
|
-
}
|
536
|
-
|
537
|
-
context.method = method;
|
538
|
-
context.arg = arg;
|
539
|
-
|
540
|
-
while (true) {
|
541
|
-
var delegate = context.delegate;
|
542
|
-
if (delegate) {
|
543
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
544
|
-
if (delegateResult) {
|
545
|
-
if (delegateResult === ContinueSentinel) continue;
|
546
|
-
return delegateResult;
|
547
|
-
}
|
548
|
-
}
|
549
|
-
|
550
|
-
if (context.method === "next") {
|
551
|
-
// Setting context._sent for legacy support of Babel's
|
552
|
-
// function.sent implementation.
|
553
|
-
context.sent = context._sent = context.arg;
|
554
|
-
|
555
|
-
} else if (context.method === "throw") {
|
556
|
-
if (state === GenStateSuspendedStart) {
|
557
|
-
state = GenStateCompleted;
|
558
|
-
throw context.arg;
|
559
|
-
}
|
560
|
-
|
561
|
-
context.dispatchException(context.arg);
|
562
|
-
|
563
|
-
} else if (context.method === "return") {
|
564
|
-
context.abrupt("return", context.arg);
|
565
|
-
}
|
566
|
-
|
567
|
-
state = GenStateExecuting;
|
568
|
-
|
569
|
-
var record = tryCatch(innerFn, self, context);
|
570
|
-
if (record.type === "normal") {
|
571
|
-
// If an exception is thrown from innerFn, we leave state ===
|
572
|
-
// GenStateExecuting and loop back for another invocation.
|
573
|
-
state = context.done
|
574
|
-
? GenStateCompleted
|
575
|
-
: GenStateSuspendedYield;
|
576
|
-
|
577
|
-
if (record.arg === ContinueSentinel) {
|
578
|
-
continue;
|
579
|
-
}
|
580
|
-
|
581
|
-
return {
|
582
|
-
value: record.arg,
|
583
|
-
done: context.done
|
584
|
-
};
|
585
|
-
|
586
|
-
} else if (record.type === "throw") {
|
587
|
-
state = GenStateCompleted;
|
588
|
-
// Dispatch the exception by looping back around to the
|
589
|
-
// context.dispatchException(context.arg) call above.
|
590
|
-
context.method = "throw";
|
591
|
-
context.arg = record.arg;
|
592
|
-
}
|
593
|
-
}
|
594
|
-
};
|
595
|
-
}
|
596
|
-
|
597
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
598
|
-
// result, either by returning a { value, done } result from the
|
599
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
600
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
601
|
-
function maybeInvokeDelegate(delegate, context) {
|
602
|
-
var method = delegate.iterator[context.method];
|
603
|
-
if (method === undefined$1) {
|
604
|
-
// A .throw or .return when the delegate iterator has no .throw
|
605
|
-
// method always terminates the yield* loop.
|
606
|
-
context.delegate = null;
|
607
|
-
|
608
|
-
if (context.method === "throw") {
|
609
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
610
|
-
if (delegate.iterator["return"]) {
|
611
|
-
// If the delegate iterator has a return method, give it a
|
612
|
-
// chance to clean up.
|
613
|
-
context.method = "return";
|
614
|
-
context.arg = undefined$1;
|
615
|
-
maybeInvokeDelegate(delegate, context);
|
616
|
-
|
617
|
-
if (context.method === "throw") {
|
618
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
619
|
-
// "return" to "throw", let that override the TypeError below.
|
620
|
-
return ContinueSentinel;
|
621
|
-
}
|
622
|
-
}
|
623
|
-
|
624
|
-
context.method = "throw";
|
625
|
-
context.arg = new TypeError(
|
626
|
-
"The iterator does not provide a 'throw' method");
|
627
|
-
}
|
628
|
-
|
629
|
-
return ContinueSentinel;
|
630
|
-
}
|
631
|
-
|
632
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
633
|
-
|
634
|
-
if (record.type === "throw") {
|
635
|
-
context.method = "throw";
|
636
|
-
context.arg = record.arg;
|
637
|
-
context.delegate = null;
|
638
|
-
return ContinueSentinel;
|
639
|
-
}
|
640
|
-
|
641
|
-
var info = record.arg;
|
642
|
-
|
643
|
-
if (! info) {
|
644
|
-
context.method = "throw";
|
645
|
-
context.arg = new TypeError("iterator result is not an object");
|
646
|
-
context.delegate = null;
|
647
|
-
return ContinueSentinel;
|
648
|
-
}
|
649
|
-
|
650
|
-
if (info.done) {
|
651
|
-
// Assign the result of the finished delegate to the temporary
|
652
|
-
// variable specified by delegate.resultName (see delegateYield).
|
653
|
-
context[delegate.resultName] = info.value;
|
654
|
-
|
655
|
-
// Resume execution at the desired location (see delegateYield).
|
656
|
-
context.next = delegate.nextLoc;
|
657
|
-
|
658
|
-
// If context.method was "throw" but the delegate handled the
|
659
|
-
// exception, let the outer generator proceed normally. If
|
660
|
-
// context.method was "next", forget context.arg since it has been
|
661
|
-
// "consumed" by the delegate iterator. If context.method was
|
662
|
-
// "return", allow the original .return call to continue in the
|
663
|
-
// outer generator.
|
664
|
-
if (context.method !== "return") {
|
665
|
-
context.method = "next";
|
666
|
-
context.arg = undefined$1;
|
667
|
-
}
|
668
|
-
|
669
|
-
} else {
|
670
|
-
// Re-yield the result returned by the delegate method.
|
671
|
-
return info;
|
672
|
-
}
|
673
|
-
|
674
|
-
// The delegate iterator is finished, so forget it and continue with
|
675
|
-
// the outer generator.
|
676
|
-
context.delegate = null;
|
677
|
-
return ContinueSentinel;
|
678
|
-
}
|
679
|
-
|
680
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
681
|
-
// unified ._invoke helper method.
|
682
|
-
defineIteratorMethods(Gp);
|
683
|
-
|
684
|
-
define(Gp, toStringTagSymbol, "Generator");
|
685
|
-
|
686
|
-
// A Generator should always return itself as the iterator object when the
|
687
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
688
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
689
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
690
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
691
|
-
define(Gp, iteratorSymbol, function() {
|
692
|
-
return this;
|
693
|
-
});
|
694
|
-
|
695
|
-
define(Gp, "toString", function() {
|
696
|
-
return "[object Generator]";
|
697
|
-
});
|
698
|
-
|
699
|
-
function pushTryEntry(locs) {
|
700
|
-
var entry = { tryLoc: locs[0] };
|
701
|
-
|
702
|
-
if (1 in locs) {
|
703
|
-
entry.catchLoc = locs[1];
|
704
|
-
}
|
705
|
-
|
706
|
-
if (2 in locs) {
|
707
|
-
entry.finallyLoc = locs[2];
|
708
|
-
entry.afterLoc = locs[3];
|
709
|
-
}
|
710
|
-
|
711
|
-
this.tryEntries.push(entry);
|
712
|
-
}
|
713
|
-
|
714
|
-
function resetTryEntry(entry) {
|
715
|
-
var record = entry.completion || {};
|
716
|
-
record.type = "normal";
|
717
|
-
delete record.arg;
|
718
|
-
entry.completion = record;
|
719
|
-
}
|
720
|
-
|
721
|
-
function Context(tryLocsList) {
|
722
|
-
// The root entry object (effectively a try statement without a catch
|
723
|
-
// or a finally block) gives us a place to store values thrown from
|
724
|
-
// locations where there is no enclosing try statement.
|
725
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
726
|
-
tryLocsList.forEach(pushTryEntry, this);
|
727
|
-
this.reset(true);
|
728
|
-
}
|
729
|
-
|
730
|
-
exports.keys = function(object) {
|
731
|
-
var keys = [];
|
732
|
-
for (var key in object) {
|
733
|
-
keys.push(key);
|
734
|
-
}
|
735
|
-
keys.reverse();
|
736
|
-
|
737
|
-
// Rather than returning an object with a next method, we keep
|
738
|
-
// things simple and return the next function itself.
|
739
|
-
return function next() {
|
740
|
-
while (keys.length) {
|
741
|
-
var key = keys.pop();
|
742
|
-
if (key in object) {
|
743
|
-
next.value = key;
|
744
|
-
next.done = false;
|
745
|
-
return next;
|
746
|
-
}
|
747
|
-
}
|
748
|
-
|
749
|
-
// To avoid creating an additional object, we just hang the .value
|
750
|
-
// and .done properties off the next function object itself. This
|
751
|
-
// also ensures that the minifier will not anonymize the function.
|
752
|
-
next.done = true;
|
753
|
-
return next;
|
754
|
-
};
|
755
|
-
};
|
756
|
-
|
757
|
-
function values(iterable) {
|
758
|
-
if (iterable) {
|
759
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
760
|
-
if (iteratorMethod) {
|
761
|
-
return iteratorMethod.call(iterable);
|
762
|
-
}
|
763
|
-
|
764
|
-
if (typeof iterable.next === "function") {
|
765
|
-
return iterable;
|
766
|
-
}
|
767
|
-
|
768
|
-
if (!isNaN(iterable.length)) {
|
769
|
-
var i = -1, next = function next() {
|
770
|
-
while (++i < iterable.length) {
|
771
|
-
if (hasOwn.call(iterable, i)) {
|
772
|
-
next.value = iterable[i];
|
773
|
-
next.done = false;
|
774
|
-
return next;
|
775
|
-
}
|
776
|
-
}
|
777
|
-
|
778
|
-
next.value = undefined$1;
|
779
|
-
next.done = true;
|
780
|
-
|
781
|
-
return next;
|
782
|
-
};
|
783
|
-
|
784
|
-
return next.next = next;
|
785
|
-
}
|
786
|
-
}
|
787
|
-
|
788
|
-
// Return an iterator with no values.
|
789
|
-
return { next: doneResult };
|
790
|
-
}
|
791
|
-
exports.values = values;
|
792
|
-
|
793
|
-
function doneResult() {
|
794
|
-
return { value: undefined$1, done: true };
|
795
|
-
}
|
468
|
+
writable: false
|
469
|
+
});
|
470
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
471
|
+
}
|
796
472
|
|
797
|
-
|
798
|
-
|
473
|
+
function _inheritsLoose(subClass, superClass) {
|
474
|
+
subClass.prototype = Object.create(superClass.prototype);
|
475
|
+
subClass.prototype.constructor = subClass;
|
799
476
|
|
800
|
-
|
801
|
-
|
802
|
-
this.next = 0;
|
803
|
-
// Resetting context._sent for legacy support of Babel's
|
804
|
-
// function.sent implementation.
|
805
|
-
this.sent = this._sent = undefined$1;
|
806
|
-
this.done = false;
|
807
|
-
this.delegate = null;
|
808
|
-
|
809
|
-
this.method = "next";
|
810
|
-
this.arg = undefined$1;
|
811
|
-
|
812
|
-
this.tryEntries.forEach(resetTryEntry);
|
813
|
-
|
814
|
-
if (!skipTempReset) {
|
815
|
-
for (var name in this) {
|
816
|
-
// Not sure about the optimal order of these conditions:
|
817
|
-
if (name.charAt(0) === "t" &&
|
818
|
-
hasOwn.call(this, name) &&
|
819
|
-
!isNaN(+name.slice(1))) {
|
820
|
-
this[name] = undefined$1;
|
821
|
-
}
|
822
|
-
}
|
823
|
-
}
|
824
|
-
},
|
477
|
+
_setPrototypeOf(subClass, superClass);
|
478
|
+
}
|
825
479
|
|
826
|
-
|
827
|
-
|
480
|
+
function _getPrototypeOf(o) {
|
481
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
482
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
483
|
+
};
|
484
|
+
return _getPrototypeOf(o);
|
485
|
+
}
|
828
486
|
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
487
|
+
function _setPrototypeOf(o, p) {
|
488
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
489
|
+
o.__proto__ = p;
|
490
|
+
return o;
|
491
|
+
};
|
834
492
|
|
835
|
-
|
836
|
-
|
493
|
+
return _setPrototypeOf(o, p);
|
494
|
+
}
|
837
495
|
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
496
|
+
function _isNativeReflectConstruct() {
|
497
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
498
|
+
if (Reflect.construct.sham) return false;
|
499
|
+
if (typeof Proxy === "function") return true;
|
842
500
|
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
// If the dispatched exception was caught by a catch block,
|
851
|
-
// then let that catch block handle the exception normally.
|
852
|
-
context.method = "next";
|
853
|
-
context.arg = undefined$1;
|
854
|
-
}
|
501
|
+
try {
|
502
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
503
|
+
return true;
|
504
|
+
} catch (e) {
|
505
|
+
return false;
|
506
|
+
}
|
507
|
+
}
|
855
508
|
|
856
|
-
|
857
|
-
|
509
|
+
function _construct(Parent, args, Class) {
|
510
|
+
if (_isNativeReflectConstruct()) {
|
511
|
+
_construct = Reflect.construct;
|
512
|
+
} else {
|
513
|
+
_construct = function _construct(Parent, args, Class) {
|
514
|
+
var a = [null];
|
515
|
+
a.push.apply(a, args);
|
516
|
+
var Constructor = Function.bind.apply(Parent, a);
|
517
|
+
var instance = new Constructor();
|
518
|
+
if (Class) _setPrototypeOf(instance, Class.prototype);
|
519
|
+
return instance;
|
520
|
+
};
|
521
|
+
}
|
858
522
|
|
859
|
-
|
860
|
-
|
861
|
-
var record = entry.completion;
|
523
|
+
return _construct.apply(null, arguments);
|
524
|
+
}
|
862
525
|
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
// throw the exception.
|
867
|
-
return handle("end");
|
868
|
-
}
|
526
|
+
function _isNativeFunction(fn) {
|
527
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
528
|
+
}
|
869
529
|
|
870
|
-
|
871
|
-
|
872
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
530
|
+
function _wrapNativeSuper(Class) {
|
531
|
+
var _cache = typeof Map === "function" ? new Map() : undefined;
|
873
532
|
|
874
|
-
|
875
|
-
|
876
|
-
return handle(entry.catchLoc, true);
|
877
|
-
} else if (this.prev < entry.finallyLoc) {
|
878
|
-
return handle(entry.finallyLoc);
|
879
|
-
}
|
533
|
+
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
534
|
+
if (Class === null || !_isNativeFunction(Class)) return Class;
|
880
535
|
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
}
|
536
|
+
if (typeof Class !== "function") {
|
537
|
+
throw new TypeError("Super expression must either be null or a function");
|
538
|
+
}
|
885
539
|
|
886
|
-
|
887
|
-
|
888
|
-
return handle(entry.finallyLoc);
|
889
|
-
}
|
540
|
+
if (typeof _cache !== "undefined") {
|
541
|
+
if (_cache.has(Class)) return _cache.get(Class);
|
890
542
|
|
891
|
-
|
892
|
-
|
893
|
-
}
|
894
|
-
}
|
895
|
-
}
|
896
|
-
},
|
543
|
+
_cache.set(Class, Wrapper);
|
544
|
+
}
|
897
545
|
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
if (entry.tryLoc <= this.prev &&
|
902
|
-
hasOwn.call(entry, "finallyLoc") &&
|
903
|
-
this.prev < entry.finallyLoc) {
|
904
|
-
var finallyEntry = entry;
|
905
|
-
break;
|
906
|
-
}
|
907
|
-
}
|
546
|
+
function Wrapper() {
|
547
|
+
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
|
548
|
+
}
|
908
549
|
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
// location outside the try/catch block.
|
916
|
-
finallyEntry = null;
|
550
|
+
Wrapper.prototype = Object.create(Class.prototype, {
|
551
|
+
constructor: {
|
552
|
+
value: Wrapper,
|
553
|
+
enumerable: false,
|
554
|
+
writable: true,
|
555
|
+
configurable: true
|
917
556
|
}
|
557
|
+
});
|
558
|
+
return _setPrototypeOf(Wrapper, Class);
|
559
|
+
};
|
918
560
|
|
919
|
-
|
920
|
-
|
921
|
-
record.arg = arg;
|
561
|
+
return _wrapNativeSuper(Class);
|
562
|
+
}
|
922
563
|
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
564
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
565
|
+
if (source == null) return {};
|
566
|
+
var target = {};
|
567
|
+
var sourceKeys = Object.keys(source);
|
568
|
+
var key, i;
|
928
569
|
|
929
|
-
|
930
|
-
|
570
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
571
|
+
key = sourceKeys[i];
|
572
|
+
if (excluded.indexOf(key) >= 0) continue;
|
573
|
+
target[key] = source[key];
|
574
|
+
}
|
931
575
|
|
932
|
-
|
933
|
-
|
934
|
-
throw record.arg;
|
935
|
-
}
|
576
|
+
return target;
|
577
|
+
}
|
936
578
|
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
this.next = afterLoc;
|
946
|
-
}
|
579
|
+
function _unsupportedIterableToArray(o, minLen) {
|
580
|
+
if (!o) return;
|
581
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
582
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
583
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
584
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
585
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
586
|
+
}
|
947
587
|
|
948
|
-
|
949
|
-
|
588
|
+
function _arrayLikeToArray(arr, len) {
|
589
|
+
if (len == null || len > arr.length) len = arr.length;
|
950
590
|
|
951
|
-
|
952
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
953
|
-
var entry = this.tryEntries[i];
|
954
|
-
if (entry.finallyLoc === finallyLoc) {
|
955
|
-
this.complete(entry.completion, entry.afterLoc);
|
956
|
-
resetTryEntry(entry);
|
957
|
-
return ContinueSentinel;
|
958
|
-
}
|
959
|
-
}
|
960
|
-
},
|
591
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
961
592
|
|
962
|
-
|
963
|
-
|
964
|
-
var entry = this.tryEntries[i];
|
965
|
-
if (entry.tryLoc === tryLoc) {
|
966
|
-
var record = entry.completion;
|
967
|
-
if (record.type === "throw") {
|
968
|
-
var thrown = record.arg;
|
969
|
-
resetTryEntry(entry);
|
970
|
-
}
|
971
|
-
return thrown;
|
972
|
-
}
|
973
|
-
}
|
593
|
+
return arr2;
|
594
|
+
}
|
974
595
|
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
},
|
596
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
597
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
598
|
+
if (it) return (it = it.call(o)).next.bind(it);
|
979
599
|
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
600
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
601
|
+
if (it) o = it;
|
602
|
+
var i = 0;
|
603
|
+
return function () {
|
604
|
+
if (i >= o.length) return {
|
605
|
+
done: true
|
985
606
|
};
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
}
|
992
|
-
|
993
|
-
return ContinueSentinel;
|
994
|
-
}
|
995
|
-
};
|
996
|
-
|
997
|
-
// Regardless of whether this script is executing as a CommonJS module
|
998
|
-
// or not, return the runtime object so that we can declare the variable
|
999
|
-
// regeneratorRuntime in the outer scope, which allows this module to be
|
1000
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
1001
|
-
return exports;
|
1002
|
-
|
1003
|
-
}(
|
1004
|
-
// If this script is executing as a CommonJS module, use module.exports
|
1005
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
1006
|
-
// object. Either way, the resulting object will be used to initialize
|
1007
|
-
// the regeneratorRuntime variable at the top of this file.
|
1008
|
-
module.exports
|
1009
|
-
));
|
1010
|
-
|
1011
|
-
try {
|
1012
|
-
regeneratorRuntime = runtime;
|
1013
|
-
} catch (accidentalStrictMode) {
|
1014
|
-
// This module should not be running in strict mode, so the above
|
1015
|
-
// assignment should always work unless something is misconfigured. Just
|
1016
|
-
// in case runtime.js accidentally runs in strict mode, in modern engines
|
1017
|
-
// we can explicitly access globalThis. In older engines we can escape
|
1018
|
-
// strict mode using a global Function call. This could conceivably fail
|
1019
|
-
// if a Content Security Policy forbids using Function, but in that case
|
1020
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
1021
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
1022
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
1023
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
1024
|
-
if (typeof globalThis === "object") {
|
1025
|
-
globalThis.regeneratorRuntime = runtime;
|
1026
|
-
} else {
|
1027
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
607
|
+
return {
|
608
|
+
done: false,
|
609
|
+
value: o[i++]
|
610
|
+
};
|
611
|
+
};
|
1028
612
|
}
|
613
|
+
|
614
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
1029
615
|
}
|
1030
|
-
});
|
1031
616
|
|
1032
617
|
var _personalMetaToPrefix;
|
1033
618
|
var personalMetaToPrefix = (_personalMetaToPrefix = {}, _personalMetaToPrefix[MetadataCategory.Personal] = 'you', _personalMetaToPrefix[MetadataCategory.ChildPersonal] = 'child', _personalMetaToPrefix[MetadataCategory.OtherPersonal] = 'other', _personalMetaToPrefix);
|
@@ -1197,38 +782,47 @@ var MissingGrant = /*#__PURE__*/function (_Error2) {
|
|
1197
782
|
|
1198
783
|
return MissingGrant;
|
1199
784
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
1200
|
-
var
|
1201
|
-
_inheritsLoose(
|
785
|
+
var MissingGrantFilter = /*#__PURE__*/function (_Error3) {
|
786
|
+
_inheritsLoose(MissingGrantFilter, _Error3);
|
1202
787
|
|
1203
|
-
function
|
788
|
+
function MissingGrantFilter() {
|
1204
789
|
return _Error3.apply(this, arguments) || this;
|
1205
790
|
}
|
1206
791
|
|
792
|
+
return MissingGrantFilter;
|
793
|
+
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
794
|
+
var MissingLockbox = /*#__PURE__*/function (_Error4) {
|
795
|
+
_inheritsLoose(MissingLockbox, _Error4);
|
796
|
+
|
797
|
+
function MissingLockbox() {
|
798
|
+
return _Error4.apply(this, arguments) || this;
|
799
|
+
}
|
800
|
+
|
1207
801
|
return MissingLockbox;
|
1208
802
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
1209
|
-
var MissingLockboxOwner = /*#__PURE__*/function (
|
1210
|
-
_inheritsLoose(MissingLockboxOwner,
|
803
|
+
var MissingLockboxOwner = /*#__PURE__*/function (_Error5) {
|
804
|
+
_inheritsLoose(MissingLockboxOwner, _Error5);
|
1211
805
|
|
1212
806
|
function MissingLockboxOwner() {
|
1213
|
-
return
|
807
|
+
return _Error5.apply(this, arguments) || this;
|
1214
808
|
}
|
1215
809
|
|
1216
810
|
return MissingLockboxOwner;
|
1217
811
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
1218
|
-
var AssociatedLockboxNotFound = /*#__PURE__*/function (
|
1219
|
-
_inheritsLoose(AssociatedLockboxNotFound,
|
812
|
+
var AssociatedLockboxNotFound = /*#__PURE__*/function (_Error6) {
|
813
|
+
_inheritsLoose(AssociatedLockboxNotFound, _Error6);
|
1220
814
|
|
1221
815
|
function AssociatedLockboxNotFound() {
|
1222
|
-
return
|
816
|
+
return _Error6.apply(this, arguments) || this;
|
1223
817
|
}
|
1224
818
|
|
1225
819
|
return AssociatedLockboxNotFound;
|
1226
820
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
1227
|
-
var WorkflowAnswersMissingError = /*#__PURE__*/function (
|
1228
|
-
_inheritsLoose(WorkflowAnswersMissingError,
|
821
|
+
var WorkflowAnswersMissingError = /*#__PURE__*/function (_Error7) {
|
822
|
+
_inheritsLoose(WorkflowAnswersMissingError, _Error7);
|
1229
823
|
|
1230
824
|
function WorkflowAnswersMissingError() {
|
1231
|
-
return
|
825
|
+
return _Error7.apply(this, arguments) || this;
|
1232
826
|
}
|
1233
827
|
|
1234
828
|
return WorkflowAnswersMissingError;
|
@@ -1248,9 +842,9 @@ function filterTriggeredAnsweredWithKind(_x, _x2) {
|
|
1248
842
|
*/
|
1249
843
|
|
1250
844
|
function _filterTriggeredAnsweredWithKind() {
|
1251
|
-
_filterTriggeredAnsweredWithKind = _asyncToGenerator( /*#__PURE__*/
|
845
|
+
_filterTriggeredAnsweredWithKind = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(workflowData, kind) {
|
1252
846
|
var flattenedAnswers, triggeredQuestionsWithKind, samePageAnswers, res;
|
1253
|
-
return
|
847
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
1254
848
|
while (1) {
|
1255
849
|
switch (_context.prev = _context.next) {
|
1256
850
|
case 0:
|
@@ -1294,9 +888,9 @@ function getWorkflowDataByCategory(_x3, _x4) {
|
|
1294
888
|
}
|
1295
889
|
|
1296
890
|
function _getWorkflowDataByCategory() {
|
1297
|
-
_getWorkflowDataByCategory = _asyncToGenerator( /*#__PURE__*/
|
891
|
+
_getWorkflowDataByCategory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(workflowData, category) {
|
1298
892
|
var flattenedAnswers, triggeredQuestions, fields;
|
1299
|
-
return
|
893
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
1300
894
|
while (1) {
|
1301
895
|
switch (_context2.prev = _context2.next) {
|
1302
896
|
case 0:
|
@@ -1367,8 +961,8 @@ function getImagesFromIndexDb(_x5) {
|
|
1367
961
|
*/
|
1368
962
|
|
1369
963
|
function _getImagesFromIndexDb() {
|
1370
|
-
_getImagesFromIndexDb = _asyncToGenerator( /*#__PURE__*/
|
1371
|
-
return
|
964
|
+
_getImagesFromIndexDb = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(answer) {
|
965
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
1372
966
|
while (1) {
|
1373
967
|
switch (_context3.prev = _context3.next) {
|
1374
968
|
case 0:
|
@@ -1444,9 +1038,9 @@ function populateWorkflowField(_x6, _x7) {
|
|
1444
1038
|
|
1445
1039
|
|
1446
1040
|
function _populateWorkflowField() {
|
1447
|
-
_populateWorkflowField = _asyncToGenerator( /*#__PURE__*/
|
1041
|
+
_populateWorkflowField = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(question, answerValue) {
|
1448
1042
|
var answer, displayedAnswer;
|
1449
|
-
return
|
1043
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
1450
1044
|
while (1) {
|
1451
1045
|
switch (_context4.prev = _context4.next) {
|
1452
1046
|
case 0:
|
@@ -1638,10 +1232,10 @@ function registerPatient(_x, _x2, _x3, _x4, _x5, _x6, _x7) {
|
|
1638
1232
|
*/
|
1639
1233
|
|
1640
1234
|
function _registerPatient() {
|
1641
|
-
_registerPatient = _asyncToGenerator( /*#__PURE__*/
|
1235
|
+
_registerPatient = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(patientUuid, consultRequest, workflow, oroClient, masterKey, recoveryQA, indexSearch) {
|
1642
1236
|
var consult, lockboxUuid, practitionerAdmin, retry, identity, errorsThrown, _ret;
|
1643
1237
|
|
1644
|
-
return
|
1238
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
1645
1239
|
while (1) {
|
1646
1240
|
switch (_context4.prev = _context4.next) {
|
1647
1241
|
case 0:
|
@@ -1663,11 +1257,11 @@ function _registerPatient() {
|
|
1663
1257
|
}
|
1664
1258
|
|
1665
1259
|
_context4.prev = 8;
|
1666
|
-
return _context4.delegateYield( /*#__PURE__*/
|
1260
|
+
return _context4.delegateYield( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
1667
1261
|
var _consultIndex, _identity, _identity2;
|
1668
1262
|
|
1669
1263
|
var practitioners, grantPromises, consultIndex, consultIndexPromises;
|
1670
|
-
return
|
1264
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
1671
1265
|
while (1) {
|
1672
1266
|
switch (_context3.prev = _context3.next) {
|
1673
1267
|
case 0:
|
@@ -1738,7 +1332,6 @@ function _registerPatient() {
|
|
1738
1332
|
return oroClient.grantLockbox(practitionerAdmin, lockboxUuid)["catch"](function (err) {
|
1739
1333
|
console.error("Error while granting lockbox to practitioner admin " + practitionerAdmin, err); // if we cannot grant to the admin, then the registration will fail
|
1740
1334
|
|
1741
|
-
// if we cannot grant to the admin, then the registration will fail
|
1742
1335
|
errorsThrown.push(err);
|
1743
1336
|
});
|
1744
1337
|
|
@@ -1747,15 +1340,14 @@ function _registerPatient() {
|
|
1747
1340
|
grantPromises = practitioners.filter(function (practitioner) {
|
1748
1341
|
return practitioner.uuid !== practitionerAdmin;
|
1749
1342
|
}).map( /*#__PURE__*/function () {
|
1750
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/
|
1751
|
-
return
|
1343
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(practitioner) {
|
1344
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
1752
1345
|
while (1) {
|
1753
1346
|
switch (_context.prev = _context.next) {
|
1754
1347
|
case 0:
|
1755
1348
|
return _context.abrupt("return", oroClient.grantLockbox(practitioner.uuid, lockboxUuid)["catch"](function (err) {
|
1756
1349
|
console.error("Error while granting lockbox to practitioner", err); // Acceptable to continue as admin has already been granted, but we should still retry until the last retry remains
|
1757
1350
|
|
1758
|
-
// Acceptable to continue as admin has already been granted, but we should still retry until the last retry remains
|
1759
1351
|
if (retry <= 1) return;
|
1760
1352
|
errorsThrown.push(err);
|
1761
1353
|
}));
|
@@ -1781,15 +1373,14 @@ function _registerPatient() {
|
|
1781
1373
|
}], _consultIndex); // the index will identify in which lockbox a consultation resides
|
1782
1374
|
|
1783
1375
|
consultIndexPromises = practitioners.map( /*#__PURE__*/function () {
|
1784
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/
|
1785
|
-
return
|
1376
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(practitioner) {
|
1377
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
1786
1378
|
while (1) {
|
1787
1379
|
switch (_context2.prev = _context2.next) {
|
1788
1380
|
case 0:
|
1789
1381
|
return _context2.abrupt("return", oroClient.vaultIndexAdd(consultIndex, practitioner.uuid)["catch"](function (err) {
|
1790
1382
|
console.error("[SDK: registration] Error while adding to the practitioner's index " + practitioner.uuid, err); // Acceptable to continue as the index can be rebuilt, but we should still retry until the last retry remains
|
1791
1383
|
|
1792
|
-
// Acceptable to continue as the index can be rebuilt, but we should still retry until the last retry remains
|
1793
1384
|
if (retry <= 1) return;else errorsThrown.push(err);
|
1794
1385
|
}));
|
1795
1386
|
|
@@ -1809,7 +1400,6 @@ function _registerPatient() {
|
|
1809
1400
|
return storeImageAliases(consult.uuid, lockboxUuid, workflow, oroClient)["catch"](function (err) {
|
1810
1401
|
console.error('[SDK: registration] Some errors happened during image upload', err); // Acceptable to continue as images can be requested during the consultation, but we should still retry until the last retry remains
|
1811
1402
|
|
1812
|
-
// Acceptable to continue as images can be requested during the consultation, but we should still retry until the last retry remains
|
1813
1403
|
if (retry <= 1) return;else errorsThrown.push(err);
|
1814
1404
|
});
|
1815
1405
|
|
@@ -1830,7 +1420,6 @@ function _registerPatient() {
|
|
1830
1420
|
return oroClient.updateMasterKey(patientUuid, masterKey, lockboxUuid)["catch"](function (err) {
|
1831
1421
|
console.error("[SDK: registration] Error while updating master key", err); /// it's acceptable to continue registration (return old identity)
|
1832
1422
|
|
1833
|
-
/// it's acceptable to continue registration (return old identity)
|
1834
1423
|
if (retry <= 1) return;
|
1835
1424
|
errorsThrown.push(err);
|
1836
1425
|
return identity;
|
@@ -1855,7 +1444,6 @@ function _registerPatient() {
|
|
1855
1444
|
return oroClient.updateSecurityQuestions(patientUuid, recoveryQA.recoverySecurityQuestions, recoveryQA.recoverySecurityAnswers, 2)["catch"](function (err) {
|
1856
1445
|
console.error("[SDK: registration] Error while updating security questions", err); /// it's acceptable to continue registration (return old identity)
|
1857
1446
|
|
1858
|
-
/// it's acceptable to continue registration (return old identity)
|
1859
1447
|
if (retry <= 1) return;
|
1860
1448
|
errorsThrown.push(err);
|
1861
1449
|
return identity;
|
@@ -1879,7 +1467,6 @@ function _registerPatient() {
|
|
1879
1467
|
console.error('[SDK: registration] personal information not found or another error occured during search indexing', err);
|
1880
1468
|
if (retry <= 1) return; // this statement is to avoid failing the registration due to the failure in search indexing the consult, this practically implements a soft retry
|
1881
1469
|
|
1882
|
-
// this statement is to avoid failing the registration due to the failure in search indexing the consult, this practically implements a soft retry
|
1883
1470
|
errorsThrown.push(err);
|
1884
1471
|
});
|
1885
1472
|
|
@@ -1976,9 +1563,9 @@ function getOrCreatePatientConsultationUuid(_x8, _x9) {
|
|
1976
1563
|
|
1977
1564
|
|
1978
1565
|
function _getOrCreatePatientConsultationUuid() {
|
1979
|
-
_getOrCreatePatientConsultationUuid = _asyncToGenerator( /*#__PURE__*/
|
1566
|
+
_getOrCreatePatientConsultationUuid = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(consult, oroClient) {
|
1980
1567
|
var payment;
|
1981
|
-
return
|
1568
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
1982
1569
|
while (1) {
|
1983
1570
|
switch (_context5.prev = _context5.next) {
|
1984
1571
|
case 0:
|
@@ -2033,14 +1620,14 @@ function getOrCreatePatientLockbox(_x10) {
|
|
2033
1620
|
|
2034
1621
|
|
2035
1622
|
function _getOrCreatePatientLockbox() {
|
2036
|
-
_getOrCreatePatientLockbox = _asyncToGenerator( /*#__PURE__*/
|
2037
|
-
var grants;
|
2038
|
-
return
|
1623
|
+
_getOrCreatePatientLockbox = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(oroClient) {
|
1624
|
+
var grants, lockboxResponse, tokens;
|
1625
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
2039
1626
|
while (1) {
|
2040
1627
|
switch (_context6.prev = _context6.next) {
|
2041
1628
|
case 0:
|
2042
1629
|
_context6.next = 2;
|
2043
|
-
return oroClient.getGrants(
|
1630
|
+
return oroClient.getGrants();
|
2044
1631
|
|
2045
1632
|
case 2:
|
2046
1633
|
grants = _context6.sent;
|
@@ -2061,9 +1648,26 @@ function _getOrCreatePatientLockbox() {
|
|
2061
1648
|
});
|
2062
1649
|
|
2063
1650
|
case 10:
|
2064
|
-
|
1651
|
+
lockboxResponse = _context6.sent;
|
1652
|
+
_context6.next = 13;
|
1653
|
+
return oroClient.guardClient.authRefresh();
|
2065
1654
|
|
2066
|
-
case
|
1655
|
+
case 13:
|
1656
|
+
tokens = _context6.sent;
|
1657
|
+
_context6.next = 16;
|
1658
|
+
return oroClient.guardClient.setTokens({
|
1659
|
+
accessToken: tokens.accessToken,
|
1660
|
+
refreshToken: tokens.refreshToken
|
1661
|
+
});
|
1662
|
+
|
1663
|
+
case 16:
|
1664
|
+
_context6.next = 18;
|
1665
|
+
return oroClient.guardClient.whoAmI(true);
|
1666
|
+
|
1667
|
+
case 18:
|
1668
|
+
return _context6.abrupt("return", lockboxResponse.lockboxUuid);
|
1669
|
+
|
1670
|
+
case 19:
|
2067
1671
|
case "end":
|
2068
1672
|
return _context6.stop();
|
2069
1673
|
}
|
@@ -2078,8 +1682,8 @@ function storePatientData(_x11, _x12, _x13, _x14, _x15) {
|
|
2078
1682
|
}
|
2079
1683
|
|
2080
1684
|
function _storePatientData() {
|
2081
|
-
_storePatientData = _asyncToGenerator( /*#__PURE__*/
|
2082
|
-
return
|
1685
|
+
_storePatientData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(consultationId, isoLanguage, lockboxUuid, workflow, oroClient) {
|
1686
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
2083
1687
|
while (1) {
|
2084
1688
|
switch (_context7.prev = _context7.next) {
|
2085
1689
|
case 0:
|
@@ -2136,9 +1740,9 @@ function storeImageAliases(_x16, _x17, _x18, _x19) {
|
|
2136
1740
|
|
2137
1741
|
|
2138
1742
|
function _storeImageAliases() {
|
2139
|
-
_storeImageAliases = _asyncToGenerator( /*#__PURE__*/
|
1743
|
+
_storeImageAliases = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(consultationId, lockboxUuid, workflow, oroClient) {
|
2140
1744
|
var images, nonNullImages, promises;
|
2141
|
-
return
|
1745
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
2142
1746
|
while (1) {
|
2143
1747
|
switch (_context8.prev = _context8.next) {
|
2144
1748
|
case 0:
|
@@ -2190,8 +1794,8 @@ function extractAndStorePersonalWorkflowData(_x20, _x21, _x22, _x23, _x24) {
|
|
2190
1794
|
*/
|
2191
1795
|
|
2192
1796
|
function _extractAndStorePersonalWorkflowData() {
|
2193
|
-
_extractAndStorePersonalWorkflowData = _asyncToGenerator( /*#__PURE__*/
|
2194
|
-
return
|
1797
|
+
_extractAndStorePersonalWorkflowData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(workflow, lockboxUuid, consultationId, category, oroClient) {
|
1798
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
2195
1799
|
while (1) {
|
2196
1800
|
switch (_context9.prev = _context9.next) {
|
2197
1801
|
case 0:
|
@@ -2225,8 +1829,8 @@ function extractPersonalInfoFromWorkflowData(_x25) {
|
|
2225
1829
|
*/
|
2226
1830
|
|
2227
1831
|
function _extractPersonalInfoFromWorkflowData() {
|
2228
|
-
_extractPersonalInfoFromWorkflowData = _asyncToGenerator( /*#__PURE__*/
|
2229
|
-
return
|
1832
|
+
_extractPersonalInfoFromWorkflowData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(workflow) {
|
1833
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
2230
1834
|
while (1) {
|
2231
1835
|
switch (_context10.prev = _context10.next) {
|
2232
1836
|
case 0:
|
@@ -2256,10 +1860,10 @@ function buildConsultSearchIndex(_x26, _x27, _x28) {
|
|
2256
1860
|
}
|
2257
1861
|
|
2258
1862
|
function _buildConsultSearchIndex() {
|
2259
|
-
_buildConsultSearchIndex = _asyncToGenerator( /*#__PURE__*/
|
1863
|
+
_buildConsultSearchIndex = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(consult, workflow, oroClient) {
|
2260
1864
|
var terms, _yield$extractPersona, personalInfoPopulatedWfData, childPersonalInfoPopulatedWfData, otherPersonalInfoPopulatedWfData, personalInfo, childPersonalInfo, otherPersonalInfo;
|
2261
1865
|
|
2262
|
-
return
|
1866
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
2263
1867
|
while (1) {
|
2264
1868
|
switch (_context11.prev = _context11.next) {
|
2265
1869
|
case 0:
|
@@ -2369,151 +1973,65 @@ function decryptConsultLockboxGrants(encryptedConsultLockboxes, rsaKey) {
|
|
2369
1973
|
|
2370
1974
|
/**
|
2371
1975
|
* @name filterGrantsWithLockboxMetadata
|
2372
|
-
* @description searches for the
|
1976
|
+
* @description searches for the existance of a consult uuid in each granted lockbox
|
2373
1977
|
* @param oroClient
|
2374
|
-
* @param filter: the
|
2375
|
-
* @
|
2376
|
-
* @param forceRefresh
|
2377
|
-
* @returns the filtered grants
|
1978
|
+
* @param filter: the consult uuid
|
1979
|
+
* @returns the grants containing the consult uuid
|
2378
1980
|
*/
|
2379
1981
|
|
2380
|
-
function filterGrantsWithLockboxMetadata(_x, _x2
|
1982
|
+
function filterGrantsWithLockboxMetadata(_x, _x2) {
|
2381
1983
|
return _filterGrantsWithLockboxMetadata.apply(this, arguments);
|
2382
1984
|
}
|
2383
|
-
/** Finds all grants for the logged user
|
2384
|
-
* requests a list of unique consultation ids for each lockbox the user has access to
|
2385
|
-
* builds and sets the index of consultations
|
2386
|
-
* @param oroClient
|
2387
|
-
* @returns the constructed vaultIndex
|
2388
|
-
*/
|
2389
1985
|
|
2390
1986
|
function _filterGrantsWithLockboxMetadata() {
|
2391
|
-
_filterGrantsWithLockboxMetadata = _asyncToGenerator( /*#__PURE__*/
|
2392
|
-
var
|
1987
|
+
_filterGrantsWithLockboxMetadata = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(oroClient, filter) {
|
1988
|
+
var grants, filteredGrants, _iterator, _step, grant, consultationIdExistsInMetadata;
|
2393
1989
|
|
2394
|
-
return
|
1990
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
2395
1991
|
while (1) {
|
2396
1992
|
switch (_context.prev = _context.next) {
|
2397
1993
|
case 0:
|
2398
|
-
|
2399
|
-
forceRefresh = false;
|
2400
|
-
}
|
2401
|
-
|
2402
|
-
if (!(!vaultIndex || forceRefresh)) {
|
2403
|
-
_context.next = 5;
|
2404
|
-
break;
|
2405
|
-
}
|
2406
|
-
|
2407
|
-
_context.next = 4;
|
2408
|
-
return buildLegacyVaultIndex(oroClient);
|
2409
|
-
|
2410
|
-
case 4:
|
2411
|
-
vaultIndex = _context.sent;
|
2412
|
-
|
2413
|
-
case 5:
|
2414
|
-
if (!(vaultIndex[IndexKey.Consultation] && filter)) {
|
2415
|
-
_context.next = 10;
|
2416
|
-
break;
|
2417
|
-
}
|
2418
|
-
|
2419
|
-
indexConsults = ((_vaultIndex$IndexKey$ = vaultIndex[IndexKey.Consultation]) != null ? _vaultIndex$IndexKey$ : []).filter(function (consultGrant) {
|
2420
|
-
return consultGrant.consultationId === filter.consultationId;
|
2421
|
-
}).map(function (consultGrant) {
|
2422
|
-
return consultGrant.grant;
|
2423
|
-
});
|
2424
|
-
return _context.abrupt("return", indexConsults);
|
2425
|
-
|
2426
|
-
case 10:
|
2427
|
-
return _context.abrupt("return", []);
|
2428
|
-
|
2429
|
-
case 11:
|
2430
|
-
case "end":
|
2431
|
-
return _context.stop();
|
2432
|
-
}
|
2433
|
-
}
|
2434
|
-
}, _callee);
|
2435
|
-
}));
|
2436
|
-
return _filterGrantsWithLockboxMetadata.apply(this, arguments);
|
2437
|
-
}
|
2438
|
-
|
2439
|
-
function buildLegacyVaultIndex(_x5) {
|
2440
|
-
return _buildLegacyVaultIndex.apply(this, arguments);
|
2441
|
-
}
|
2442
|
-
|
2443
|
-
function _buildLegacyVaultIndex() {
|
2444
|
-
_buildLegacyVaultIndex = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(oroClient) {
|
2445
|
-
var _vaultIndex;
|
2446
|
-
|
2447
|
-
var grants, consultGrants, _loop, _iterator, _step, vaultIndex;
|
2448
|
-
|
2449
|
-
return runtime_1.wrap(function _callee2$(_context3) {
|
2450
|
-
while (1) {
|
2451
|
-
switch (_context3.prev = _context3.next) {
|
2452
|
-
case 0:
|
2453
|
-
_context3.next = 2;
|
1994
|
+
_context.next = 2;
|
2454
1995
|
return oroClient.getGrants();
|
2455
1996
|
|
2456
1997
|
case 2:
|
2457
|
-
grants =
|
2458
|
-
|
2459
|
-
_loop = /*#__PURE__*/runtime_1.mark(function _loop() {
|
2460
|
-
var grant, consults;
|
2461
|
-
return runtime_1.wrap(function _loop$(_context2) {
|
2462
|
-
while (1) {
|
2463
|
-
switch (_context2.prev = _context2.next) {
|
2464
|
-
case 0:
|
2465
|
-
grant = _step.value;
|
2466
|
-
_context2.next = 3;
|
2467
|
-
return oroClient.vaultClient.lockboxMetadataGet(grant.lockboxUuid, ['consultationId'], [], {
|
2468
|
-
category: MetadataCategory.Consultation
|
2469
|
-
});
|
2470
|
-
|
2471
|
-
case 3:
|
2472
|
-
consults = _context2.sent[0];
|
2473
|
-
consultGrants = [].concat(consultGrants, consults.map(function (consult) {
|
2474
|
-
return _extends({}, consult, {
|
2475
|
-
grant: {
|
2476
|
-
lockboxOwnerUuid: grant.lockboxOwnerUuid,
|
2477
|
-
lockboxUuid: grant.lockboxUuid
|
2478
|
-
}
|
2479
|
-
});
|
2480
|
-
}));
|
2481
|
-
|
2482
|
-
case 5:
|
2483
|
-
case "end":
|
2484
|
-
return _context2.stop();
|
2485
|
-
}
|
2486
|
-
}
|
2487
|
-
}, _loop);
|
2488
|
-
});
|
1998
|
+
grants = _context.sent;
|
1999
|
+
filteredGrants = [];
|
2489
2000
|
_iterator = _createForOfIteratorHelperLoose(grants);
|
2490
2001
|
|
2491
|
-
case
|
2002
|
+
case 5:
|
2492
2003
|
if ((_step = _iterator()).done) {
|
2493
|
-
|
2004
|
+
_context.next = 13;
|
2494
2005
|
break;
|
2495
2006
|
}
|
2496
2007
|
|
2497
|
-
|
2008
|
+
grant = _step.value;
|
2009
|
+
_context.next = 9;
|
2010
|
+
return oroClient.vaultClient.lockboxMetadataGet(grant.lockboxUuid, ['consultationId'], [], {
|
2011
|
+
category: MetadataCategory.Consultation,
|
2012
|
+
consultationId: filter.consultationId
|
2013
|
+
});
|
2498
2014
|
|
2499
|
-
case
|
2500
|
-
|
2015
|
+
case 9:
|
2016
|
+
consultationIdExistsInMetadata = _context.sent;
|
2017
|
+
// If there are entries in the metadata, it means that the consult exists in the lockbox
|
2018
|
+
if (consultationIdExistsInMetadata[0].length >= 0) filteredGrants.push(grant);
|
2019
|
+
|
2020
|
+
case 11:
|
2021
|
+
_context.next = 5;
|
2501
2022
|
break;
|
2502
2023
|
|
2503
|
-
case
|
2504
|
-
|
2505
|
-
oroClient.setVaultIndex(vaultIndex);
|
2506
|
-
console.info('[sdk:index] Successfully Built Vault Index');
|
2507
|
-
return _context3.abrupt("return", vaultIndex);
|
2024
|
+
case 13:
|
2025
|
+
return _context.abrupt("return", filteredGrants);
|
2508
2026
|
|
2509
2027
|
case 14:
|
2510
2028
|
case "end":
|
2511
|
-
return
|
2029
|
+
return _context.stop();
|
2512
2030
|
}
|
2513
2031
|
}
|
2514
|
-
},
|
2032
|
+
}, _callee);
|
2515
2033
|
}));
|
2516
|
-
return
|
2034
|
+
return _filterGrantsWithLockboxMetadata.apply(this, arguments);
|
2517
2035
|
}
|
2518
2036
|
|
2519
2037
|
var OroClient = /*#__PURE__*/function () {
|
@@ -2542,16 +2060,15 @@ var OroClient = /*#__PURE__*/function () {
|
|
2542
2060
|
_proto.cleanIndex =
|
2543
2061
|
/*#__PURE__*/
|
2544
2062
|
function () {
|
2545
|
-
var _cleanIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2546
|
-
return
|
2063
|
+
var _cleanIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
2064
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
2547
2065
|
while (1) {
|
2548
2066
|
switch (_context.prev = _context.next) {
|
2549
2067
|
case 0:
|
2550
|
-
this.vaultIndex = undefined;
|
2551
2068
|
this.cachedMetadataGrants = {};
|
2552
2069
|
this.cachedManifest = {};
|
2553
2070
|
|
2554
|
-
case
|
2071
|
+
case 2:
|
2555
2072
|
case "end":
|
2556
2073
|
return _context.stop();
|
2557
2074
|
}
|
@@ -2581,9 +2098,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2581
2098
|
_proto.signUp =
|
2582
2099
|
/*#__PURE__*/
|
2583
2100
|
function () {
|
2584
|
-
var _signUp = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2101
|
+
var _signUp = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(email, password, practice, tosAndCpAcceptance, tokenData, subscription, skipEmailValidation) {
|
2585
2102
|
var privateKey, symmetricEncryptor, recoveryPassword, hashedPassword, emailConfirmed, signupRequest, identity, symetricEncryptor;
|
2586
|
-
return
|
2103
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
2587
2104
|
while (1) {
|
2588
2105
|
switch (_context2.prev = _context2.next) {
|
2589
2106
|
case 0:
|
@@ -2642,9 +2159,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2642
2159
|
_proto.confirmEmail =
|
2643
2160
|
/*#__PURE__*/
|
2644
2161
|
function () {
|
2645
|
-
var _confirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2162
|
+
var _confirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(accessToken) {
|
2646
2163
|
var claims;
|
2647
|
-
return
|
2164
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
2648
2165
|
while (1) {
|
2649
2166
|
switch (_context3.prev = _context3.next) {
|
2650
2167
|
case 0:
|
@@ -2689,9 +2206,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2689
2206
|
_proto.signIn =
|
2690
2207
|
/*#__PURE__*/
|
2691
2208
|
function () {
|
2692
|
-
var _signIn = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2209
|
+
var _signIn = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(practiceUuid, email, password, otp) {
|
2693
2210
|
var hashedPassword, tokenRequest, userUuid;
|
2694
|
-
return
|
2211
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
2695
2212
|
while (1) {
|
2696
2213
|
switch (_context4.prev = _context4.next) {
|
2697
2214
|
case 0:
|
@@ -2744,9 +2261,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2744
2261
|
_proto.resumeSession =
|
2745
2262
|
/*#__PURE__*/
|
2746
2263
|
function () {
|
2747
|
-
var _resumeSession = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2264
|
+
var _resumeSession = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
2748
2265
|
var id, recoveryPayload, recoveryKey, symmetricDecryptor, privateKey;
|
2749
|
-
return
|
2266
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
2750
2267
|
while (1) {
|
2751
2268
|
switch (_context5.prev = _context5.next) {
|
2752
2269
|
case 0:
|
@@ -2847,8 +2364,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
2847
2364
|
_proto.signOut =
|
2848
2365
|
/*#__PURE__*/
|
2849
2366
|
function () {
|
2850
|
-
var _signOut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2851
|
-
return
|
2367
|
+
var _signOut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
2368
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
2852
2369
|
while (1) {
|
2853
2370
|
switch (_context6.prev = _context6.next) {
|
2854
2371
|
case 0:
|
@@ -2898,8 +2415,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
2898
2415
|
_proto.registerPatient =
|
2899
2416
|
/*#__PURE__*/
|
2900
2417
|
function () {
|
2901
|
-
var _registerPatient2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2902
|
-
return
|
2418
|
+
var _registerPatient2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(patientUuid, consult, workflow, recoveryQA, indexSearch) {
|
2419
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
2903
2420
|
while (1) {
|
2904
2421
|
switch (_context7.prev = _context7.next) {
|
2905
2422
|
case 0:
|
@@ -2931,61 +2448,6 @@ var OroClient = /*#__PURE__*/function () {
|
|
2931
2448
|
|
2932
2449
|
return registerPatient$1;
|
2933
2450
|
}()
|
2934
|
-
/**
|
2935
|
-
* Builds the vault index for the logged user
|
2936
|
-
*
|
2937
|
-
* Steps:
|
2938
|
-
* 1. Retrieves, decrypts and sets the lockbox IndexSnapshot
|
2939
|
-
* 2. Retrieves, decrypts and adds all other index entries starting at the snapshot timestamp
|
2940
|
-
* 3. Updates the IndexSnapshot if changed
|
2941
|
-
* @deprecated
|
2942
|
-
* @returns the latest vault index
|
2943
|
-
*/
|
2944
|
-
;
|
2945
|
-
|
2946
|
-
_proto.buildVaultIndex =
|
2947
|
-
/*#__PURE__*/
|
2948
|
-
function () {
|
2949
|
-
var _buildVaultIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(forceRefresh) {
|
2950
|
-
return runtime_1.wrap(function _callee8$(_context8) {
|
2951
|
-
while (1) {
|
2952
|
-
switch (_context8.prev = _context8.next) {
|
2953
|
-
case 0:
|
2954
|
-
if (forceRefresh === void 0) {
|
2955
|
-
forceRefresh = false;
|
2956
|
-
}
|
2957
|
-
|
2958
|
-
if (!(!this.vaultIndex || forceRefresh)) {
|
2959
|
-
_context8.next = 4;
|
2960
|
-
break;
|
2961
|
-
}
|
2962
|
-
|
2963
|
-
_context8.next = 4;
|
2964
|
-
return buildLegacyVaultIndex(this);
|
2965
|
-
|
2966
|
-
case 4:
|
2967
|
-
case "end":
|
2968
|
-
return _context8.stop();
|
2969
|
-
}
|
2970
|
-
}
|
2971
|
-
}, _callee8, this);
|
2972
|
-
}));
|
2973
|
-
|
2974
|
-
function buildVaultIndex(_x18) {
|
2975
|
-
return _buildVaultIndex.apply(this, arguments);
|
2976
|
-
}
|
2977
|
-
|
2978
|
-
return buildVaultIndex;
|
2979
|
-
}()
|
2980
|
-
/**
|
2981
|
-
* Setter for the vault index
|
2982
|
-
* @param index
|
2983
|
-
*/
|
2984
|
-
;
|
2985
|
-
|
2986
|
-
_proto.setVaultIndex = function setVaultIndex(index) {
|
2987
|
-
this.vaultIndex = index;
|
2988
|
-
}
|
2989
2451
|
/**
|
2990
2452
|
* Fetches all grants, and consultations that exist in each lockbox
|
2991
2453
|
* Then updates the index for the current user with the lockbox consult relationship
|
@@ -2995,28 +2457,28 @@ var OroClient = /*#__PURE__*/function () {
|
|
2995
2457
|
_proto.forceUpdateIndexEntries =
|
2996
2458
|
/*#__PURE__*/
|
2997
2459
|
function () {
|
2998
|
-
var _forceUpdateIndexEntries = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2460
|
+
var _forceUpdateIndexEntries = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
2999
2461
|
var _this = this,
|
3000
2462
|
_this$vaultIndexAdd;
|
3001
2463
|
|
3002
2464
|
var grants, indexConsultLockbox;
|
3003
|
-
return
|
2465
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
3004
2466
|
while (1) {
|
3005
|
-
switch (
|
2467
|
+
switch (_context9.prev = _context9.next) {
|
3006
2468
|
case 0:
|
3007
|
-
|
2469
|
+
_context9.next = 2;
|
3008
2470
|
return this.getGrants();
|
3009
2471
|
|
3010
2472
|
case 2:
|
3011
|
-
grants =
|
3012
|
-
|
2473
|
+
grants = _context9.sent;
|
2474
|
+
_context9.next = 5;
|
3013
2475
|
return Promise.all(grants.map( /*#__PURE__*/function () {
|
3014
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/
|
3015
|
-
return
|
2476
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(grant) {
|
2477
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
3016
2478
|
while (1) {
|
3017
|
-
switch (
|
2479
|
+
switch (_context8.prev = _context8.next) {
|
3018
2480
|
case 0:
|
3019
|
-
|
2481
|
+
_context8.next = 2;
|
3020
2482
|
return _this.vaultClient.lockboxMetadataGet(grant.lockboxUuid, ['consultationId'], [], {
|
3021
2483
|
category: MetadataCategory.Consultation
|
3022
2484
|
}, grant.lockboxOwnerUuid).then(function (consults) {
|
@@ -3038,17 +2500,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
3038
2500
|
});
|
3039
2501
|
|
3040
2502
|
case 2:
|
3041
|
-
return
|
2503
|
+
return _context8.abrupt("return", _context8.sent);
|
3042
2504
|
|
3043
2505
|
case 3:
|
3044
2506
|
case "end":
|
3045
|
-
return
|
2507
|
+
return _context8.stop();
|
3046
2508
|
}
|
3047
2509
|
}
|
3048
|
-
},
|
2510
|
+
}, _callee8);
|
3049
2511
|
}));
|
3050
2512
|
|
3051
|
-
return function (
|
2513
|
+
return function (_x18) {
|
3052
2514
|
return _ref2.apply(this, arguments);
|
3053
2515
|
};
|
3054
2516
|
}())).then(function (consults) {
|
@@ -3056,7 +2518,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3056
2518
|
});
|
3057
2519
|
|
3058
2520
|
case 5:
|
3059
|
-
indexConsultLockbox =
|
2521
|
+
indexConsultLockbox = _context9.sent;
|
3060
2522
|
this.vaultIndexAdd((_this$vaultIndexAdd = {}, _this$vaultIndexAdd[IndexKey.Consultation] = indexConsultLockbox, _this$vaultIndexAdd)).then(function () {
|
3061
2523
|
return alert('The Index was successfully updated!');
|
3062
2524
|
})["catch"](function () {
|
@@ -3065,10 +2527,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
3065
2527
|
|
3066
2528
|
case 7:
|
3067
2529
|
case "end":
|
3068
|
-
return
|
2530
|
+
return _context9.stop();
|
3069
2531
|
}
|
3070
2532
|
}
|
3071
|
-
},
|
2533
|
+
}, _callee9, this);
|
3072
2534
|
}));
|
3073
2535
|
|
3074
2536
|
function forceUpdateIndexEntries() {
|
@@ -3088,17 +2550,15 @@ var OroClient = /*#__PURE__*/function () {
|
|
3088
2550
|
_proto.vaultIndexAdd =
|
3089
2551
|
/*#__PURE__*/
|
3090
2552
|
function () {
|
3091
|
-
var _vaultIndexAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3092
|
-
var _this2 = this;
|
3093
|
-
|
2553
|
+
var _vaultIndexAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(entries, indexOwnerUuid) {
|
3094
2554
|
var rsaPub, base64IndexOwnerPubKey, encryptedIndex, _i, _Object$keys, keyString, key;
|
3095
2555
|
|
3096
|
-
return
|
2556
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
3097
2557
|
while (1) {
|
3098
|
-
switch (
|
2558
|
+
switch (_context10.prev = _context10.next) {
|
3099
2559
|
case 0:
|
3100
2560
|
if (this.rsa) {
|
3101
|
-
|
2561
|
+
_context10.next = 2;
|
3102
2562
|
break;
|
3103
2563
|
}
|
3104
2564
|
|
@@ -3106,17 +2566,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
3106
2566
|
|
3107
2567
|
case 2:
|
3108
2568
|
if (!indexOwnerUuid) {
|
3109
|
-
|
2569
|
+
_context10.next = 9;
|
3110
2570
|
break;
|
3111
2571
|
}
|
3112
2572
|
|
3113
|
-
|
2573
|
+
_context10.next = 5;
|
3114
2574
|
return this.guardClient.identityGet(indexOwnerUuid);
|
3115
2575
|
|
3116
2576
|
case 5:
|
3117
|
-
base64IndexOwnerPubKey =
|
2577
|
+
base64IndexOwnerPubKey = _context10.sent.publicKey;
|
3118
2578
|
rsaPub = this.toolbox.decodeFromBase64(base64IndexOwnerPubKey);
|
3119
|
-
|
2579
|
+
_context10.next = 10;
|
3120
2580
|
break;
|
3121
2581
|
|
3122
2582
|
case 9:
|
@@ -3128,14 +2588,14 @@ var OroClient = /*#__PURE__*/function () {
|
|
3128
2588
|
|
3129
2589
|
case 12:
|
3130
2590
|
if (!(_i < _Object$keys.length)) {
|
3131
|
-
|
2591
|
+
_context10.next = 23;
|
3132
2592
|
break;
|
3133
2593
|
}
|
3134
2594
|
|
3135
2595
|
keyString = _Object$keys[_i];
|
3136
2596
|
key = keyString;
|
3137
|
-
|
3138
|
-
|
2597
|
+
_context10.t0 = key;
|
2598
|
+
_context10.next = _context10.t0 === IndexKey.ConsultationLockbox ? 18 : 20;
|
3139
2599
|
break;
|
3140
2600
|
|
3141
2601
|
case 18:
|
@@ -3154,117 +2614,31 @@ var OroClient = /*#__PURE__*/function () {
|
|
3154
2614
|
}, rsaPub)
|
3155
2615
|
};
|
3156
2616
|
});
|
3157
|
-
return
|
2617
|
+
return _context10.abrupt("break", 20);
|
3158
2618
|
|
3159
2619
|
case 20:
|
3160
|
-
encryptedIndex[key] = entries[key].map(function (e) {
|
3161
|
-
return _extends({}, e, {
|
3162
|
-
uniqueHash: _this2.toolbox.hashStringToBase64(JSON.stringify({
|
3163
|
-
consultationId: e.consultationId,
|
3164
|
-
grant: e.grant
|
3165
|
-
}))
|
3166
|
-
});
|
3167
|
-
}).filter(function (e) {
|
3168
|
-
var _this2$vaultIndex$Ind;
|
3169
|
-
|
3170
|
-
return !_this2.vaultIndex || !((_this2$vaultIndex$Ind = _this2.vaultIndex[IndexKey.Consultation]) != null && _this2$vaultIndex$Ind.find(function (v) {
|
3171
|
-
return v.uniqueHash === e.uniqueHash;
|
3172
|
-
}));
|
3173
|
-
}).map(function (e) {
|
3174
|
-
return {
|
3175
|
-
uuid: e.uuid,
|
3176
|
-
timestamp: e.timestamp,
|
3177
|
-
uniqueHash: e.uniqueHash,
|
3178
|
-
encryptedIndexEntry: CryptoRSA.jsonWithPubEncryptToBase64({
|
3179
|
-
consultationId: e.consultationId,
|
3180
|
-
grant: e.grant
|
3181
|
-
}, rsaPub)
|
3182
|
-
};
|
3183
|
-
});
|
3184
|
-
return _context11.abrupt("break", 22);
|
3185
|
-
|
3186
|
-
case 22:
|
3187
2620
|
_i++;
|
3188
|
-
|
2621
|
+
_context10.next = 12;
|
3189
2622
|
break;
|
3190
2623
|
|
3191
|
-
case
|
3192
|
-
|
2624
|
+
case 23:
|
2625
|
+
_context10.next = 25;
|
3193
2626
|
return this.vaultClient.vaultIndexPut(encryptedIndex, indexOwnerUuid);
|
3194
2627
|
|
3195
|
-
case
|
2628
|
+
case 25:
|
3196
2629
|
case "end":
|
3197
|
-
return
|
2630
|
+
return _context10.stop();
|
3198
2631
|
}
|
3199
2632
|
}
|
3200
|
-
},
|
2633
|
+
}, _callee10, this);
|
3201
2634
|
}));
|
3202
2635
|
|
3203
|
-
function vaultIndexAdd(
|
2636
|
+
function vaultIndexAdd(_x19, _x20) {
|
3204
2637
|
return _vaultIndexAdd.apply(this, arguments);
|
3205
2638
|
}
|
3206
2639
|
|
3207
2640
|
return vaultIndexAdd;
|
3208
2641
|
}()
|
3209
|
-
/**
|
3210
|
-
* adds or updates the index snapshot for the logged user
|
3211
|
-
* @param index
|
3212
|
-
*/
|
3213
|
-
;
|
3214
|
-
|
3215
|
-
_proto.indexSnapshotAdd =
|
3216
|
-
/*#__PURE__*/
|
3217
|
-
function () {
|
3218
|
-
var _indexSnapshotAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(index) {
|
3219
|
-
var _index$IndexKey$Consu, _cleanedIndex;
|
3220
|
-
|
3221
|
-
var rsaPub, cleanedIndex, encryptedIndexEntry, encryptedIndex;
|
3222
|
-
return runtime_1.wrap(function _callee12$(_context12) {
|
3223
|
-
while (1) {
|
3224
|
-
switch (_context12.prev = _context12.next) {
|
3225
|
-
case 0:
|
3226
|
-
if (this.rsa) {
|
3227
|
-
_context12.next = 2;
|
3228
|
-
break;
|
3229
|
-
}
|
3230
|
-
|
3231
|
-
throw IncompleteAuthentication;
|
3232
|
-
|
3233
|
-
case 2:
|
3234
|
-
rsaPub = this.rsa["public"]();
|
3235
|
-
cleanedIndex = (_cleanedIndex = {}, _cleanedIndex[IndexKey.Consultation] = (_index$IndexKey$Consu = index[IndexKey.Consultation]) == null ? void 0 : _index$IndexKey$Consu.filter(function (c) {
|
3236
|
-
return c;
|
3237
|
-
}).map(function (c) {
|
3238
|
-
return {
|
3239
|
-
grant: c.grant,
|
3240
|
-
consultationId: c.consultationId
|
3241
|
-
};
|
3242
|
-
}), _cleanedIndex); // the data of the snapshot should not contain the `IndexEntry` data
|
3243
|
-
// (will create conflicts while updating)
|
3244
|
-
|
3245
|
-
encryptedIndexEntry = CryptoRSA.jsonWithPubEncryptToBase64(cleanedIndex, rsaPub); // The encryptedIndexEntry can have the uuid and timstamp (for updating)
|
3246
|
-
|
3247
|
-
encryptedIndex = {
|
3248
|
-
uuid: index.uuid,
|
3249
|
-
timestamp: index.timestamp,
|
3250
|
-
encryptedIndexEntry: encryptedIndexEntry
|
3251
|
-
};
|
3252
|
-
this.vaultClient.vaultIndexSnapshotPut(encryptedIndex);
|
3253
|
-
|
3254
|
-
case 7:
|
3255
|
-
case "end":
|
3256
|
-
return _context12.stop();
|
3257
|
-
}
|
3258
|
-
}
|
3259
|
-
}, _callee12, this);
|
3260
|
-
}));
|
3261
|
-
|
3262
|
-
function indexSnapshotAdd(_x22) {
|
3263
|
-
return _indexSnapshotAdd.apply(this, arguments);
|
3264
|
-
}
|
3265
|
-
|
3266
|
-
return indexSnapshotAdd;
|
3267
|
-
}()
|
3268
2642
|
/**
|
3269
2643
|
* @name grantLockbox
|
3270
2644
|
* @description Grants a lockbox by retrieving the shared secret of the lockbox and encrypting it with the grantees public key
|
@@ -3277,48 +2651,48 @@ var OroClient = /*#__PURE__*/function () {
|
|
3277
2651
|
_proto.grantLockbox =
|
3278
2652
|
/*#__PURE__*/
|
3279
2653
|
function () {
|
3280
|
-
var _grantLockbox = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2654
|
+
var _grantLockbox = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(granteeUuid, lockboxUuid, lockboxOwnerUuid) {
|
3281
2655
|
var secret, base64GranteePublicKey, granteePublicKey, granteeEncryptedSecret, request;
|
3282
|
-
return
|
2656
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
3283
2657
|
while (1) {
|
3284
|
-
switch (
|
2658
|
+
switch (_context11.prev = _context11.next) {
|
3285
2659
|
case 0:
|
3286
2660
|
if (this.rsa) {
|
3287
|
-
|
2661
|
+
_context11.next = 2;
|
3288
2662
|
break;
|
3289
2663
|
}
|
3290
2664
|
|
3291
2665
|
throw IncompleteAuthentication;
|
3292
2666
|
|
3293
2667
|
case 2:
|
3294
|
-
|
2668
|
+
_context11.next = 4;
|
3295
2669
|
return this.getCachedSecretCryptor(lockboxUuid, lockboxOwnerUuid);
|
3296
2670
|
|
3297
2671
|
case 4:
|
3298
|
-
secret =
|
3299
|
-
|
2672
|
+
secret = _context11.sent.key();
|
2673
|
+
_context11.next = 7;
|
3300
2674
|
return this.guardClient.identityGet(granteeUuid);
|
3301
2675
|
|
3302
2676
|
case 7:
|
3303
|
-
base64GranteePublicKey =
|
2677
|
+
base64GranteePublicKey = _context11.sent.publicKey;
|
3304
2678
|
granteePublicKey = this.toolbox.decodeFromBase64(base64GranteePublicKey);
|
3305
2679
|
granteeEncryptedSecret = CryptoRSA.bytesWithPubEncryptToBase64(secret, granteePublicKey);
|
3306
2680
|
request = {
|
3307
2681
|
encryptedSecret: granteeEncryptedSecret,
|
3308
2682
|
granteeUuid: granteeUuid
|
3309
2683
|
};
|
3310
|
-
|
2684
|
+
_context11.next = 13;
|
3311
2685
|
return this.vaultClient.lockboxGrant(lockboxUuid, request, lockboxOwnerUuid);
|
3312
2686
|
|
3313
2687
|
case 13:
|
3314
2688
|
case "end":
|
3315
|
-
return
|
2689
|
+
return _context11.stop();
|
3316
2690
|
}
|
3317
2691
|
}
|
3318
|
-
},
|
2692
|
+
}, _callee11, this);
|
3319
2693
|
}));
|
3320
2694
|
|
3321
|
-
function grantLockbox(
|
2695
|
+
function grantLockbox(_x21, _x22, _x23) {
|
3322
2696
|
return _grantLockbox.apply(this, arguments);
|
3323
2697
|
}
|
3324
2698
|
|
@@ -3339,36 +2713,36 @@ var OroClient = /*#__PURE__*/function () {
|
|
3339
2713
|
_proto.createMessageData =
|
3340
2714
|
/*#__PURE__*/
|
3341
2715
|
function () {
|
3342
|
-
var _createMessageData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2716
|
+
var _createMessageData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(lockboxUuid, message, consultationId, lockboxOwnerUuid, previousDataUuid) {
|
3343
2717
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, meta, request;
|
3344
|
-
return
|
2718
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
3345
2719
|
while (1) {
|
3346
|
-
switch (
|
2720
|
+
switch (_context12.prev = _context12.next) {
|
3347
2721
|
case 0:
|
3348
2722
|
if (this.rsa) {
|
3349
|
-
|
2723
|
+
_context12.next = 2;
|
3350
2724
|
break;
|
3351
2725
|
}
|
3352
2726
|
|
3353
2727
|
throw IncompleteAuthentication;
|
3354
2728
|
|
3355
2729
|
case 2:
|
3356
|
-
|
2730
|
+
_context12.next = 4;
|
3357
2731
|
return this.getCachedSecretCryptor(lockboxUuid, lockboxOwnerUuid);
|
3358
2732
|
|
3359
2733
|
case 4:
|
3360
|
-
symmetricEncryptor =
|
2734
|
+
symmetricEncryptor = _context12.sent;
|
3361
2735
|
encryptedData = symmetricEncryptor.jsonEncryptToBase64Payload(message);
|
3362
|
-
|
3363
|
-
|
2736
|
+
_context12.t0 = symmetricEncryptor;
|
2737
|
+
_context12.next = 9;
|
3364
2738
|
return this.guardClient.whoAmI();
|
3365
2739
|
|
3366
2740
|
case 9:
|
3367
|
-
|
3368
|
-
|
3369
|
-
author:
|
2741
|
+
_context12.t1 = _context12.sent.sub;
|
2742
|
+
_context12.t2 = {
|
2743
|
+
author: _context12.t1
|
3370
2744
|
};
|
3371
|
-
encryptedPrivateMeta =
|
2745
|
+
encryptedPrivateMeta = _context12.t0.jsonEncryptToBase64Payload.call(_context12.t0, _context12.t2);
|
3372
2746
|
meta = {
|
3373
2747
|
consultationId: consultationId,
|
3374
2748
|
category: MetadataCategory.Consultation,
|
@@ -3380,17 +2754,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
3380
2754
|
publicMetadata: meta,
|
3381
2755
|
privateMetadata: encryptedPrivateMeta
|
3382
2756
|
};
|
3383
|
-
return
|
2757
|
+
return _context12.abrupt("return", this.tellerClient.lockboxDataStore(lockboxUuid, request, lockboxOwnerUuid, previousDataUuid));
|
3384
2758
|
|
3385
2759
|
case 15:
|
3386
2760
|
case "end":
|
3387
|
-
return
|
2761
|
+
return _context12.stop();
|
3388
2762
|
}
|
3389
2763
|
}
|
3390
|
-
},
|
2764
|
+
}, _callee12, this);
|
3391
2765
|
}));
|
3392
2766
|
|
3393
|
-
function createMessageData(
|
2767
|
+
function createMessageData(_x24, _x25, _x26, _x27, _x28) {
|
3394
2768
|
return _createMessageData.apply(this, arguments);
|
3395
2769
|
}
|
3396
2770
|
|
@@ -3411,50 +2785,50 @@ var OroClient = /*#__PURE__*/function () {
|
|
3411
2785
|
_proto.createMessageAttachmentData =
|
3412
2786
|
/*#__PURE__*/
|
3413
2787
|
function () {
|
3414
|
-
var _createMessageAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2788
|
+
var _createMessageAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(lockboxUuid, data, consultationId, lockboxOwnerUuid, previousDataUuid) {
|
3415
2789
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, meta, request;
|
3416
|
-
return
|
2790
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
3417
2791
|
while (1) {
|
3418
|
-
switch (
|
2792
|
+
switch (_context13.prev = _context13.next) {
|
3419
2793
|
case 0:
|
3420
2794
|
if (this.rsa) {
|
3421
|
-
|
2795
|
+
_context13.next = 2;
|
3422
2796
|
break;
|
3423
2797
|
}
|
3424
2798
|
|
3425
2799
|
throw IncompleteAuthentication;
|
3426
2800
|
|
3427
2801
|
case 2:
|
3428
|
-
|
2802
|
+
_context13.next = 4;
|
3429
2803
|
return this.getCachedSecretCryptor(lockboxUuid, lockboxOwnerUuid);
|
3430
2804
|
|
3431
2805
|
case 4:
|
3432
|
-
symmetricEncryptor =
|
3433
|
-
|
3434
|
-
|
3435
|
-
|
2806
|
+
symmetricEncryptor = _context13.sent;
|
2807
|
+
_context13.t0 = symmetricEncryptor;
|
2808
|
+
_context13.t1 = Uint8Array;
|
2809
|
+
_context13.next = 9;
|
3436
2810
|
return data.arrayBuffer();
|
3437
2811
|
|
3438
2812
|
case 9:
|
3439
|
-
|
3440
|
-
|
3441
|
-
encryptedData =
|
3442
|
-
|
3443
|
-
|
2813
|
+
_context13.t2 = _context13.sent;
|
2814
|
+
_context13.t3 = new _context13.t1(_context13.t2);
|
2815
|
+
encryptedData = _context13.t0.bytesEncryptToBase64Payload.call(_context13.t0, _context13.t3);
|
2816
|
+
_context13.t4 = symmetricEncryptor;
|
2817
|
+
_context13.next = 15;
|
3444
2818
|
return this.guardClient.whoAmI();
|
3445
2819
|
|
3446
2820
|
case 15:
|
3447
|
-
|
3448
|
-
|
3449
|
-
|
3450
|
-
|
3451
|
-
|
3452
|
-
author:
|
3453
|
-
fileName:
|
3454
|
-
lastModified:
|
3455
|
-
size:
|
2821
|
+
_context13.t5 = _context13.sent.sub;
|
2822
|
+
_context13.t6 = data.name;
|
2823
|
+
_context13.t7 = data.lastModified;
|
2824
|
+
_context13.t8 = data.size;
|
2825
|
+
_context13.t9 = {
|
2826
|
+
author: _context13.t5,
|
2827
|
+
fileName: _context13.t6,
|
2828
|
+
lastModified: _context13.t7,
|
2829
|
+
size: _context13.t8
|
3456
2830
|
};
|
3457
|
-
encryptedPrivateMeta =
|
2831
|
+
encryptedPrivateMeta = _context13.t4.jsonEncryptToBase64Payload.call(_context13.t4, _context13.t9);
|
3458
2832
|
meta = {
|
3459
2833
|
consultationId: consultationId,
|
3460
2834
|
category: MetadataCategory.Consultation,
|
@@ -3466,17 +2840,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
3466
2840
|
publicMetadata: meta,
|
3467
2841
|
privateMetadata: encryptedPrivateMeta
|
3468
2842
|
};
|
3469
|
-
return
|
2843
|
+
return _context13.abrupt("return", this.tellerClient.lockboxDataStore(lockboxUuid, request, lockboxOwnerUuid, previousDataUuid));
|
3470
2844
|
|
3471
2845
|
case 24:
|
3472
2846
|
case "end":
|
3473
|
-
return
|
2847
|
+
return _context13.stop();
|
3474
2848
|
}
|
3475
2849
|
}
|
3476
|
-
},
|
2850
|
+
}, _callee13, this);
|
3477
2851
|
}));
|
3478
2852
|
|
3479
|
-
function createMessageAttachmentData(
|
2853
|
+
function createMessageAttachmentData(_x29, _x30, _x31, _x32, _x33) {
|
3480
2854
|
return _createMessageAttachmentData.apply(this, arguments);
|
3481
2855
|
}
|
3482
2856
|
|
@@ -3498,57 +2872,57 @@ var OroClient = /*#__PURE__*/function () {
|
|
3498
2872
|
_proto.createConsultationAttachmentData =
|
3499
2873
|
/*#__PURE__*/
|
3500
2874
|
function () {
|
3501
|
-
var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3502
|
-
return
|
2875
|
+
var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(lockboxUuid, data, consultationId, documentType, lockboxOwnerUuid, previousDataUuid) {
|
2876
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
3503
2877
|
while (1) {
|
3504
|
-
switch (
|
2878
|
+
switch (_context14.prev = _context14.next) {
|
3505
2879
|
case 0:
|
3506
2880
|
if (this.rsa) {
|
3507
|
-
|
2881
|
+
_context14.next = 2;
|
3508
2882
|
break;
|
3509
2883
|
}
|
3510
2884
|
|
3511
2885
|
throw IncompleteAuthentication;
|
3512
2886
|
|
3513
2887
|
case 2:
|
3514
|
-
|
3515
|
-
|
3516
|
-
|
3517
|
-
|
2888
|
+
_context14.t0 = this;
|
2889
|
+
_context14.t1 = lockboxUuid;
|
2890
|
+
_context14.t2 = Uint8Array;
|
2891
|
+
_context14.next = 7;
|
3518
2892
|
return data.arrayBuffer();
|
3519
2893
|
|
3520
2894
|
case 7:
|
3521
|
-
|
3522
|
-
|
3523
|
-
|
2895
|
+
_context14.t3 = _context14.sent;
|
2896
|
+
_context14.t4 = new _context14.t2(_context14.t3);
|
2897
|
+
_context14.t5 = {
|
3524
2898
|
consultationId: consultationId,
|
3525
2899
|
category: MetadataCategory.Consultation,
|
3526
2900
|
documentType: documentType,
|
3527
2901
|
contentType: data.type
|
3528
2902
|
};
|
3529
|
-
|
2903
|
+
_context14.next = 12;
|
3530
2904
|
return this.guardClient.whoAmI();
|
3531
2905
|
|
3532
2906
|
case 12:
|
3533
|
-
|
3534
|
-
|
3535
|
-
|
3536
|
-
author:
|
3537
|
-
fileName:
|
2907
|
+
_context14.t6 = _context14.sent.sub;
|
2908
|
+
_context14.t7 = data.name;
|
2909
|
+
_context14.t8 = {
|
2910
|
+
author: _context14.t6,
|
2911
|
+
fileName: _context14.t7
|
3538
2912
|
};
|
3539
|
-
|
3540
|
-
|
3541
|
-
return
|
2913
|
+
_context14.t9 = lockboxOwnerUuid;
|
2914
|
+
_context14.t10 = previousDataUuid;
|
2915
|
+
return _context14.abrupt("return", _context14.t0.createBytesData.call(_context14.t0, _context14.t1, _context14.t4, _context14.t5, _context14.t8, _context14.t9, _context14.t10));
|
3542
2916
|
|
3543
2917
|
case 18:
|
3544
2918
|
case "end":
|
3545
|
-
return
|
2919
|
+
return _context14.stop();
|
3546
2920
|
}
|
3547
2921
|
}
|
3548
|
-
},
|
2922
|
+
}, _callee14, this);
|
3549
2923
|
}));
|
3550
2924
|
|
3551
|
-
function createConsultationAttachmentData(_x36, _x37, _x38, _x39
|
2925
|
+
function createConsultationAttachmentData(_x34, _x35, _x36, _x37, _x38, _x39) {
|
3552
2926
|
return _createConsultationAttachmentData.apply(this, arguments);
|
3553
2927
|
}
|
3554
2928
|
|
@@ -3570,25 +2944,25 @@ var OroClient = /*#__PURE__*/function () {
|
|
3570
2944
|
_proto.createJsonData =
|
3571
2945
|
/*#__PURE__*/
|
3572
2946
|
function () {
|
3573
|
-
var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2947
|
+
var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid) {
|
3574
2948
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
|
3575
|
-
return
|
2949
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
3576
2950
|
while (1) {
|
3577
|
-
switch (
|
2951
|
+
switch (_context15.prev = _context15.next) {
|
3578
2952
|
case 0:
|
3579
2953
|
if (this.rsa) {
|
3580
|
-
|
2954
|
+
_context15.next = 2;
|
3581
2955
|
break;
|
3582
2956
|
}
|
3583
2957
|
|
3584
2958
|
throw IncompleteAuthentication;
|
3585
2959
|
|
3586
2960
|
case 2:
|
3587
|
-
|
2961
|
+
_context15.next = 4;
|
3588
2962
|
return this.getCachedSecretCryptor(lockboxUuid, lockboxOwnerUuid);
|
3589
2963
|
|
3590
2964
|
case 4:
|
3591
|
-
symmetricEncryptor =
|
2965
|
+
symmetricEncryptor = _context15.sent;
|
3592
2966
|
encryptedData = symmetricEncryptor.jsonEncryptToBase64Payload(data);
|
3593
2967
|
encryptedPrivateMeta = symmetricEncryptor.jsonEncryptToBase64Payload(privateMeta);
|
3594
2968
|
request = {
|
@@ -3596,17 +2970,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
3596
2970
|
publicMetadata: meta,
|
3597
2971
|
privateMetadata: encryptedPrivateMeta
|
3598
2972
|
};
|
3599
|
-
return
|
2973
|
+
return _context15.abrupt("return", this.tellerClient.lockboxDataStore(lockboxUuid, request, lockboxOwnerUuid, previousDataUuid));
|
3600
2974
|
|
3601
2975
|
case 9:
|
3602
2976
|
case "end":
|
3603
|
-
return
|
2977
|
+
return _context15.stop();
|
3604
2978
|
}
|
3605
2979
|
}
|
3606
|
-
},
|
2980
|
+
}, _callee15, this);
|
3607
2981
|
}));
|
3608
2982
|
|
3609
|
-
function createJsonData(_x42, _x43, _x44, _x45
|
2983
|
+
function createJsonData(_x40, _x41, _x42, _x43, _x44, _x45) {
|
3610
2984
|
return _createJsonData.apply(this, arguments);
|
3611
2985
|
}
|
3612
2986
|
|
@@ -3626,32 +3000,32 @@ var OroClient = /*#__PURE__*/function () {
|
|
3626
3000
|
_proto.getOrInsertJsonData =
|
3627
3001
|
/*#__PURE__*/
|
3628
3002
|
function () {
|
3629
|
-
var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3003
|
+
var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(lockboxUuid, data, publicMetadata, privateMetadata, forceReplace) {
|
3630
3004
|
var manifest;
|
3631
|
-
return
|
3005
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
3632
3006
|
while (1) {
|
3633
|
-
switch (
|
3007
|
+
switch (_context16.prev = _context16.next) {
|
3634
3008
|
case 0:
|
3635
3009
|
if (forceReplace === void 0) {
|
3636
3010
|
forceReplace = false;
|
3637
3011
|
}
|
3638
3012
|
|
3639
|
-
|
3013
|
+
_context16.next = 3;
|
3640
3014
|
return this.vaultClient.lockboxManifestGet(lockboxUuid, publicMetadata);
|
3641
3015
|
|
3642
3016
|
case 3:
|
3643
|
-
manifest =
|
3017
|
+
manifest = _context16.sent;
|
3644
3018
|
|
3645
3019
|
if (!(!forceReplace && manifest.length > 0)) {
|
3646
|
-
|
3020
|
+
_context16.next = 9;
|
3647
3021
|
break;
|
3648
3022
|
}
|
3649
3023
|
|
3650
3024
|
console.log("The data for " + JSON.stringify(publicMetadata) + " already exist");
|
3651
|
-
return
|
3025
|
+
return _context16.abrupt("return", manifest[0].dataUuid);
|
3652
3026
|
|
3653
3027
|
case 9:
|
3654
|
-
|
3028
|
+
_context16.next = 11;
|
3655
3029
|
return this.createJsonData(lockboxUuid, data, publicMetadata, privateMetadata, undefined, forceReplace && manifest.length > 0 ? manifest[0].dataUuid : undefined // if forceReplace and data already exist, then replace data. Otherwise insert it
|
3656
3030
|
)["catch"](function (err) {
|
3657
3031
|
console.error("Error while upserting data " + JSON.stringify(publicMetadata) + " data", err);
|
@@ -3659,17 +3033,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
3659
3033
|
});
|
3660
3034
|
|
3661
3035
|
case 11:
|
3662
|
-
return
|
3036
|
+
return _context16.abrupt("return", _context16.sent.dataUuid);
|
3663
3037
|
|
3664
3038
|
case 12:
|
3665
3039
|
case "end":
|
3666
|
-
return
|
3040
|
+
return _context16.stop();
|
3667
3041
|
}
|
3668
3042
|
}
|
3669
|
-
},
|
3043
|
+
}, _callee16, this);
|
3670
3044
|
}));
|
3671
3045
|
|
3672
|
-
function getOrInsertJsonData(
|
3046
|
+
function getOrInsertJsonData(_x46, _x47, _x48, _x49, _x50) {
|
3673
3047
|
return _getOrInsertJsonData.apply(this, arguments);
|
3674
3048
|
}
|
3675
3049
|
|
@@ -3691,25 +3065,25 @@ var OroClient = /*#__PURE__*/function () {
|
|
3691
3065
|
_proto.createBytesData =
|
3692
3066
|
/*#__PURE__*/
|
3693
3067
|
function () {
|
3694
|
-
var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3068
|
+
var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid) {
|
3695
3069
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
|
3696
|
-
return
|
3070
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
3697
3071
|
while (1) {
|
3698
|
-
switch (
|
3072
|
+
switch (_context17.prev = _context17.next) {
|
3699
3073
|
case 0:
|
3700
3074
|
if (this.rsa) {
|
3701
|
-
|
3075
|
+
_context17.next = 2;
|
3702
3076
|
break;
|
3703
3077
|
}
|
3704
3078
|
|
3705
3079
|
throw IncompleteAuthentication;
|
3706
3080
|
|
3707
3081
|
case 2:
|
3708
|
-
|
3082
|
+
_context17.next = 4;
|
3709
3083
|
return this.getCachedSecretCryptor(lockboxUuid, lockboxOwnerUuid);
|
3710
3084
|
|
3711
3085
|
case 4:
|
3712
|
-
symmetricEncryptor =
|
3086
|
+
symmetricEncryptor = _context17.sent;
|
3713
3087
|
encryptedData = symmetricEncryptor.bytesEncryptToBase64Payload(data);
|
3714
3088
|
encryptedPrivateMeta = symmetricEncryptor.jsonEncryptToBase64Payload(privateMeta);
|
3715
3089
|
request = {
|
@@ -3717,17 +3091,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
3717
3091
|
publicMetadata: meta,
|
3718
3092
|
privateMetadata: encryptedPrivateMeta
|
3719
3093
|
};
|
3720
|
-
return
|
3094
|
+
return _context17.abrupt("return", this.tellerClient.lockboxDataStore(lockboxUuid, request, lockboxOwnerUuid, previousDataUuid));
|
3721
3095
|
|
3722
3096
|
case 9:
|
3723
3097
|
case "end":
|
3724
|
-
return
|
3098
|
+
return _context17.stop();
|
3725
3099
|
}
|
3726
3100
|
}
|
3727
|
-
},
|
3101
|
+
}, _callee17, this);
|
3728
3102
|
}));
|
3729
3103
|
|
3730
|
-
function createBytesData(_x53, _x54, _x55, _x56
|
3104
|
+
function createBytesData(_x51, _x52, _x53, _x54, _x55, _x56) {
|
3731
3105
|
return _createBytesData.apply(this, arguments);
|
3732
3106
|
}
|
3733
3107
|
|
@@ -3749,39 +3123,39 @@ var OroClient = /*#__PURE__*/function () {
|
|
3749
3123
|
_proto.getJsonData =
|
3750
3124
|
/*#__PURE__*/
|
3751
3125
|
function () {
|
3752
|
-
var _getJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3126
|
+
var _getJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(lockboxUuid, dataUuid, lockboxOwnerUuid) {
|
3753
3127
|
var _yield$Promise$all, encryptedPayload, symmetricDecryptor;
|
3754
3128
|
|
3755
|
-
return
|
3129
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
3756
3130
|
while (1) {
|
3757
|
-
switch (
|
3131
|
+
switch (_context18.prev = _context18.next) {
|
3758
3132
|
case 0:
|
3759
3133
|
if (this.rsa) {
|
3760
|
-
|
3134
|
+
_context18.next = 2;
|
3761
3135
|
break;
|
3762
3136
|
}
|
3763
3137
|
|
3764
3138
|
throw IncompleteAuthentication;
|
3765
3139
|
|
3766
3140
|
case 2:
|
3767
|
-
|
3141
|
+
_context18.next = 4;
|
3768
3142
|
return Promise.all([this.vaultClient.lockboxDataGet(lockboxUuid, dataUuid, lockboxOwnerUuid), this.getCachedSecretCryptor(lockboxUuid, lockboxOwnerUuid)]);
|
3769
3143
|
|
3770
3144
|
case 4:
|
3771
|
-
_yield$Promise$all =
|
3145
|
+
_yield$Promise$all = _context18.sent;
|
3772
3146
|
encryptedPayload = _yield$Promise$all[0];
|
3773
3147
|
symmetricDecryptor = _yield$Promise$all[1];
|
3774
|
-
return
|
3148
|
+
return _context18.abrupt("return", symmetricDecryptor.base64PayloadDecryptToJson(encryptedPayload.data));
|
3775
3149
|
|
3776
3150
|
case 8:
|
3777
3151
|
case "end":
|
3778
|
-
return
|
3152
|
+
return _context18.stop();
|
3779
3153
|
}
|
3780
3154
|
}
|
3781
|
-
},
|
3155
|
+
}, _callee18, this);
|
3782
3156
|
}));
|
3783
3157
|
|
3784
|
-
function getJsonData(
|
3158
|
+
function getJsonData(_x57, _x58, _x59) {
|
3785
3159
|
return _getJsonData.apply(this, arguments);
|
3786
3160
|
}
|
3787
3161
|
|
@@ -3799,39 +3173,39 @@ var OroClient = /*#__PURE__*/function () {
|
|
3799
3173
|
_proto.getBytesData =
|
3800
3174
|
/*#__PURE__*/
|
3801
3175
|
function () {
|
3802
|
-
var _getBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3176
|
+
var _getBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(lockboxUuid, dataUuid, lockboxOwnerUuid) {
|
3803
3177
|
var _yield$Promise$all2, encryptedPayload, symmetricDecryptor;
|
3804
3178
|
|
3805
|
-
return
|
3179
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
3806
3180
|
while (1) {
|
3807
|
-
switch (
|
3181
|
+
switch (_context19.prev = _context19.next) {
|
3808
3182
|
case 0:
|
3809
3183
|
if (this.rsa) {
|
3810
|
-
|
3184
|
+
_context19.next = 2;
|
3811
3185
|
break;
|
3812
3186
|
}
|
3813
3187
|
|
3814
3188
|
throw IncompleteAuthentication;
|
3815
3189
|
|
3816
3190
|
case 2:
|
3817
|
-
|
3191
|
+
_context19.next = 4;
|
3818
3192
|
return Promise.all([this.vaultClient.lockboxDataGet(lockboxUuid, dataUuid, lockboxOwnerUuid), this.getCachedSecretCryptor(lockboxUuid, lockboxOwnerUuid)]);
|
3819
3193
|
|
3820
3194
|
case 4:
|
3821
|
-
_yield$Promise$all2 =
|
3195
|
+
_yield$Promise$all2 = _context19.sent;
|
3822
3196
|
encryptedPayload = _yield$Promise$all2[0];
|
3823
3197
|
symmetricDecryptor = _yield$Promise$all2[1];
|
3824
|
-
return
|
3198
|
+
return _context19.abrupt("return", symmetricDecryptor.base64PayloadDecryptToBytes(encryptedPayload.data));
|
3825
3199
|
|
3826
3200
|
case 8:
|
3827
3201
|
case "end":
|
3828
|
-
return
|
3202
|
+
return _context19.stop();
|
3829
3203
|
}
|
3830
3204
|
}
|
3831
|
-
},
|
3205
|
+
}, _callee19, this);
|
3832
3206
|
}));
|
3833
3207
|
|
3834
|
-
function getBytesData(
|
3208
|
+
function getBytesData(_x60, _x61, _x62) {
|
3835
3209
|
return _getBytesData.apply(this, arguments);
|
3836
3210
|
}
|
3837
3211
|
|
@@ -3852,41 +3226,92 @@ var OroClient = /*#__PURE__*/function () {
|
|
3852
3226
|
_proto.getGrants =
|
3853
3227
|
/*#__PURE__*/
|
3854
3228
|
function () {
|
3855
|
-
var _getGrants = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3856
|
-
var filterString,
|
3857
|
-
return
|
3229
|
+
var _getGrants = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(filter) {
|
3230
|
+
var filterString, currentAccountRole, encryptedGrants, decryptedGrants, grantsByConsultLockbox, decryptedConsults;
|
3231
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
3858
3232
|
while (1) {
|
3859
|
-
switch (
|
3233
|
+
switch (_context20.prev = _context20.next) {
|
3860
3234
|
case 0:
|
3861
|
-
if (forceRefresh === void 0) {
|
3862
|
-
forceRefresh = false;
|
3863
|
-
}
|
3864
|
-
|
3865
3235
|
if (this.rsa) {
|
3866
|
-
|
3236
|
+
_context20.next = 2;
|
3867
3237
|
break;
|
3868
3238
|
}
|
3869
3239
|
|
3870
3240
|
throw IncompleteAuthentication;
|
3871
3241
|
|
3872
|
-
case
|
3242
|
+
case 2:
|
3873
3243
|
filterString = JSON.stringify(filter); // retrieves cached grants
|
3874
|
-
// Note: if filters is set to empty, it will be stored in the `undefined` key
|
3875
3244
|
|
3876
|
-
if (!
|
3877
|
-
|
3245
|
+
if (!this.cachedMetadataGrants[filterString]) {
|
3246
|
+
_context20.next = 5;
|
3878
3247
|
break;
|
3879
3248
|
}
|
3880
3249
|
|
3881
|
-
return
|
3250
|
+
return _context20.abrupt("return", this.cachedMetadataGrants[filterString]);
|
3251
|
+
|
3252
|
+
case 5:
|
3253
|
+
_context20.next = 7;
|
3254
|
+
return this.getAccountRole();
|
3255
|
+
|
3256
|
+
case 7:
|
3257
|
+
currentAccountRole = _context20.sent;
|
3258
|
+
|
3259
|
+
if (!(currentAccountRole.length === 1 && currentAccountRole[0] === OtherRoleType.User)) {
|
3260
|
+
_context20.next = 10;
|
3261
|
+
break;
|
3262
|
+
}
|
3263
|
+
|
3264
|
+
return _context20.abrupt("return", []);
|
3265
|
+
|
3266
|
+
case 10:
|
3267
|
+
if (![OtherRoleType.Patient, OtherRoleType.User].every(function (requiredRole) {
|
3268
|
+
return currentAccountRole.includes(requiredRole);
|
3269
|
+
})) {
|
3270
|
+
_context20.next = 26;
|
3271
|
+
break;
|
3272
|
+
}
|
3882
3273
|
|
3883
|
-
case 6:
|
3884
3274
|
if (!filter) {
|
3885
|
-
|
3275
|
+
_context20.next = 17;
|
3276
|
+
break;
|
3277
|
+
}
|
3278
|
+
|
3279
|
+
_context20.next = 14;
|
3280
|
+
return filterGrantsWithLockboxMetadata(this, filter);
|
3281
|
+
|
3282
|
+
case 14:
|
3283
|
+
encryptedGrants = _context20.sent;
|
3284
|
+
_context20.next = 20;
|
3285
|
+
break;
|
3286
|
+
|
3287
|
+
case 17:
|
3288
|
+
_context20.next = 19;
|
3289
|
+
return this.vaultClient.grantsGet();
|
3290
|
+
|
3291
|
+
case 19:
|
3292
|
+
encryptedGrants = _context20.sent.grants;
|
3293
|
+
|
3294
|
+
case 20:
|
3295
|
+
_context20.next = 22;
|
3296
|
+
return decryptGrants(encryptedGrants, this.rsa);
|
3297
|
+
|
3298
|
+
case 22:
|
3299
|
+
decryptedGrants = _context20.sent;
|
3300
|
+
// sets the cached grant
|
3301
|
+
this.cachedMetadataGrants[filterString] = decryptedGrants;
|
3302
|
+
console.info('[sdk:grant] Found grant for patient');
|
3303
|
+
return _context20.abrupt("return", decryptedGrants);
|
3304
|
+
|
3305
|
+
case 26:
|
3306
|
+
if (filter) {
|
3307
|
+
_context20.next = 28;
|
3886
3308
|
break;
|
3887
3309
|
}
|
3888
3310
|
|
3889
|
-
|
3311
|
+
throw MissingGrantFilter;
|
3312
|
+
|
3313
|
+
case 28:
|
3314
|
+
_context20.next = 30;
|
3890
3315
|
return this.vaultClient.vaultIndexGet([IndexKey.ConsultationLockbox], [filter.consultationId]).then(function (res) {
|
3891
3316
|
return res[IndexKey.ConsultationLockbox];
|
3892
3317
|
})["catch"](function (e) {
|
@@ -3894,71 +3319,70 @@ var OroClient = /*#__PURE__*/function () {
|
|
3894
3319
|
return [];
|
3895
3320
|
});
|
3896
3321
|
|
3897
|
-
case
|
3898
|
-
|
3899
|
-
_context22.next = 13;
|
3900
|
-
break;
|
3901
|
-
|
3902
|
-
case 12:
|
3903
|
-
_context22.t0 = undefined;
|
3904
|
-
|
3905
|
-
case 13:
|
3906
|
-
grantsByConsultLockbox = _context22.t0;
|
3322
|
+
case 30:
|
3323
|
+
grantsByConsultLockbox = _context20.sent;
|
3907
3324
|
decryptedConsults = decryptConsultLockboxGrants(grantsByConsultLockbox != null ? grantsByConsultLockbox : [], this.rsa);
|
3908
3325
|
|
3909
3326
|
if (!(decryptedConsults.length > 0)) {
|
3910
|
-
|
3327
|
+
_context20.next = 36;
|
3911
3328
|
break;
|
3912
3329
|
}
|
3913
3330
|
|
3914
|
-
console.info('[sdk:index] Grants found in user`s constant time secure index');
|
3915
|
-
this.cachedMetadataGrants[
|
3916
|
-
return
|
3917
|
-
|
3918
|
-
case 19:
|
3919
|
-
if (!filter) {
|
3920
|
-
_context22.next = 25;
|
3921
|
-
break;
|
3922
|
-
}
|
3331
|
+
console.info('[sdk:index] Grants found in user`s constant time secure index');
|
3332
|
+
this.cachedMetadataGrants[filterString] = decryptedConsults;
|
3333
|
+
return _context20.abrupt("return", this.cachedMetadataGrants[filterString]);
|
3923
3334
|
|
3924
|
-
|
3925
|
-
return
|
3335
|
+
case 36:
|
3336
|
+
return _context20.abrupt("return", []);
|
3926
3337
|
|
3927
|
-
case
|
3928
|
-
|
3929
|
-
|
3930
|
-
|
3338
|
+
case 37:
|
3339
|
+
case "end":
|
3340
|
+
return _context20.stop();
|
3341
|
+
}
|
3342
|
+
}
|
3343
|
+
}, _callee20, this);
|
3344
|
+
}));
|
3931
3345
|
|
3932
|
-
|
3933
|
-
|
3934
|
-
|
3346
|
+
function getGrants(_x63) {
|
3347
|
+
return _getGrants.apply(this, arguments);
|
3348
|
+
}
|
3935
3349
|
|
3936
|
-
|
3937
|
-
|
3350
|
+
return getGrants;
|
3351
|
+
}()
|
3352
|
+
/**
|
3353
|
+
* Fetches the role of the account that is logged in
|
3354
|
+
*
|
3355
|
+
* @returns the role based scopes defined by the whoami
|
3356
|
+
*/
|
3357
|
+
;
|
3938
3358
|
|
3939
|
-
|
3940
|
-
|
3941
|
-
|
3359
|
+
_proto.getAccountRole =
|
3360
|
+
/*#__PURE__*/
|
3361
|
+
function () {
|
3362
|
+
var _getAccountRole = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
|
3363
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
3364
|
+
while (1) {
|
3365
|
+
switch (_context21.prev = _context21.next) {
|
3366
|
+
case 0:
|
3367
|
+
_context21.next = 2;
|
3368
|
+
return this.guardClient.whoAmI();
|
3942
3369
|
|
3943
|
-
case
|
3944
|
-
|
3945
|
-
// sets the cached grant
|
3946
|
-
this.cachedMetadataGrants[filterString] = decryptedGrants;
|
3947
|
-
return _context22.abrupt("return", decryptedGrants);
|
3370
|
+
case 2:
|
3371
|
+
return _context21.abrupt("return", _context21.sent.scope.split(' '));
|
3948
3372
|
|
3949
|
-
case
|
3373
|
+
case 3:
|
3950
3374
|
case "end":
|
3951
|
-
return
|
3375
|
+
return _context21.stop();
|
3952
3376
|
}
|
3953
3377
|
}
|
3954
|
-
},
|
3378
|
+
}, _callee21, this);
|
3955
3379
|
}));
|
3956
3380
|
|
3957
|
-
function
|
3958
|
-
return
|
3381
|
+
function getAccountRole() {
|
3382
|
+
return _getAccountRole.apply(this, arguments);
|
3959
3383
|
}
|
3960
3384
|
|
3961
|
-
return
|
3385
|
+
return getAccountRole;
|
3962
3386
|
}()
|
3963
3387
|
/**
|
3964
3388
|
* @name getCachedSecretCryptor
|
@@ -3972,14 +3396,14 @@ var OroClient = /*#__PURE__*/function () {
|
|
3972
3396
|
_proto.getCachedSecretCryptor =
|
3973
3397
|
/*#__PURE__*/
|
3974
3398
|
function () {
|
3975
|
-
var _getCachedSecretCryptor = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3399
|
+
var _getCachedSecretCryptor = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(lockboxUuid, lockboxOwnerUuid) {
|
3976
3400
|
var index, encryptedSecret, secret, cryptor;
|
3977
|
-
return
|
3401
|
+
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
3978
3402
|
while (1) {
|
3979
|
-
switch (
|
3403
|
+
switch (_context22.prev = _context22.next) {
|
3980
3404
|
case 0:
|
3981
3405
|
if (this.rsa) {
|
3982
|
-
|
3406
|
+
_context22.next = 2;
|
3983
3407
|
break;
|
3984
3408
|
}
|
3985
3409
|
|
@@ -3991,35 +3415,35 @@ var OroClient = /*#__PURE__*/function () {
|
|
3991
3415
|
});
|
3992
3416
|
|
3993
3417
|
if (!(index === -1)) {
|
3994
|
-
|
3418
|
+
_context22.next = 13;
|
3995
3419
|
break;
|
3996
3420
|
}
|
3997
3421
|
|
3998
|
-
|
3422
|
+
_context22.next = 6;
|
3999
3423
|
return this.vaultClient.lockboxSecretGet(lockboxUuid, lockboxOwnerUuid);
|
4000
3424
|
|
4001
3425
|
case 6:
|
4002
|
-
encryptedSecret =
|
3426
|
+
encryptedSecret = _context22.sent.sharedSecret;
|
4003
3427
|
secret = this.rsa.base64DecryptToBytes(encryptedSecret);
|
4004
3428
|
cryptor = this.toolbox.CryptoChaCha.fromKey(secret);
|
4005
3429
|
this.secrets.push({
|
4006
3430
|
lockboxUuid: lockboxUuid,
|
4007
3431
|
cryptor: cryptor
|
4008
3432
|
});
|
4009
|
-
return
|
3433
|
+
return _context22.abrupt("return", cryptor);
|
4010
3434
|
|
4011
3435
|
case 13:
|
4012
|
-
return
|
3436
|
+
return _context22.abrupt("return", this.secrets[index].cryptor);
|
4013
3437
|
|
4014
3438
|
case 14:
|
4015
3439
|
case "end":
|
4016
|
-
return
|
3440
|
+
return _context22.stop();
|
4017
3441
|
}
|
4018
3442
|
}
|
4019
|
-
},
|
3443
|
+
}, _callee22, this);
|
4020
3444
|
}));
|
4021
3445
|
|
4022
|
-
function getCachedSecretCryptor(
|
3446
|
+
function getCachedSecretCryptor(_x64, _x65) {
|
4023
3447
|
return _getCachedSecretCryptor.apply(this, arguments);
|
4024
3448
|
}
|
4025
3449
|
|
@@ -4039,26 +3463,26 @@ var OroClient = /*#__PURE__*/function () {
|
|
4039
3463
|
_proto.getPersonalInformationsFromConsultId =
|
4040
3464
|
/*#__PURE__*/
|
4041
3465
|
function () {
|
4042
|
-
var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4043
|
-
return
|
3466
|
+
var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(consultationId, category, forceRefresh) {
|
3467
|
+
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
4044
3468
|
while (1) {
|
4045
|
-
switch (
|
3469
|
+
switch (_context23.prev = _context23.next) {
|
4046
3470
|
case 0:
|
4047
3471
|
if (forceRefresh === void 0) {
|
4048
3472
|
forceRefresh = false;
|
4049
3473
|
}
|
4050
3474
|
|
4051
|
-
return
|
3475
|
+
return _context23.abrupt("return", this.getMetaCategoryFromConsultId(consultationId, category, forceRefresh));
|
4052
3476
|
|
4053
3477
|
case 2:
|
4054
3478
|
case "end":
|
4055
|
-
return
|
3479
|
+
return _context23.stop();
|
4056
3480
|
}
|
4057
3481
|
}
|
4058
|
-
},
|
3482
|
+
}, _callee23, this);
|
4059
3483
|
}));
|
4060
3484
|
|
4061
|
-
function getPersonalInformationsFromConsultId(
|
3485
|
+
function getPersonalInformationsFromConsultId(_x66, _x67, _x68) {
|
4062
3486
|
return _getPersonalInformationsFromConsultId.apply(this, arguments);
|
4063
3487
|
}
|
4064
3488
|
|
@@ -4077,26 +3501,26 @@ var OroClient = /*#__PURE__*/function () {
|
|
4077
3501
|
_proto.getMedicalDataFromConsultId =
|
4078
3502
|
/*#__PURE__*/
|
4079
3503
|
function () {
|
4080
|
-
var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4081
|
-
return
|
3504
|
+
var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(consultationId, forceRefresh) {
|
3505
|
+
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
|
4082
3506
|
while (1) {
|
4083
|
-
switch (
|
3507
|
+
switch (_context24.prev = _context24.next) {
|
4084
3508
|
case 0:
|
4085
3509
|
if (forceRefresh === void 0) {
|
4086
3510
|
forceRefresh = false;
|
4087
3511
|
}
|
4088
3512
|
|
4089
|
-
return
|
3513
|
+
return _context24.abrupt("return", this.getMetaCategoryFromConsultId(consultationId, MetadataCategory.Medical, forceRefresh));
|
4090
3514
|
|
4091
3515
|
case 2:
|
4092
3516
|
case "end":
|
4093
|
-
return
|
3517
|
+
return _context24.stop();
|
4094
3518
|
}
|
4095
3519
|
}
|
4096
|
-
},
|
3520
|
+
}, _callee24, this);
|
4097
3521
|
}));
|
4098
3522
|
|
4099
|
-
function getMedicalDataFromConsultId(
|
3523
|
+
function getMedicalDataFromConsultId(_x69, _x70) {
|
4100
3524
|
return _getMedicalDataFromConsultId.apply(this, arguments);
|
4101
3525
|
}
|
4102
3526
|
|
@@ -4104,103 +3528,103 @@ var OroClient = /*#__PURE__*/function () {
|
|
4104
3528
|
}();
|
4105
3529
|
|
4106
3530
|
_proto.getMetaCategoryFromConsultId = /*#__PURE__*/function () {
|
4107
|
-
var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4108
|
-
var
|
3531
|
+
var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26(consultationId, category, forceRefresh) {
|
3532
|
+
var _this2 = this;
|
4109
3533
|
|
4110
3534
|
var grants, workflowData, _loop, _iterator, _step;
|
4111
3535
|
|
4112
|
-
return
|
3536
|
+
return _regeneratorRuntime().wrap(function _callee26$(_context27) {
|
4113
3537
|
while (1) {
|
4114
|
-
switch (
|
3538
|
+
switch (_context27.prev = _context27.next) {
|
4115
3539
|
case 0:
|
4116
3540
|
if (forceRefresh === void 0) {
|
4117
3541
|
forceRefresh = false;
|
4118
3542
|
}
|
4119
3543
|
|
4120
|
-
|
3544
|
+
_context27.next = 3;
|
4121
3545
|
return this.getGrants({
|
4122
3546
|
consultationId: consultationId
|
4123
3547
|
});
|
4124
3548
|
|
4125
3549
|
case 3:
|
4126
|
-
grants =
|
3550
|
+
grants = _context27.sent;
|
4127
3551
|
workflowData = [];
|
4128
|
-
_loop = /*#__PURE__*/
|
3552
|
+
_loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop() {
|
4129
3553
|
var grant, manifest, data;
|
4130
|
-
return
|
3554
|
+
return _regeneratorRuntime().wrap(function _loop$(_context26) {
|
4131
3555
|
while (1) {
|
4132
|
-
switch (
|
3556
|
+
switch (_context26.prev = _context26.next) {
|
4133
3557
|
case 0:
|
4134
3558
|
grant = _step.value;
|
4135
|
-
|
4136
|
-
return
|
3559
|
+
_context26.next = 3;
|
3560
|
+
return _this2.getLockboxManifest(grant.lockboxUuid, {
|
4137
3561
|
category: category,
|
4138
3562
|
documentType: DocumentType.PopulatedWorkflowData,
|
4139
3563
|
consultationIds: [consultationId]
|
4140
3564
|
}, true, grant.lockboxOwnerUuid, forceRefresh);
|
4141
3565
|
|
4142
3566
|
case 3:
|
4143
|
-
manifest =
|
3567
|
+
manifest = _context26.sent;
|
4144
3568
|
|
4145
3569
|
if (!(manifest.length === 0)) {
|
4146
|
-
|
3570
|
+
_context26.next = 8;
|
4147
3571
|
break;
|
4148
3572
|
}
|
4149
3573
|
|
4150
|
-
|
4151
|
-
return
|
3574
|
+
_context26.next = 7;
|
3575
|
+
return _this2.getLockboxManifest(grant.lockboxUuid, {
|
4152
3576
|
category: category,
|
4153
3577
|
documentType: DocumentType.PopulatedWorkflowData
|
4154
3578
|
}, true, grant.lockboxOwnerUuid, forceRefresh);
|
4155
3579
|
|
4156
3580
|
case 7:
|
4157
|
-
manifest =
|
3581
|
+
manifest = _context26.sent.filter(function (entry) {
|
4158
3582
|
return !entry.metadata.consultationIds;
|
4159
3583
|
});
|
4160
3584
|
|
4161
3585
|
case 8:
|
4162
|
-
|
3586
|
+
_context26.next = 10;
|
4163
3587
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
4164
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/
|
4165
|
-
return
|
3588
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(entry) {
|
3589
|
+
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
|
4166
3590
|
while (1) {
|
4167
|
-
switch (
|
3591
|
+
switch (_context25.prev = _context25.next) {
|
4168
3592
|
case 0:
|
4169
|
-
|
4170
|
-
|
4171
|
-
|
4172
|
-
|
4173
|
-
return
|
3593
|
+
_context25.t0 = grant.lockboxOwnerUuid;
|
3594
|
+
_context25.t1 = grant.lockboxUuid;
|
3595
|
+
_context25.t2 = entry.dataUuid;
|
3596
|
+
_context25.next = 5;
|
3597
|
+
return _this2.getJsonData(grant.lockboxUuid, entry.dataUuid);
|
4174
3598
|
|
4175
3599
|
case 5:
|
4176
|
-
|
4177
|
-
return
|
4178
|
-
lockboxOwnerUuid:
|
4179
|
-
lockboxUuid:
|
4180
|
-
dataUuid:
|
4181
|
-
data:
|
3600
|
+
_context25.t3 = _context25.sent;
|
3601
|
+
return _context25.abrupt("return", {
|
3602
|
+
lockboxOwnerUuid: _context25.t0,
|
3603
|
+
lockboxUuid: _context25.t1,
|
3604
|
+
dataUuid: _context25.t2,
|
3605
|
+
data: _context25.t3
|
4182
3606
|
});
|
4183
3607
|
|
4184
3608
|
case 7:
|
4185
3609
|
case "end":
|
4186
|
-
return
|
3610
|
+
return _context25.stop();
|
4187
3611
|
}
|
4188
3612
|
}
|
4189
|
-
},
|
3613
|
+
}, _callee25);
|
4190
3614
|
}));
|
4191
3615
|
|
4192
|
-
return function (
|
3616
|
+
return function (_x74) {
|
4193
3617
|
return _ref3.apply(this, arguments);
|
4194
3618
|
};
|
4195
3619
|
}()));
|
4196
3620
|
|
4197
3621
|
case 10:
|
4198
|
-
data =
|
3622
|
+
data = _context26.sent;
|
4199
3623
|
workflowData = _extends({}, workflowData, data);
|
4200
3624
|
|
4201
3625
|
case 12:
|
4202
3626
|
case "end":
|
4203
|
-
return
|
3627
|
+
return _context26.stop();
|
4204
3628
|
}
|
4205
3629
|
}
|
4206
3630
|
}, _loop);
|
@@ -4209,28 +3633,28 @@ var OroClient = /*#__PURE__*/function () {
|
|
4209
3633
|
|
4210
3634
|
case 7:
|
4211
3635
|
if ((_step = _iterator()).done) {
|
4212
|
-
|
3636
|
+
_context27.next = 11;
|
4213
3637
|
break;
|
4214
3638
|
}
|
4215
3639
|
|
4216
|
-
return
|
3640
|
+
return _context27.delegateYield(_loop(), "t0", 9);
|
4217
3641
|
|
4218
3642
|
case 9:
|
4219
|
-
|
3643
|
+
_context27.next = 7;
|
4220
3644
|
break;
|
4221
3645
|
|
4222
3646
|
case 11:
|
4223
|
-
return
|
3647
|
+
return _context27.abrupt("return", workflowData);
|
4224
3648
|
|
4225
3649
|
case 12:
|
4226
3650
|
case "end":
|
4227
|
-
return
|
3651
|
+
return _context27.stop();
|
4228
3652
|
}
|
4229
3653
|
}
|
4230
|
-
},
|
3654
|
+
}, _callee26, this);
|
4231
3655
|
}));
|
4232
3656
|
|
4233
|
-
function getMetaCategoryFromConsultId(
|
3657
|
+
function getMetaCategoryFromConsultId(_x71, _x72, _x73) {
|
4234
3658
|
return _getMetaCategoryFromConsultId.apply(this, arguments);
|
4235
3659
|
}
|
4236
3660
|
|
@@ -4246,22 +3670,22 @@ var OroClient = /*#__PURE__*/function () {
|
|
4246
3670
|
_proto.getPersonalInformations =
|
4247
3671
|
/*#__PURE__*/
|
4248
3672
|
function () {
|
4249
|
-
var _getPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3673
|
+
var _getPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(userId) {
|
4250
3674
|
var grant, lockboxUuid, lockboxOwnerUuid, identificationDataUuid;
|
4251
|
-
return
|
3675
|
+
return _regeneratorRuntime().wrap(function _callee27$(_context28) {
|
4252
3676
|
while (1) {
|
4253
|
-
switch (
|
3677
|
+
switch (_context28.prev = _context28.next) {
|
4254
3678
|
case 0:
|
4255
|
-
|
3679
|
+
_context28.next = 2;
|
4256
3680
|
return this.getGrants();
|
4257
3681
|
|
4258
3682
|
case 2:
|
4259
|
-
grant =
|
3683
|
+
grant = _context28.sent.find(function (lockbox) {
|
4260
3684
|
return lockbox.lockboxOwnerUuid === userId;
|
4261
3685
|
});
|
4262
3686
|
|
4263
3687
|
if (grant) {
|
4264
|
-
|
3688
|
+
_context28.next = 5;
|
4265
3689
|
break;
|
4266
3690
|
}
|
4267
3691
|
|
@@ -4271,7 +3695,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4271
3695
|
lockboxUuid = grant.lockboxUuid, lockboxOwnerUuid = grant.lockboxOwnerUuid;
|
4272
3696
|
|
4273
3697
|
if (lockboxUuid) {
|
4274
|
-
|
3698
|
+
_context28.next = 8;
|
4275
3699
|
break;
|
4276
3700
|
}
|
4277
3701
|
|
@@ -4279,45 +3703,45 @@ var OroClient = /*#__PURE__*/function () {
|
|
4279
3703
|
|
4280
3704
|
case 8:
|
4281
3705
|
if (lockboxOwnerUuid) {
|
4282
|
-
|
3706
|
+
_context28.next = 10;
|
4283
3707
|
break;
|
4284
3708
|
}
|
4285
3709
|
|
4286
3710
|
throw MissingLockboxOwner;
|
4287
3711
|
|
4288
3712
|
case 10:
|
4289
|
-
|
3713
|
+
_context28.next = 12;
|
4290
3714
|
return this.getLockboxManifest(lockboxUuid, {
|
4291
3715
|
category: MetadataCategory.Personal,
|
4292
3716
|
documentType: DocumentType.PopulatedWorkflowData
|
4293
3717
|
}, false, userId);
|
4294
3718
|
|
4295
3719
|
case 12:
|
4296
|
-
identificationDataUuid =
|
4297
|
-
|
4298
|
-
|
4299
|
-
|
4300
|
-
|
3720
|
+
identificationDataUuid = _context28.sent[0].dataUuid;
|
3721
|
+
_context28.t0 = lockboxOwnerUuid;
|
3722
|
+
_context28.t1 = lockboxUuid;
|
3723
|
+
_context28.t2 = identificationDataUuid;
|
3724
|
+
_context28.next = 18;
|
4301
3725
|
return this.getJsonData(lockboxUuid, identificationDataUuid);
|
4302
3726
|
|
4303
3727
|
case 18:
|
4304
|
-
|
4305
|
-
return
|
4306
|
-
lockboxOwnerUuid:
|
4307
|
-
lockboxUuid:
|
4308
|
-
dataUuid:
|
4309
|
-
data:
|
3728
|
+
_context28.t3 = _context28.sent;
|
3729
|
+
return _context28.abrupt("return", {
|
3730
|
+
lockboxOwnerUuid: _context28.t0,
|
3731
|
+
lockboxUuid: _context28.t1,
|
3732
|
+
dataUuid: _context28.t2,
|
3733
|
+
data: _context28.t3
|
4310
3734
|
});
|
4311
3735
|
|
4312
3736
|
case 20:
|
4313
3737
|
case "end":
|
4314
|
-
return
|
3738
|
+
return _context28.stop();
|
4315
3739
|
}
|
4316
3740
|
}
|
4317
|
-
},
|
3741
|
+
}, _callee27, this);
|
4318
3742
|
}));
|
4319
3743
|
|
4320
|
-
function getPersonalInformations(
|
3744
|
+
function getPersonalInformations(_x75) {
|
4321
3745
|
return _getPersonalInformations.apply(this, arguments);
|
4322
3746
|
}
|
4323
3747
|
|
@@ -4334,39 +3758,39 @@ var OroClient = /*#__PURE__*/function () {
|
|
4334
3758
|
_proto.getGrantFromConsultId =
|
4335
3759
|
/*#__PURE__*/
|
4336
3760
|
function () {
|
4337
|
-
var _getGrantFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3761
|
+
var _getGrantFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28(consultationId) {
|
4338
3762
|
var grants;
|
4339
|
-
return
|
3763
|
+
return _regeneratorRuntime().wrap(function _callee28$(_context29) {
|
4340
3764
|
while (1) {
|
4341
|
-
switch (
|
3765
|
+
switch (_context29.prev = _context29.next) {
|
4342
3766
|
case 0:
|
4343
|
-
|
3767
|
+
_context29.next = 2;
|
4344
3768
|
return this.getGrants({
|
4345
3769
|
consultationId: consultationId
|
4346
3770
|
});
|
4347
3771
|
|
4348
3772
|
case 2:
|
4349
|
-
grants =
|
3773
|
+
grants = _context29.sent;
|
4350
3774
|
|
4351
3775
|
if (!(grants.length === 0)) {
|
4352
|
-
|
3776
|
+
_context29.next = 5;
|
4353
3777
|
break;
|
4354
3778
|
}
|
4355
3779
|
|
4356
3780
|
throw AssociatedLockboxNotFound;
|
4357
3781
|
|
4358
3782
|
case 5:
|
4359
|
-
return
|
3783
|
+
return _context29.abrupt("return", grants[0]);
|
4360
3784
|
|
4361
3785
|
case 6:
|
4362
3786
|
case "end":
|
4363
|
-
return
|
3787
|
+
return _context29.stop();
|
4364
3788
|
}
|
4365
3789
|
}
|
4366
|
-
},
|
3790
|
+
}, _callee28, this);
|
4367
3791
|
}));
|
4368
3792
|
|
4369
|
-
function getGrantFromConsultId(
|
3793
|
+
function getGrantFromConsultId(_x76) {
|
4370
3794
|
return _getGrantFromConsultId.apply(this, arguments);
|
4371
3795
|
}
|
4372
3796
|
|
@@ -4382,41 +3806,41 @@ var OroClient = /*#__PURE__*/function () {
|
|
4382
3806
|
_proto.getIdentityFromConsultId =
|
4383
3807
|
/*#__PURE__*/
|
4384
3808
|
function () {
|
4385
|
-
var _getIdentityFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3809
|
+
var _getIdentityFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29(consultationId) {
|
4386
3810
|
var grant;
|
4387
|
-
return
|
3811
|
+
return _regeneratorRuntime().wrap(function _callee29$(_context30) {
|
4388
3812
|
while (1) {
|
4389
|
-
switch (
|
3813
|
+
switch (_context30.prev = _context30.next) {
|
4390
3814
|
case 0:
|
4391
|
-
|
3815
|
+
_context30.next = 2;
|
4392
3816
|
return this.getGrantFromConsultId(consultationId);
|
4393
3817
|
|
4394
3818
|
case 2:
|
4395
|
-
grant =
|
3819
|
+
grant = _context30.sent;
|
4396
3820
|
|
4397
3821
|
if (!(grant && grant.lockboxOwnerUuid)) {
|
4398
|
-
|
3822
|
+
_context30.next = 9;
|
4399
3823
|
break;
|
4400
3824
|
}
|
4401
3825
|
|
4402
|
-
|
3826
|
+
_context30.next = 6;
|
4403
3827
|
return this.guardClient.identityGet(grant.lockboxOwnerUuid);
|
4404
3828
|
|
4405
3829
|
case 6:
|
4406
|
-
return
|
3830
|
+
return _context30.abrupt("return", _context30.sent);
|
4407
3831
|
|
4408
3832
|
case 9:
|
4409
|
-
return
|
3833
|
+
return _context30.abrupt("return", undefined);
|
4410
3834
|
|
4411
3835
|
case 10:
|
4412
3836
|
case "end":
|
4413
|
-
return
|
3837
|
+
return _context30.stop();
|
4414
3838
|
}
|
4415
3839
|
}
|
4416
|
-
},
|
3840
|
+
}, _callee29, this);
|
4417
3841
|
}));
|
4418
3842
|
|
4419
|
-
function getIdentityFromConsultId(
|
3843
|
+
function getIdentityFromConsultId(_x77) {
|
4420
3844
|
return _getIdentityFromConsultId.apply(this, arguments);
|
4421
3845
|
}
|
4422
3846
|
|
@@ -4437,13 +3861,13 @@ var OroClient = /*#__PURE__*/function () {
|
|
4437
3861
|
_proto.getLockboxManifest =
|
4438
3862
|
/*#__PURE__*/
|
4439
3863
|
function () {
|
4440
|
-
var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4441
|
-
var
|
3864
|
+
var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31(lockboxUuid, filter, expandPrivateMetadata, lockboxOwnerUuid, forceRefresh) {
|
3865
|
+
var _this3 = this;
|
4442
3866
|
|
4443
3867
|
var manifestKey;
|
4444
|
-
return
|
3868
|
+
return _regeneratorRuntime().wrap(function _callee31$(_context32) {
|
4445
3869
|
while (1) {
|
4446
|
-
switch (
|
3870
|
+
switch (_context32.prev = _context32.next) {
|
4447
3871
|
case 0:
|
4448
3872
|
if (forceRefresh === void 0) {
|
4449
3873
|
forceRefresh = false;
|
@@ -4457,61 +3881,61 @@ var OroClient = /*#__PURE__*/function () {
|
|
4457
3881
|
});
|
4458
3882
|
|
4459
3883
|
if (!(!forceRefresh && this.cachedManifest[manifestKey])) {
|
4460
|
-
|
3884
|
+
_context32.next = 4;
|
4461
3885
|
break;
|
4462
3886
|
}
|
4463
3887
|
|
4464
|
-
return
|
3888
|
+
return _context32.abrupt("return", this.cachedManifest[manifestKey]);
|
4465
3889
|
|
4466
3890
|
case 4:
|
4467
|
-
return
|
3891
|
+
return _context32.abrupt("return", this.vaultClient.lockboxManifestGet(lockboxUuid, filter, lockboxOwnerUuid).then(function (manifest) {
|
4468
3892
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
4469
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/
|
3893
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30(entry) {
|
4470
3894
|
var privateMeta;
|
4471
|
-
return
|
3895
|
+
return _regeneratorRuntime().wrap(function _callee30$(_context31) {
|
4472
3896
|
while (1) {
|
4473
|
-
switch (
|
3897
|
+
switch (_context31.prev = _context31.next) {
|
4474
3898
|
case 0:
|
4475
3899
|
if (!(expandPrivateMetadata && entry.metadata.privateMetadata)) {
|
4476
|
-
|
3900
|
+
_context31.next = 5;
|
4477
3901
|
break;
|
4478
3902
|
}
|
4479
3903
|
|
4480
|
-
|
4481
|
-
return
|
3904
|
+
_context31.next = 3;
|
3905
|
+
return _this3.getJsonData(lockboxUuid, entry.metadata.privateMetadata, lockboxOwnerUuid);
|
4482
3906
|
|
4483
3907
|
case 3:
|
4484
|
-
privateMeta =
|
3908
|
+
privateMeta = _context31.sent;
|
4485
3909
|
entry.metadata = _extends({}, entry.metadata, privateMeta);
|
4486
3910
|
|
4487
3911
|
case 5:
|
4488
|
-
return
|
3912
|
+
return _context31.abrupt("return", entry);
|
4489
3913
|
|
4490
3914
|
case 6:
|
4491
3915
|
case "end":
|
4492
|
-
return
|
3916
|
+
return _context31.stop();
|
4493
3917
|
}
|
4494
3918
|
}
|
4495
|
-
},
|
3919
|
+
}, _callee30);
|
4496
3920
|
}));
|
4497
3921
|
|
4498
|
-
return function (
|
3922
|
+
return function (_x83) {
|
4499
3923
|
return _ref4.apply(this, arguments);
|
4500
3924
|
};
|
4501
3925
|
}())).then(function (manifest) {
|
4502
|
-
return
|
3926
|
+
return _this3.cachedManifest[manifestKey] = manifest;
|
4503
3927
|
});
|
4504
3928
|
}));
|
4505
3929
|
|
4506
3930
|
case 5:
|
4507
3931
|
case "end":
|
4508
|
-
return
|
3932
|
+
return _context32.stop();
|
4509
3933
|
}
|
4510
3934
|
}
|
4511
|
-
},
|
3935
|
+
}, _callee31, this);
|
4512
3936
|
}));
|
4513
3937
|
|
4514
|
-
function getLockboxManifest(
|
3938
|
+
function getLockboxManifest(_x78, _x79, _x80, _x81, _x82) {
|
4515
3939
|
return _getLockboxManifest.apply(this, arguments);
|
4516
3940
|
}
|
4517
3941
|
|
@@ -4529,43 +3953,43 @@ var OroClient = /*#__PURE__*/function () {
|
|
4529
3953
|
_proto.createPersonalInformations =
|
4530
3954
|
/*#__PURE__*/
|
4531
3955
|
function () {
|
4532
|
-
var _createPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3956
|
+
var _createPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32(identity, data, dataUuid) {
|
4533
3957
|
var _yield$this$getGrants;
|
4534
3958
|
|
4535
3959
|
var lockboxUuid;
|
4536
|
-
return
|
3960
|
+
return _regeneratorRuntime().wrap(function _callee32$(_context33) {
|
4537
3961
|
while (1) {
|
4538
|
-
switch (
|
3962
|
+
switch (_context33.prev = _context33.next) {
|
4539
3963
|
case 0:
|
4540
|
-
|
3964
|
+
_context33.next = 2;
|
4541
3965
|
return this.getGrants();
|
4542
3966
|
|
4543
3967
|
case 2:
|
4544
|
-
|
3968
|
+
_context33.t0 = _yield$this$getGrants = _context33.sent.find(function (lockbox) {
|
4545
3969
|
return lockbox.lockboxOwnerUuid === identity.id;
|
4546
3970
|
});
|
4547
3971
|
|
4548
|
-
if (!(
|
4549
|
-
|
3972
|
+
if (!(_context33.t0 == null)) {
|
3973
|
+
_context33.next = 7;
|
4550
3974
|
break;
|
4551
3975
|
}
|
4552
3976
|
|
4553
|
-
|
4554
|
-
|
3977
|
+
_context33.t1 = void 0;
|
3978
|
+
_context33.next = 8;
|
4555
3979
|
break;
|
4556
3980
|
|
4557
3981
|
case 7:
|
4558
|
-
|
3982
|
+
_context33.t1 = _yield$this$getGrants.lockboxUuid;
|
4559
3983
|
|
4560
3984
|
case 8:
|
4561
|
-
lockboxUuid =
|
3985
|
+
lockboxUuid = _context33.t1;
|
4562
3986
|
|
4563
3987
|
if (!lockboxUuid) {
|
4564
|
-
|
3988
|
+
_context33.next = 13;
|
4565
3989
|
break;
|
4566
3990
|
}
|
4567
3991
|
|
4568
|
-
return
|
3992
|
+
return _context33.abrupt("return", this.createJsonData(lockboxUuid, data, {
|
4569
3993
|
category: MetadataCategory.Personal,
|
4570
3994
|
documentType: DocumentType.PopulatedWorkflowData
|
4571
3995
|
}, {}, undefined, dataUuid));
|
@@ -4575,13 +3999,13 @@ var OroClient = /*#__PURE__*/function () {
|
|
4575
3999
|
|
4576
4000
|
case 14:
|
4577
4001
|
case "end":
|
4578
|
-
return
|
4002
|
+
return _context33.stop();
|
4579
4003
|
}
|
4580
4004
|
}
|
4581
|
-
},
|
4005
|
+
}, _callee32, this);
|
4582
4006
|
}));
|
4583
4007
|
|
4584
|
-
function createPersonalInformations(
|
4008
|
+
function createPersonalInformations(_x84, _x85, _x86) {
|
4585
4009
|
return _createPersonalInformations.apply(this, arguments);
|
4586
4010
|
}
|
4587
4011
|
|
@@ -4599,43 +4023,43 @@ var OroClient = /*#__PURE__*/function () {
|
|
4599
4023
|
_proto.createUserPreference =
|
4600
4024
|
/*#__PURE__*/
|
4601
4025
|
function () {
|
4602
|
-
var _createUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4026
|
+
var _createUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(identity, preference, dataUuid) {
|
4603
4027
|
var _yield$this$getGrants2;
|
4604
4028
|
|
4605
4029
|
var lockboxUuid;
|
4606
|
-
return
|
4030
|
+
return _regeneratorRuntime().wrap(function _callee33$(_context34) {
|
4607
4031
|
while (1) {
|
4608
|
-
switch (
|
4032
|
+
switch (_context34.prev = _context34.next) {
|
4609
4033
|
case 0:
|
4610
|
-
|
4034
|
+
_context34.next = 2;
|
4611
4035
|
return this.getGrants();
|
4612
4036
|
|
4613
4037
|
case 2:
|
4614
|
-
|
4038
|
+
_context34.t0 = _yield$this$getGrants2 = _context34.sent.find(function (lockbox) {
|
4615
4039
|
return lockbox.lockboxOwnerUuid === identity.id;
|
4616
4040
|
});
|
4617
4041
|
|
4618
|
-
if (!(
|
4619
|
-
|
4042
|
+
if (!(_context34.t0 == null)) {
|
4043
|
+
_context34.next = 7;
|
4620
4044
|
break;
|
4621
4045
|
}
|
4622
4046
|
|
4623
|
-
|
4624
|
-
|
4047
|
+
_context34.t1 = void 0;
|
4048
|
+
_context34.next = 8;
|
4625
4049
|
break;
|
4626
4050
|
|
4627
4051
|
case 7:
|
4628
|
-
|
4052
|
+
_context34.t1 = _yield$this$getGrants2.lockboxUuid;
|
4629
4053
|
|
4630
4054
|
case 8:
|
4631
|
-
lockboxUuid =
|
4055
|
+
lockboxUuid = _context34.t1;
|
4632
4056
|
|
4633
4057
|
if (!lockboxUuid) {
|
4634
|
-
|
4058
|
+
_context34.next = 13;
|
4635
4059
|
break;
|
4636
4060
|
}
|
4637
4061
|
|
4638
|
-
return
|
4062
|
+
return _context34.abrupt("return", this.createJsonData(lockboxUuid, preference, {
|
4639
4063
|
category: MetadataCategory.Preference,
|
4640
4064
|
contentType: 'application/json'
|
4641
4065
|
}, {}, undefined, dataUuid));
|
@@ -4645,13 +4069,13 @@ var OroClient = /*#__PURE__*/function () {
|
|
4645
4069
|
|
4646
4070
|
case 14:
|
4647
4071
|
case "end":
|
4648
|
-
return
|
4072
|
+
return _context34.stop();
|
4649
4073
|
}
|
4650
4074
|
}
|
4651
|
-
},
|
4075
|
+
}, _callee33, this);
|
4652
4076
|
}));
|
4653
4077
|
|
4654
|
-
function createUserPreference(
|
4078
|
+
function createUserPreference(_x87, _x88, _x89) {
|
4655
4079
|
return _createUserPreference.apply(this, arguments);
|
4656
4080
|
}
|
4657
4081
|
|
@@ -4667,16 +4091,16 @@ var OroClient = /*#__PURE__*/function () {
|
|
4667
4091
|
_proto.getDataFromGrant =
|
4668
4092
|
/*#__PURE__*/
|
4669
4093
|
function () {
|
4670
|
-
var _getDataFromGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4094
|
+
var _getDataFromGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34(grant, filter) {
|
4671
4095
|
var lockboxUuid, lockboxOwnerUuid, identificationDataUuid;
|
4672
|
-
return
|
4096
|
+
return _regeneratorRuntime().wrap(function _callee34$(_context35) {
|
4673
4097
|
while (1) {
|
4674
|
-
switch (
|
4098
|
+
switch (_context35.prev = _context35.next) {
|
4675
4099
|
case 0:
|
4676
4100
|
lockboxUuid = grant.lockboxUuid, lockboxOwnerUuid = grant.lockboxOwnerUuid;
|
4677
4101
|
|
4678
4102
|
if (lockboxUuid) {
|
4679
|
-
|
4103
|
+
_context35.next = 3;
|
4680
4104
|
break;
|
4681
4105
|
}
|
4682
4106
|
|
@@ -4684,42 +4108,42 @@ var OroClient = /*#__PURE__*/function () {
|
|
4684
4108
|
|
4685
4109
|
case 3:
|
4686
4110
|
if (lockboxOwnerUuid) {
|
4687
|
-
|
4111
|
+
_context35.next = 5;
|
4688
4112
|
break;
|
4689
4113
|
}
|
4690
4114
|
|
4691
4115
|
throw MissingLockboxOwner;
|
4692
4116
|
|
4693
4117
|
case 5:
|
4694
|
-
|
4118
|
+
_context35.next = 7;
|
4695
4119
|
return this.getLockboxManifest(lockboxUuid, filter, false, grant.lockboxOwnerUuid, true);
|
4696
4120
|
|
4697
4121
|
case 7:
|
4698
|
-
identificationDataUuid =
|
4699
|
-
|
4700
|
-
|
4701
|
-
|
4702
|
-
|
4122
|
+
identificationDataUuid = _context35.sent[0].dataUuid;
|
4123
|
+
_context35.t0 = lockboxOwnerUuid;
|
4124
|
+
_context35.t1 = lockboxUuid;
|
4125
|
+
_context35.t2 = identificationDataUuid;
|
4126
|
+
_context35.next = 13;
|
4703
4127
|
return this.getJsonData(lockboxUuid, identificationDataUuid);
|
4704
4128
|
|
4705
4129
|
case 13:
|
4706
|
-
|
4707
|
-
return
|
4708
|
-
lockboxOwnerUuid:
|
4709
|
-
lockboxUuid:
|
4710
|
-
dataUuid:
|
4711
|
-
data:
|
4130
|
+
_context35.t3 = _context35.sent;
|
4131
|
+
return _context35.abrupt("return", {
|
4132
|
+
lockboxOwnerUuid: _context35.t0,
|
4133
|
+
lockboxUuid: _context35.t1,
|
4134
|
+
dataUuid: _context35.t2,
|
4135
|
+
data: _context35.t3
|
4712
4136
|
});
|
4713
4137
|
|
4714
4138
|
case 15:
|
4715
4139
|
case "end":
|
4716
|
-
return
|
4140
|
+
return _context35.stop();
|
4717
4141
|
}
|
4718
4142
|
}
|
4719
|
-
},
|
4143
|
+
}, _callee34, this);
|
4720
4144
|
}));
|
4721
4145
|
|
4722
|
-
function getDataFromGrant(
|
4146
|
+
function getDataFromGrant(_x90, _x91) {
|
4723
4147
|
return _getDataFromGrant.apply(this, arguments);
|
4724
4148
|
}
|
4725
4149
|
|
@@ -4735,40 +4159,40 @@ var OroClient = /*#__PURE__*/function () {
|
|
4735
4159
|
_proto.getUserPreferenceFromConsultId =
|
4736
4160
|
/*#__PURE__*/
|
4737
4161
|
function () {
|
4738
|
-
var _getUserPreferenceFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4162
|
+
var _getUserPreferenceFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35(consultationId) {
|
4739
4163
|
var grant;
|
4740
|
-
return
|
4164
|
+
return _regeneratorRuntime().wrap(function _callee35$(_context36) {
|
4741
4165
|
while (1) {
|
4742
|
-
switch (
|
4166
|
+
switch (_context36.prev = _context36.next) {
|
4743
4167
|
case 0:
|
4744
|
-
|
4168
|
+
_context36.next = 2;
|
4745
4169
|
return this.getGrantFromConsultId(consultationId);
|
4746
4170
|
|
4747
4171
|
case 2:
|
4748
|
-
grant =
|
4172
|
+
grant = _context36.sent;
|
4749
4173
|
|
4750
4174
|
if (grant) {
|
4751
|
-
|
4175
|
+
_context36.next = 5;
|
4752
4176
|
break;
|
4753
4177
|
}
|
4754
4178
|
|
4755
4179
|
throw MissingGrant;
|
4756
4180
|
|
4757
4181
|
case 5:
|
4758
|
-
return
|
4182
|
+
return _context36.abrupt("return", this.getDataFromGrant(grant, {
|
4759
4183
|
category: MetadataCategory.Preference,
|
4760
4184
|
contentType: 'application/json'
|
4761
4185
|
}));
|
4762
4186
|
|
4763
4187
|
case 6:
|
4764
4188
|
case "end":
|
4765
|
-
return
|
4189
|
+
return _context36.stop();
|
4766
4190
|
}
|
4767
4191
|
}
|
4768
|
-
},
|
4192
|
+
}, _callee35, this);
|
4769
4193
|
}));
|
4770
4194
|
|
4771
|
-
function getUserPreferenceFromConsultId(
|
4195
|
+
function getUserPreferenceFromConsultId(_x92) {
|
4772
4196
|
return _getUserPreferenceFromConsultId.apply(this, arguments);
|
4773
4197
|
}
|
4774
4198
|
|
@@ -4784,42 +4208,42 @@ var OroClient = /*#__PURE__*/function () {
|
|
4784
4208
|
_proto.getUserPreference =
|
4785
4209
|
/*#__PURE__*/
|
4786
4210
|
function () {
|
4787
|
-
var _getUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4211
|
+
var _getUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36(identity) {
|
4788
4212
|
var grant;
|
4789
|
-
return
|
4213
|
+
return _regeneratorRuntime().wrap(function _callee36$(_context37) {
|
4790
4214
|
while (1) {
|
4791
|
-
switch (
|
4215
|
+
switch (_context37.prev = _context37.next) {
|
4792
4216
|
case 0:
|
4793
|
-
|
4217
|
+
_context37.next = 2;
|
4794
4218
|
return this.getGrants();
|
4795
4219
|
|
4796
4220
|
case 2:
|
4797
|
-
grant =
|
4221
|
+
grant = _context37.sent.find(function (lockbox) {
|
4798
4222
|
return lockbox.lockboxOwnerUuid === identity.id;
|
4799
4223
|
});
|
4800
4224
|
|
4801
4225
|
if (grant) {
|
4802
|
-
|
4226
|
+
_context37.next = 5;
|
4803
4227
|
break;
|
4804
4228
|
}
|
4805
4229
|
|
4806
4230
|
throw MissingGrant;
|
4807
4231
|
|
4808
4232
|
case 5:
|
4809
|
-
return
|
4233
|
+
return _context37.abrupt("return", this.getDataFromGrant(grant, {
|
4810
4234
|
category: MetadataCategory.Preference,
|
4811
4235
|
contentType: 'application/json'
|
4812
4236
|
}));
|
4813
4237
|
|
4814
4238
|
case 6:
|
4815
4239
|
case "end":
|
4816
|
-
return
|
4240
|
+
return _context37.stop();
|
4817
4241
|
}
|
4818
4242
|
}
|
4819
|
-
},
|
4243
|
+
}, _callee36, this);
|
4820
4244
|
}));
|
4821
4245
|
|
4822
|
-
function getUserPreference(
|
4246
|
+
function getUserPreference(_x93) {
|
4823
4247
|
return _getUserPreference.apply(this, arguments);
|
4824
4248
|
}
|
4825
4249
|
|
@@ -4835,40 +4259,40 @@ var OroClient = /*#__PURE__*/function () {
|
|
4835
4259
|
_proto.getRecoveryDataFromConsultId =
|
4836
4260
|
/*#__PURE__*/
|
4837
4261
|
function () {
|
4838
|
-
var _getRecoveryDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4262
|
+
var _getRecoveryDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee37(consultationId) {
|
4839
4263
|
var grant;
|
4840
|
-
return
|
4264
|
+
return _regeneratorRuntime().wrap(function _callee37$(_context38) {
|
4841
4265
|
while (1) {
|
4842
|
-
switch (
|
4266
|
+
switch (_context38.prev = _context38.next) {
|
4843
4267
|
case 0:
|
4844
|
-
|
4268
|
+
_context38.next = 2;
|
4845
4269
|
return this.getGrantFromConsultId(consultationId);
|
4846
4270
|
|
4847
4271
|
case 2:
|
4848
|
-
grant =
|
4272
|
+
grant = _context38.sent;
|
4849
4273
|
|
4850
4274
|
if (grant) {
|
4851
|
-
|
4275
|
+
_context38.next = 5;
|
4852
4276
|
break;
|
4853
4277
|
}
|
4854
4278
|
|
4855
4279
|
throw MissingGrant;
|
4856
4280
|
|
4857
4281
|
case 5:
|
4858
|
-
return
|
4282
|
+
return _context38.abrupt("return", this.getDataFromGrant(grant, {
|
4859
4283
|
category: MetadataCategory.Recovery,
|
4860
4284
|
contentType: 'application/json'
|
4861
4285
|
}));
|
4862
4286
|
|
4863
4287
|
case 6:
|
4864
4288
|
case "end":
|
4865
|
-
return
|
4289
|
+
return _context38.stop();
|
4866
4290
|
}
|
4867
4291
|
}
|
4868
|
-
},
|
4292
|
+
}, _callee37, this);
|
4869
4293
|
}));
|
4870
4294
|
|
4871
|
-
function getRecoveryDataFromConsultId(
|
4295
|
+
function getRecoveryDataFromConsultId(_x94) {
|
4872
4296
|
return _getRecoveryDataFromConsultId.apply(this, arguments);
|
4873
4297
|
}
|
4874
4298
|
|
@@ -4884,42 +4308,42 @@ var OroClient = /*#__PURE__*/function () {
|
|
4884
4308
|
_proto.getRecoveryData =
|
4885
4309
|
/*#__PURE__*/
|
4886
4310
|
function () {
|
4887
|
-
var _getRecoveryData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4311
|
+
var _getRecoveryData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee38(identity) {
|
4888
4312
|
var grant;
|
4889
|
-
return
|
4313
|
+
return _regeneratorRuntime().wrap(function _callee38$(_context39) {
|
4890
4314
|
while (1) {
|
4891
|
-
switch (
|
4315
|
+
switch (_context39.prev = _context39.next) {
|
4892
4316
|
case 0:
|
4893
|
-
|
4317
|
+
_context39.next = 2;
|
4894
4318
|
return this.getGrants();
|
4895
4319
|
|
4896
4320
|
case 2:
|
4897
|
-
grant =
|
4321
|
+
grant = _context39.sent.find(function (lockbox) {
|
4898
4322
|
return lockbox.lockboxOwnerUuid === identity.id;
|
4899
4323
|
});
|
4900
4324
|
|
4901
4325
|
if (grant) {
|
4902
|
-
|
4326
|
+
_context39.next = 5;
|
4903
4327
|
break;
|
4904
4328
|
}
|
4905
4329
|
|
4906
4330
|
throw MissingGrant;
|
4907
4331
|
|
4908
4332
|
case 5:
|
4909
|
-
return
|
4333
|
+
return _context39.abrupt("return", this.getDataFromGrant(grant, {
|
4910
4334
|
category: MetadataCategory.Recovery,
|
4911
4335
|
contentType: 'application/json'
|
4912
4336
|
}));
|
4913
4337
|
|
4914
4338
|
case 6:
|
4915
4339
|
case "end":
|
4916
|
-
return
|
4340
|
+
return _context39.stop();
|
4917
4341
|
}
|
4918
4342
|
}
|
4919
|
-
},
|
4343
|
+
}, _callee38, this);
|
4920
4344
|
}));
|
4921
4345
|
|
4922
|
-
function getRecoveryData(
|
4346
|
+
function getRecoveryData(_x95) {
|
4923
4347
|
return _getRecoveryData.apply(this, arguments);
|
4924
4348
|
}
|
4925
4349
|
|
@@ -4940,48 +4364,44 @@ var OroClient = /*#__PURE__*/function () {
|
|
4940
4364
|
_proto.getAssignedConsultations =
|
4941
4365
|
/*#__PURE__*/
|
4942
4366
|
function () {
|
4943
|
-
var _getAssignedConsultations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4944
|
-
var
|
4367
|
+
var _getAssignedConsultations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40(practiceUuid) {
|
4368
|
+
var _this4 = this;
|
4945
4369
|
|
4946
|
-
return
|
4370
|
+
return _regeneratorRuntime().wrap(function _callee40$(_context41) {
|
4947
4371
|
while (1) {
|
4948
|
-
switch (
|
4372
|
+
switch (_context41.prev = _context41.next) {
|
4949
4373
|
case 0:
|
4950
|
-
|
4951
|
-
|
4952
|
-
|
4953
|
-
|
4954
|
-
_context42.t0 = Promise;
|
4955
|
-
_context42.next = 4;
|
4956
|
-
return this.getGrants(undefined, forceRefresh);
|
4374
|
+
_context41.t0 = Promise;
|
4375
|
+
_context41.next = 3;
|
4376
|
+
return this.getGrants();
|
4957
4377
|
|
4958
|
-
case
|
4959
|
-
|
4960
|
-
return
|
4378
|
+
case 3:
|
4379
|
+
_context41.t1 = _context41.sent.map(function (grant) {
|
4380
|
+
return _this4.getLockboxManifest(grant.lockboxUuid, {
|
4961
4381
|
category: MetadataCategory.Consultation,
|
4962
4382
|
documentType: DocumentType.PopulatedWorkflowData
|
4963
|
-
}, true, undefined
|
4383
|
+
}, true, undefined).then(function (manifest) {
|
4964
4384
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
4965
|
-
var _ref5 = _asyncToGenerator( /*#__PURE__*/
|
4966
|
-
return
|
4385
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee39(entry) {
|
4386
|
+
return _regeneratorRuntime().wrap(function _callee39$(_context40) {
|
4967
4387
|
while (1) {
|
4968
|
-
switch (
|
4388
|
+
switch (_context40.prev = _context40.next) {
|
4969
4389
|
case 0:
|
4970
|
-
|
4971
|
-
return
|
4390
|
+
_context40.next = 2;
|
4391
|
+
return _this4.consultClient.getConsultByUUID(entry.metadata.consultationId, practiceUuid);
|
4972
4392
|
|
4973
4393
|
case 2:
|
4974
|
-
return
|
4394
|
+
return _context40.abrupt("return", _context40.sent);
|
4975
4395
|
|
4976
4396
|
case 3:
|
4977
4397
|
case "end":
|
4978
|
-
return
|
4398
|
+
return _context40.stop();
|
4979
4399
|
}
|
4980
4400
|
}
|
4981
|
-
},
|
4401
|
+
}, _callee39);
|
4982
4402
|
}));
|
4983
4403
|
|
4984
|
-
return function (
|
4404
|
+
return function (_x97) {
|
4985
4405
|
return _ref5.apply(this, arguments);
|
4986
4406
|
};
|
4987
4407
|
}())).then(function (promise) {
|
@@ -4989,19 +4409,19 @@ var OroClient = /*#__PURE__*/function () {
|
|
4989
4409
|
});
|
4990
4410
|
});
|
4991
4411
|
});
|
4992
|
-
return
|
4412
|
+
return _context41.abrupt("return", _context41.t0.all.call(_context41.t0, _context41.t1).then(function (consults) {
|
4993
4413
|
return consults.flat();
|
4994
4414
|
}));
|
4995
4415
|
|
4996
|
-
case
|
4416
|
+
case 5:
|
4997
4417
|
case "end":
|
4998
|
-
return
|
4418
|
+
return _context41.stop();
|
4999
4419
|
}
|
5000
4420
|
}
|
5001
|
-
},
|
4421
|
+
}, _callee40, this);
|
5002
4422
|
}));
|
5003
4423
|
|
5004
|
-
function getAssignedConsultations(
|
4424
|
+
function getAssignedConsultations(_x96) {
|
5005
4425
|
return _getAssignedConsultations.apply(this, arguments);
|
5006
4426
|
}
|
5007
4427
|
|
@@ -5017,85 +4437,85 @@ var OroClient = /*#__PURE__*/function () {
|
|
5017
4437
|
_proto.getPastConsultationsFromConsultId =
|
5018
4438
|
/*#__PURE__*/
|
5019
4439
|
function () {
|
5020
|
-
var _getPastConsultationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5021
|
-
var
|
4440
|
+
var _getPastConsultationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee42(consultationId, practiceUuid) {
|
4441
|
+
var _this5 = this;
|
5022
4442
|
|
5023
4443
|
var grant, consultationsInLockbox;
|
5024
|
-
return
|
4444
|
+
return _regeneratorRuntime().wrap(function _callee42$(_context43) {
|
5025
4445
|
while (1) {
|
5026
|
-
switch (
|
4446
|
+
switch (_context43.prev = _context43.next) {
|
5027
4447
|
case 0:
|
5028
|
-
|
4448
|
+
_context43.next = 2;
|
5029
4449
|
return this.getGrantFromConsultId(consultationId);
|
5030
4450
|
|
5031
4451
|
case 2:
|
5032
|
-
grant =
|
4452
|
+
grant = _context43.sent;
|
5033
4453
|
|
5034
4454
|
if (grant) {
|
5035
|
-
|
4455
|
+
_context43.next = 5;
|
5036
4456
|
break;
|
5037
4457
|
}
|
5038
4458
|
|
5039
|
-
return
|
4459
|
+
return _context43.abrupt("return", undefined);
|
5040
4460
|
|
5041
4461
|
case 5:
|
5042
|
-
|
4462
|
+
_context43.next = 7;
|
5043
4463
|
return this.vaultClient.lockboxMetadataGet(grant.lockboxUuid, ['consultationId'], ['consultationId'], {
|
5044
4464
|
category: MetadataCategory.Consultation,
|
5045
4465
|
documentType: DocumentType.PopulatedWorkflowData
|
5046
4466
|
}, grant.lockboxOwnerUuid);
|
5047
4467
|
|
5048
4468
|
case 7:
|
5049
|
-
consultationsInLockbox =
|
4469
|
+
consultationsInLockbox = _context43.sent.flat().map(function (metadata) {
|
5050
4470
|
return metadata.consultationId;
|
5051
4471
|
});
|
5052
4472
|
|
5053
4473
|
if (!(consultationsInLockbox.length == 0)) {
|
5054
|
-
|
4474
|
+
_context43.next = 10;
|
5055
4475
|
break;
|
5056
4476
|
}
|
5057
4477
|
|
5058
|
-
return
|
4478
|
+
return _context43.abrupt("return", []);
|
5059
4479
|
|
5060
4480
|
case 10:
|
5061
|
-
|
4481
|
+
_context43.next = 12;
|
5062
4482
|
return Promise.all(consultationsInLockbox.map( /*#__PURE__*/function () {
|
5063
|
-
var _ref6 = _asyncToGenerator( /*#__PURE__*/
|
5064
|
-
return
|
4483
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee41(consultId) {
|
4484
|
+
return _regeneratorRuntime().wrap(function _callee41$(_context42) {
|
5065
4485
|
while (1) {
|
5066
|
-
switch (
|
4486
|
+
switch (_context42.prev = _context42.next) {
|
5067
4487
|
case 0:
|
5068
|
-
|
5069
|
-
return
|
4488
|
+
_context42.next = 2;
|
4489
|
+
return _this5.consultClient.getConsultByUUID(consultId, practiceUuid);
|
5070
4490
|
|
5071
4491
|
case 2:
|
5072
|
-
return
|
4492
|
+
return _context42.abrupt("return", _context42.sent);
|
5073
4493
|
|
5074
4494
|
case 3:
|
5075
4495
|
case "end":
|
5076
|
-
return
|
4496
|
+
return _context42.stop();
|
5077
4497
|
}
|
5078
4498
|
}
|
5079
|
-
},
|
4499
|
+
}, _callee41);
|
5080
4500
|
}));
|
5081
4501
|
|
5082
|
-
return function (
|
4502
|
+
return function (_x100) {
|
5083
4503
|
return _ref6.apply(this, arguments);
|
5084
4504
|
};
|
5085
4505
|
}()));
|
5086
4506
|
|
5087
4507
|
case 12:
|
5088
|
-
return
|
4508
|
+
return _context43.abrupt("return", _context43.sent);
|
5089
4509
|
|
5090
4510
|
case 13:
|
5091
4511
|
case "end":
|
5092
|
-
return
|
4512
|
+
return _context43.stop();
|
5093
4513
|
}
|
5094
4514
|
}
|
5095
|
-
},
|
4515
|
+
}, _callee42, this);
|
5096
4516
|
}));
|
5097
4517
|
|
5098
|
-
function getPastConsultationsFromConsultId(
|
4518
|
+
function getPastConsultationsFromConsultId(_x98, _x99) {
|
5099
4519
|
return _getPastConsultationsFromConsultId.apply(this, arguments);
|
5100
4520
|
}
|
5101
4521
|
|
@@ -5112,48 +4532,48 @@ var OroClient = /*#__PURE__*/function () {
|
|
5112
4532
|
_proto.getPatientConsultationData =
|
5113
4533
|
/*#__PURE__*/
|
5114
4534
|
function () {
|
5115
|
-
var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5116
|
-
var
|
4535
|
+
var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee43(consultationId, forceRefresh) {
|
4536
|
+
var _this6 = this;
|
5117
4537
|
|
5118
|
-
return
|
4538
|
+
return _regeneratorRuntime().wrap(function _callee43$(_context44) {
|
5119
4539
|
while (1) {
|
5120
|
-
switch (
|
4540
|
+
switch (_context44.prev = _context44.next) {
|
5121
4541
|
case 0:
|
5122
4542
|
if (forceRefresh === void 0) {
|
5123
4543
|
forceRefresh = false;
|
5124
4544
|
}
|
5125
4545
|
|
5126
|
-
|
5127
|
-
|
4546
|
+
_context44.t0 = Promise;
|
4547
|
+
_context44.next = 4;
|
5128
4548
|
return this.getGrants({
|
5129
4549
|
consultationId: consultationId
|
5130
|
-
}
|
4550
|
+
});
|
5131
4551
|
|
5132
4552
|
case 4:
|
5133
|
-
|
5134
|
-
return
|
4553
|
+
_context44.t1 = _context44.sent.map(function (grant) {
|
4554
|
+
return _this6.getLockboxManifest(grant.lockboxUuid, {
|
5135
4555
|
category: MetadataCategory.Consultation,
|
5136
4556
|
documentType: DocumentType.PopulatedWorkflowData,
|
5137
4557
|
consultationId: consultationId
|
5138
4558
|
}, true, grant.lockboxOwnerUuid, forceRefresh).then(function (manifest) {
|
5139
4559
|
return Promise.all(manifest.map(function (e) {
|
5140
|
-
return
|
4560
|
+
return _this6.getJsonData(grant.lockboxUuid, e.dataUuid, grant.lockboxOwnerUuid);
|
5141
4561
|
}));
|
5142
4562
|
});
|
5143
4563
|
}).flat();
|
5144
|
-
return
|
4564
|
+
return _context44.abrupt("return", _context44.t0.all.call(_context44.t0, _context44.t1).then(function (data) {
|
5145
4565
|
return data.flat();
|
5146
4566
|
}));
|
5147
4567
|
|
5148
4568
|
case 6:
|
5149
4569
|
case "end":
|
5150
|
-
return
|
4570
|
+
return _context44.stop();
|
5151
4571
|
}
|
5152
4572
|
}
|
5153
|
-
},
|
4573
|
+
}, _callee43, this);
|
5154
4574
|
}));
|
5155
4575
|
|
5156
|
-
function getPatientConsultationData(
|
4576
|
+
function getPatientConsultationData(_x101, _x102) {
|
5157
4577
|
return _getPatientConsultationData.apply(this, arguments);
|
5158
4578
|
}
|
5159
4579
|
|
@@ -5169,25 +4589,25 @@ var OroClient = /*#__PURE__*/function () {
|
|
5169
4589
|
_proto.getPatientPrescriptionsList =
|
5170
4590
|
/*#__PURE__*/
|
5171
4591
|
function () {
|
5172
|
-
var _getPatientPrescriptionsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5173
|
-
return
|
4592
|
+
var _getPatientPrescriptionsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee44(consultationId) {
|
4593
|
+
return _regeneratorRuntime().wrap(function _callee44$(_context45) {
|
5174
4594
|
while (1) {
|
5175
|
-
switch (
|
4595
|
+
switch (_context45.prev = _context45.next) {
|
5176
4596
|
case 0:
|
5177
|
-
return
|
4597
|
+
return _context45.abrupt("return", this.getPatientDocumentsList({
|
5178
4598
|
category: MetadataCategory.Consultation,
|
5179
4599
|
documentType: DocumentType.Prescription
|
5180
4600
|
}, true, consultationId));
|
5181
4601
|
|
5182
4602
|
case 1:
|
5183
4603
|
case "end":
|
5184
|
-
return
|
4604
|
+
return _context45.stop();
|
5185
4605
|
}
|
5186
4606
|
}
|
5187
|
-
},
|
4607
|
+
}, _callee44, this);
|
5188
4608
|
}));
|
5189
4609
|
|
5190
|
-
function getPatientPrescriptionsList(
|
4610
|
+
function getPatientPrescriptionsList(_x103) {
|
5191
4611
|
return _getPatientPrescriptionsList.apply(this, arguments);
|
5192
4612
|
}
|
5193
4613
|
|
@@ -5203,25 +4623,25 @@ var OroClient = /*#__PURE__*/function () {
|
|
5203
4623
|
_proto.getPatientResultsList =
|
5204
4624
|
/*#__PURE__*/
|
5205
4625
|
function () {
|
5206
|
-
var _getPatientResultsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5207
|
-
return
|
4626
|
+
var _getPatientResultsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee45(consultationId) {
|
4627
|
+
return _regeneratorRuntime().wrap(function _callee45$(_context46) {
|
5208
4628
|
while (1) {
|
5209
|
-
switch (
|
4629
|
+
switch (_context46.prev = _context46.next) {
|
5210
4630
|
case 0:
|
5211
|
-
return
|
4631
|
+
return _context46.abrupt("return", this.getPatientDocumentsList({
|
5212
4632
|
category: MetadataCategory.Consultation,
|
5213
4633
|
documentType: DocumentType.Result
|
5214
4634
|
}, true, consultationId));
|
5215
4635
|
|
5216
4636
|
case 1:
|
5217
4637
|
case "end":
|
5218
|
-
return
|
4638
|
+
return _context46.stop();
|
5219
4639
|
}
|
5220
4640
|
}
|
5221
|
-
},
|
4641
|
+
}, _callee45, this);
|
5222
4642
|
}));
|
5223
4643
|
|
5224
|
-
function getPatientResultsList(
|
4644
|
+
function getPatientResultsList(_x104) {
|
5225
4645
|
return _getPatientResultsList.apply(this, arguments);
|
5226
4646
|
}
|
5227
4647
|
|
@@ -5237,25 +4657,25 @@ var OroClient = /*#__PURE__*/function () {
|
|
5237
4657
|
_proto.getPatientTreatmentPlans =
|
5238
4658
|
/*#__PURE__*/
|
5239
4659
|
function () {
|
5240
|
-
var _getPatientTreatmentPlans = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5241
|
-
return
|
4660
|
+
var _getPatientTreatmentPlans = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee46(consultationId) {
|
4661
|
+
return _regeneratorRuntime().wrap(function _callee46$(_context47) {
|
5242
4662
|
while (1) {
|
5243
|
-
switch (
|
4663
|
+
switch (_context47.prev = _context47.next) {
|
5244
4664
|
case 0:
|
5245
|
-
return
|
4665
|
+
return _context47.abrupt("return", this.getPatientDocumentsList({
|
5246
4666
|
category: MetadataCategory.Consultation,
|
5247
4667
|
documentType: DocumentType.TreatmentPlan
|
5248
4668
|
}, true, consultationId));
|
5249
4669
|
|
5250
4670
|
case 1:
|
5251
4671
|
case "end":
|
5252
|
-
return
|
4672
|
+
return _context47.stop();
|
5253
4673
|
}
|
5254
4674
|
}
|
5255
|
-
},
|
4675
|
+
}, _callee46, this);
|
5256
4676
|
}));
|
5257
4677
|
|
5258
|
-
function getPatientTreatmentPlans(
|
4678
|
+
function getPatientTreatmentPlans(_x105) {
|
5259
4679
|
return _getPatientTreatmentPlans.apply(this, arguments);
|
5260
4680
|
}
|
5261
4681
|
|
@@ -5272,12 +4692,12 @@ var OroClient = /*#__PURE__*/function () {
|
|
5272
4692
|
_proto.getPatientTreatmentPlanByUuid =
|
5273
4693
|
/*#__PURE__*/
|
5274
4694
|
function () {
|
5275
|
-
var _getPatientTreatmentPlanByUuid = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5276
|
-
return
|
4695
|
+
var _getPatientTreatmentPlanByUuid = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee47(consultationId, treatmentPlanId) {
|
4696
|
+
return _regeneratorRuntime().wrap(function _callee47$(_context48) {
|
5277
4697
|
while (1) {
|
5278
|
-
switch (
|
4698
|
+
switch (_context48.prev = _context48.next) {
|
5279
4699
|
case 0:
|
5280
|
-
return
|
4700
|
+
return _context48.abrupt("return", this.getPatientDocumentsList({
|
5281
4701
|
category: MetadataCategory.Consultation,
|
5282
4702
|
documentType: DocumentType.TreatmentPlan,
|
5283
4703
|
treatmentPlanId: treatmentPlanId
|
@@ -5285,13 +4705,13 @@ var OroClient = /*#__PURE__*/function () {
|
|
5285
4705
|
|
5286
4706
|
case 1:
|
5287
4707
|
case "end":
|
5288
|
-
return
|
4708
|
+
return _context48.stop();
|
5289
4709
|
}
|
5290
4710
|
}
|
5291
|
-
},
|
4711
|
+
}, _callee47, this);
|
5292
4712
|
}));
|
5293
4713
|
|
5294
|
-
function getPatientTreatmentPlanByUuid(
|
4714
|
+
function getPatientTreatmentPlanByUuid(_x106, _x107) {
|
5295
4715
|
return _getPatientTreatmentPlanByUuid.apply(this, arguments);
|
5296
4716
|
}
|
5297
4717
|
|
@@ -5311,62 +4731,62 @@ var OroClient = /*#__PURE__*/function () {
|
|
5311
4731
|
_proto.getPatientDocumentsList =
|
5312
4732
|
/*#__PURE__*/
|
5313
4733
|
function () {
|
5314
|
-
var _getPatientDocumentsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5315
|
-
var
|
4734
|
+
var _getPatientDocumentsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee49(filters, expandPrivateMetadata, consultationId) {
|
4735
|
+
var _this7 = this;
|
5316
4736
|
|
5317
|
-
return
|
4737
|
+
return _regeneratorRuntime().wrap(function _callee49$(_context50) {
|
5318
4738
|
while (1) {
|
5319
|
-
switch (
|
4739
|
+
switch (_context50.prev = _context50.next) {
|
5320
4740
|
case 0:
|
5321
|
-
|
5322
|
-
|
4741
|
+
_context50.t0 = Promise;
|
4742
|
+
_context50.next = 3;
|
5323
4743
|
return this.getGrants({
|
5324
4744
|
consultationId: consultationId
|
5325
4745
|
});
|
5326
4746
|
|
5327
4747
|
case 3:
|
5328
|
-
|
5329
|
-
return
|
4748
|
+
_context50.t1 = _context50.sent.map(function (grant) {
|
4749
|
+
return _this7.getLockboxManifest(grant.lockboxUuid, _extends({}, filters, {
|
5330
4750
|
consultationId: consultationId
|
5331
4751
|
}), expandPrivateMetadata, grant.lockboxOwnerUuid, true).then(function (manifest) {
|
5332
4752
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
5333
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/
|
5334
|
-
return
|
4753
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee48(entry) {
|
4754
|
+
return _regeneratorRuntime().wrap(function _callee48$(_context49) {
|
5335
4755
|
while (1) {
|
5336
|
-
switch (
|
4756
|
+
switch (_context49.prev = _context49.next) {
|
5337
4757
|
case 0:
|
5338
|
-
return
|
4758
|
+
return _context49.abrupt("return", _extends({
|
5339
4759
|
lockboxOwnerUuid: grant.lockboxOwnerUuid,
|
5340
4760
|
lockboxUuid: grant.lockboxUuid
|
5341
4761
|
}, entry));
|
5342
4762
|
|
5343
4763
|
case 1:
|
5344
4764
|
case "end":
|
5345
|
-
return
|
4765
|
+
return _context49.stop();
|
5346
4766
|
}
|
5347
4767
|
}
|
5348
|
-
},
|
4768
|
+
}, _callee48);
|
5349
4769
|
}));
|
5350
4770
|
|
5351
|
-
return function (
|
4771
|
+
return function (_x111) {
|
5352
4772
|
return _ref7.apply(this, arguments);
|
5353
4773
|
};
|
5354
4774
|
}()));
|
5355
4775
|
});
|
5356
4776
|
}).flat();
|
5357
|
-
return
|
4777
|
+
return _context50.abrupt("return", _context50.t0.all.call(_context50.t0, _context50.t1).then(function (data) {
|
5358
4778
|
return data.flat();
|
5359
4779
|
}));
|
5360
4780
|
|
5361
4781
|
case 5:
|
5362
4782
|
case "end":
|
5363
|
-
return
|
4783
|
+
return _context50.stop();
|
5364
4784
|
}
|
5365
4785
|
}
|
5366
|
-
},
|
4786
|
+
}, _callee49, this);
|
5367
4787
|
}));
|
5368
4788
|
|
5369
|
-
function getPatientDocumentsList(
|
4789
|
+
function getPatientDocumentsList(_x108, _x109, _x110) {
|
5370
4790
|
return _getPatientDocumentsList.apply(this, arguments);
|
5371
4791
|
}
|
5372
4792
|
|
@@ -5389,17 +4809,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
5389
4809
|
_proto.recoverPrivateKeyFromSecurityQuestions =
|
5390
4810
|
/*#__PURE__*/
|
5391
4811
|
function () {
|
5392
|
-
var _recoverPrivateKeyFromSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4812
|
+
var _recoverPrivateKeyFromSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee50(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
|
5393
4813
|
var shards, answeredShards, privateKey;
|
5394
|
-
return
|
4814
|
+
return _regeneratorRuntime().wrap(function _callee50$(_context51) {
|
5395
4815
|
while (1) {
|
5396
|
-
switch (
|
4816
|
+
switch (_context51.prev = _context51.next) {
|
5397
4817
|
case 0:
|
5398
|
-
|
4818
|
+
_context51.next = 2;
|
5399
4819
|
return this.guardClient.identityGet(id);
|
5400
4820
|
|
5401
4821
|
case 2:
|
5402
|
-
shards =
|
4822
|
+
shards = _context51.sent.recoverySecurityQuestions;
|
5403
4823
|
answeredShards = shards.filter(function (shard) {
|
5404
4824
|
// filters all answered security questions
|
5405
4825
|
var indexOfQuestion = recoverySecurityQuestions.indexOf(shard.securityQuestion);
|
@@ -5422,13 +4842,13 @@ var OroClient = /*#__PURE__*/function () {
|
|
5422
4842
|
|
5423
4843
|
case 5:
|
5424
4844
|
case "end":
|
5425
|
-
return
|
4845
|
+
return _context51.stop();
|
5426
4846
|
}
|
5427
4847
|
}
|
5428
|
-
},
|
4848
|
+
}, _callee50, this);
|
5429
4849
|
}));
|
5430
4850
|
|
5431
|
-
function recoverPrivateKeyFromSecurityQuestions(
|
4851
|
+
function recoverPrivateKeyFromSecurityQuestions(_x112, _x113, _x114, _x115) {
|
5432
4852
|
return _recoverPrivateKeyFromSecurityQuestions.apply(this, arguments);
|
5433
4853
|
}
|
5434
4854
|
|
@@ -5445,17 +4865,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
5445
4865
|
_proto.recoverPrivateKeyFromPassword =
|
5446
4866
|
/*#__PURE__*/
|
5447
4867
|
function () {
|
5448
|
-
var _recoverPrivateKeyFromPassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4868
|
+
var _recoverPrivateKeyFromPassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee51(id, password) {
|
5449
4869
|
var identity, recoveryPayload, symmetricDecryptor, privateKey, symetricEncryptor;
|
5450
|
-
return
|
4870
|
+
return _regeneratorRuntime().wrap(function _callee51$(_context52) {
|
5451
4871
|
while (1) {
|
5452
|
-
switch (
|
4872
|
+
switch (_context52.prev = _context52.next) {
|
5453
4873
|
case 0:
|
5454
|
-
|
4874
|
+
_context52.next = 2;
|
5455
4875
|
return this.guardClient.identityGet(id);
|
5456
4876
|
|
5457
4877
|
case 2:
|
5458
|
-
identity =
|
4878
|
+
identity = _context52.sent;
|
5459
4879
|
recoveryPayload = identity.recoveryPassword;
|
5460
4880
|
symmetricDecryptor = this.toolbox.CryptoChaCha.fromPassphrase(password);
|
5461
4881
|
privateKey = symmetricDecryptor.base64PayloadDecryptToBytes(recoveryPayload);
|
@@ -5470,13 +4890,13 @@ var OroClient = /*#__PURE__*/function () {
|
|
5470
4890
|
|
5471
4891
|
case 8:
|
5472
4892
|
case "end":
|
5473
|
-
return
|
4893
|
+
return _context52.stop();
|
5474
4894
|
}
|
5475
4895
|
}
|
5476
|
-
},
|
4896
|
+
}, _callee51, this);
|
5477
4897
|
}));
|
5478
4898
|
|
5479
|
-
function recoverPrivateKeyFromPassword(
|
4899
|
+
function recoverPrivateKeyFromPassword(_x116, _x117) {
|
5480
4900
|
return _recoverPrivateKeyFromPassword.apply(this, arguments);
|
5481
4901
|
}
|
5482
4902
|
|
@@ -5493,30 +4913,30 @@ var OroClient = /*#__PURE__*/function () {
|
|
5493
4913
|
_proto.recoverPrivateKeyFromMasterKey =
|
5494
4914
|
/*#__PURE__*/
|
5495
4915
|
function () {
|
5496
|
-
var _recoverPrivateKeyFromMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4916
|
+
var _recoverPrivateKeyFromMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee52(id, masterKey) {
|
5497
4917
|
var recoveryPayload, symmetricDecryptor, privateKey;
|
5498
|
-
return
|
4918
|
+
return _regeneratorRuntime().wrap(function _callee52$(_context53) {
|
5499
4919
|
while (1) {
|
5500
|
-
switch (
|
4920
|
+
switch (_context53.prev = _context53.next) {
|
5501
4921
|
case 0:
|
5502
|
-
|
4922
|
+
_context53.next = 2;
|
5503
4923
|
return this.guardClient.identityGet(id);
|
5504
4924
|
|
5505
4925
|
case 2:
|
5506
|
-
recoveryPayload =
|
4926
|
+
recoveryPayload = _context53.sent.recoveryMasterKey;
|
5507
4927
|
symmetricDecryptor = this.toolbox.CryptoChaCha.fromPassphrase(masterKey);
|
5508
4928
|
privateKey = symmetricDecryptor.base64PayloadDecryptToBytes(recoveryPayload);
|
5509
4929
|
this.rsa = this.toolbox.CryptoRSA.fromKey(privateKey);
|
5510
4930
|
|
5511
4931
|
case 6:
|
5512
4932
|
case "end":
|
5513
|
-
return
|
4933
|
+
return _context53.stop();
|
5514
4934
|
}
|
5515
4935
|
}
|
5516
|
-
},
|
4936
|
+
}, _callee52, this);
|
5517
4937
|
}));
|
5518
4938
|
|
5519
|
-
function recoverPrivateKeyFromMasterKey(
|
4939
|
+
function recoverPrivateKeyFromMasterKey(_x118, _x119) {
|
5520
4940
|
return _recoverPrivateKeyFromMasterKey.apply(this, arguments);
|
5521
4941
|
}
|
5522
4942
|
|
@@ -5535,14 +4955,14 @@ var OroClient = /*#__PURE__*/function () {
|
|
5535
4955
|
_proto.updateSecurityQuestions =
|
5536
4956
|
/*#__PURE__*/
|
5537
4957
|
function () {
|
5538
|
-
var _updateSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4958
|
+
var _updateSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee53(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
|
5539
4959
|
var securityQuestionPayload, updateRequest;
|
5540
|
-
return
|
4960
|
+
return _regeneratorRuntime().wrap(function _callee53$(_context54) {
|
5541
4961
|
while (1) {
|
5542
|
-
switch (
|
4962
|
+
switch (_context54.prev = _context54.next) {
|
5543
4963
|
case 0:
|
5544
4964
|
if (this.rsa) {
|
5545
|
-
|
4965
|
+
_context54.next = 2;
|
5546
4966
|
break;
|
5547
4967
|
}
|
5548
4968
|
|
@@ -5553,21 +4973,21 @@ var OroClient = /*#__PURE__*/function () {
|
|
5553
4973
|
updateRequest = {
|
5554
4974
|
recoverySecurityQuestions: securityQuestionPayload
|
5555
4975
|
};
|
5556
|
-
|
4976
|
+
_context54.next = 6;
|
5557
4977
|
return this.guardClient.identityUpdate(id, updateRequest);
|
5558
4978
|
|
5559
4979
|
case 6:
|
5560
|
-
return
|
4980
|
+
return _context54.abrupt("return", _context54.sent);
|
5561
4981
|
|
5562
4982
|
case 7:
|
5563
4983
|
case "end":
|
5564
|
-
return
|
4984
|
+
return _context54.stop();
|
5565
4985
|
}
|
5566
4986
|
}
|
5567
|
-
},
|
4987
|
+
}, _callee53, this);
|
5568
4988
|
}));
|
5569
4989
|
|
5570
|
-
function updateSecurityQuestions(
|
4990
|
+
function updateSecurityQuestions(_x120, _x121, _x122, _x123) {
|
5571
4991
|
return _updateSecurityQuestions.apply(this, arguments);
|
5572
4992
|
}
|
5573
4993
|
|
@@ -5589,14 +5009,14 @@ var OroClient = /*#__PURE__*/function () {
|
|
5589
5009
|
_proto.updatePassword =
|
5590
5010
|
/*#__PURE__*/
|
5591
5011
|
function () {
|
5592
|
-
var _updatePassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5012
|
+
var _updatePassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee54(id, newPassword, oldPassword) {
|
5593
5013
|
var symmetricEncryptor, passwordPayload, updateRequest;
|
5594
|
-
return
|
5014
|
+
return _regeneratorRuntime().wrap(function _callee54$(_context55) {
|
5595
5015
|
while (1) {
|
5596
|
-
switch (
|
5016
|
+
switch (_context55.prev = _context55.next) {
|
5597
5017
|
case 0:
|
5598
5018
|
if (this.rsa) {
|
5599
|
-
|
5019
|
+
_context55.next = 2;
|
5600
5020
|
break;
|
5601
5021
|
}
|
5602
5022
|
|
@@ -5618,21 +5038,21 @@ var OroClient = /*#__PURE__*/function () {
|
|
5618
5038
|
},
|
5619
5039
|
recoveryPassword: passwordPayload
|
5620
5040
|
};
|
5621
|
-
|
5041
|
+
_context55.next = 9;
|
5622
5042
|
return this.guardClient.identityUpdate(id, updateRequest);
|
5623
5043
|
|
5624
5044
|
case 9:
|
5625
|
-
return
|
5045
|
+
return _context55.abrupt("return", _context55.sent);
|
5626
5046
|
|
5627
5047
|
case 10:
|
5628
5048
|
case "end":
|
5629
|
-
return
|
5049
|
+
return _context55.stop();
|
5630
5050
|
}
|
5631
5051
|
}
|
5632
|
-
},
|
5052
|
+
}, _callee54, this);
|
5633
5053
|
}));
|
5634
5054
|
|
5635
|
-
function updatePassword(
|
5055
|
+
function updatePassword(_x124, _x125, _x126) {
|
5636
5056
|
return _updatePassword.apply(this, arguments);
|
5637
5057
|
}
|
5638
5058
|
|
@@ -5651,14 +5071,14 @@ var OroClient = /*#__PURE__*/function () {
|
|
5651
5071
|
_proto.updateMasterKey =
|
5652
5072
|
/*#__PURE__*/
|
5653
5073
|
function () {
|
5654
|
-
var _updateMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5074
|
+
var _updateMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee55(id, masterKey, lockboxUuid) {
|
5655
5075
|
var symmetricEncryptor, masterKeyPayload, updateRequest, updatedIdentity;
|
5656
|
-
return
|
5076
|
+
return _regeneratorRuntime().wrap(function _callee55$(_context56) {
|
5657
5077
|
while (1) {
|
5658
|
-
switch (
|
5078
|
+
switch (_context56.prev = _context56.next) {
|
5659
5079
|
case 0:
|
5660
5080
|
if (this.rsa) {
|
5661
|
-
|
5081
|
+
_context56.next = 2;
|
5662
5082
|
break;
|
5663
5083
|
}
|
5664
5084
|
|
@@ -5670,12 +5090,12 @@ var OroClient = /*#__PURE__*/function () {
|
|
5670
5090
|
updateRequest = {
|
5671
5091
|
recoveryMasterKey: masterKeyPayload
|
5672
5092
|
};
|
5673
|
-
|
5093
|
+
_context56.next = 7;
|
5674
5094
|
return this.guardClient.identityUpdate(id, updateRequest);
|
5675
5095
|
|
5676
5096
|
case 7:
|
5677
|
-
updatedIdentity =
|
5678
|
-
|
5097
|
+
updatedIdentity = _context56.sent;
|
5098
|
+
_context56.next = 10;
|
5679
5099
|
return this.getOrInsertJsonData(lockboxUuid, {
|
5680
5100
|
masterKey: masterKey
|
5681
5101
|
}, {
|
@@ -5684,17 +5104,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
5684
5104
|
}, {}, true);
|
5685
5105
|
|
5686
5106
|
case 10:
|
5687
|
-
return
|
5107
|
+
return _context56.abrupt("return", updatedIdentity);
|
5688
5108
|
|
5689
5109
|
case 11:
|
5690
5110
|
case "end":
|
5691
|
-
return
|
5111
|
+
return _context56.stop();
|
5692
5112
|
}
|
5693
5113
|
}
|
5694
|
-
},
|
5114
|
+
}, _callee55, this);
|
5695
5115
|
}));
|
5696
5116
|
|
5697
|
-
function updateMasterKey(
|
5117
|
+
function updateMasterKey(_x127, _x128, _x129) {
|
5698
5118
|
return _updateMasterKey.apply(this, arguments);
|
5699
5119
|
}
|
5700
5120
|
|
@@ -5795,5 +5215,5 @@ var init = function init(toolbox, tellerBaseURL, vaultBaseURL, guardBaseURL, sea
|
|
5795
5215
|
};
|
5796
5216
|
|
5797
5217
|
export default init;
|
5798
|
-
export { AssociatedLockboxNotFound, CliniaService, IncompleteAuthentication, MissingGrant, MissingLockbox, MissingLockboxOwner, OroClient, WorkflowAnswersMissingError, buildConsultSearchIndex, decryptConsultLockboxGrants, decryptGrants, extractAndStorePersonalWorkflowData, extractISOLocalityForConsult, extractPersonalInfoFromWorkflowData, fillWorkflowFromPopulatedWorkflow, filterTriggeredAnsweredWithKind, flattenSelectedAnswers, getImagesFromIndexDb, getInitialisedSelectedAnswers, getWorkflowDataByCategory, identificationToPersonalInformations, isTriggered, registerPatient, sessionStorePrivateKeyName, toActualObject, updatePersonalIntoPopulatedWorkflowData, wasmPath };
|
5218
|
+
export { AssociatedLockboxNotFound, CliniaService, IncompleteAuthentication, MissingGrant, MissingGrantFilter, MissingLockbox, MissingLockboxOwner, OroClient, WorkflowAnswersMissingError, buildConsultSearchIndex, decryptConsultLockboxGrants, decryptGrants, extractAndStorePersonalWorkflowData, extractISOLocalityForConsult, extractPersonalInfoFromWorkflowData, fillWorkflowFromPopulatedWorkflow, filterTriggeredAnsweredWithKind, flattenSelectedAnswers, getImagesFromIndexDb, getInitialisedSelectedAnswers, getWorkflowDataByCategory, identificationToPersonalInformations, isTriggered, registerPatient, sessionStorePrivateKeyName, toActualObject, updatePersonalIntoPopulatedWorkflowData, wasmPath };
|
5799
5219
|
//# sourceMappingURL=oro-sdk.esm.js.map
|