oro-sdk 5.0.2 → 5.2.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 +11 -7
- package/dist/oro-sdk.cjs.development.js +1134 -672
- 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 +1134 -672
- package/dist/oro-sdk.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/client.ts +57 -34
- package/src/helpers/patient-registration.ts +72 -52
@@ -9,614 +9,1029 @@ var initApis__default = _interopDefault(initApis);
|
|
9
9
|
var oroToolbox = require('oro-toolbox');
|
10
10
|
var idbKeyval = require('idb-keyval');
|
11
11
|
|
12
|
-
function
|
13
|
-
|
12
|
+
function _wrapRegExp() {
|
13
|
+
_wrapRegExp = function (re, groups) {
|
14
|
+
return new BabelRegExp(re, void 0, groups);
|
15
|
+
};
|
16
|
+
|
17
|
+
var _super = RegExp.prototype,
|
18
|
+
_groups = new WeakMap();
|
19
|
+
|
20
|
+
function BabelRegExp(re, flags, groups) {
|
21
|
+
var _this = new RegExp(re, flags);
|
22
|
+
|
23
|
+
return _groups.set(_this, groups || _groups.get(re)), _setPrototypeOf(_this, BabelRegExp.prototype);
|
24
|
+
}
|
25
|
+
|
26
|
+
function buildGroups(result, re) {
|
27
|
+
var g = _groups.get(re);
|
28
|
+
|
29
|
+
return Object.keys(g).reduce(function (groups, name) {
|
30
|
+
return groups[name] = result[g[name]], groups;
|
31
|
+
}, Object.create(null));
|
32
|
+
}
|
33
|
+
|
34
|
+
return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) {
|
35
|
+
var result = _super.exec.call(this, str);
|
36
|
+
|
37
|
+
return result && (result.groups = buildGroups(result, this)), result;
|
38
|
+
}, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {
|
39
|
+
if ("string" == typeof substitution) {
|
40
|
+
var groups = _groups.get(this);
|
41
|
+
|
42
|
+
return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) {
|
43
|
+
return "$" + groups[name];
|
44
|
+
}));
|
45
|
+
}
|
46
|
+
|
47
|
+
if ("function" == typeof substitution) {
|
48
|
+
var _this = this;
|
49
|
+
|
50
|
+
return _super[Symbol.replace].call(this, str, function () {
|
51
|
+
var args = arguments;
|
52
|
+
return "object" != typeof args[args.length - 1] && (args = [].slice.call(args)).push(buildGroups(args, _this)), substitution.apply(this, args);
|
53
|
+
});
|
54
|
+
}
|
55
|
+
|
56
|
+
return _super[Symbol.replace].call(this, str, substitution);
|
57
|
+
}, _wrapRegExp.apply(this, arguments);
|
58
|
+
}
|
59
|
+
|
60
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
61
|
+
try {
|
62
|
+
var info = gen[key](arg);
|
63
|
+
var value = info.value;
|
64
|
+
} catch (error) {
|
65
|
+
reject(error);
|
66
|
+
return;
|
67
|
+
}
|
68
|
+
|
69
|
+
if (info.done) {
|
70
|
+
resolve(value);
|
71
|
+
} else {
|
72
|
+
Promise.resolve(value).then(_next, _throw);
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
function _asyncToGenerator(fn) {
|
77
|
+
return function () {
|
78
|
+
var self = this,
|
79
|
+
args = arguments;
|
80
|
+
return new Promise(function (resolve, reject) {
|
81
|
+
var gen = fn.apply(self, args);
|
82
|
+
|
83
|
+
function _next(value) {
|
84
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
85
|
+
}
|
86
|
+
|
87
|
+
function _throw(err) {
|
88
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
89
|
+
}
|
90
|
+
|
91
|
+
_next(undefined);
|
92
|
+
});
|
93
|
+
};
|
94
|
+
}
|
95
|
+
|
96
|
+
function _extends() {
|
97
|
+
_extends = Object.assign || function (target) {
|
98
|
+
for (var i = 1; i < arguments.length; i++) {
|
99
|
+
var source = arguments[i];
|
100
|
+
|
101
|
+
for (var key in source) {
|
102
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
103
|
+
target[key] = source[key];
|
104
|
+
}
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
return target;
|
109
|
+
};
|
110
|
+
|
111
|
+
return _extends.apply(this, arguments);
|
112
|
+
}
|
113
|
+
|
114
|
+
function _inherits(subClass, superClass) {
|
115
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
116
|
+
throw new TypeError("Super expression must either be null or a function");
|
117
|
+
}
|
118
|
+
|
119
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
120
|
+
constructor: {
|
121
|
+
value: subClass,
|
122
|
+
writable: true,
|
123
|
+
configurable: true
|
124
|
+
}
|
125
|
+
});
|
126
|
+
Object.defineProperty(subClass, "prototype", {
|
127
|
+
writable: false
|
128
|
+
});
|
129
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
130
|
+
}
|
131
|
+
|
132
|
+
function _inheritsLoose(subClass, superClass) {
|
133
|
+
subClass.prototype = Object.create(superClass.prototype);
|
134
|
+
subClass.prototype.constructor = subClass;
|
135
|
+
|
136
|
+
_setPrototypeOf(subClass, superClass);
|
137
|
+
}
|
138
|
+
|
139
|
+
function _getPrototypeOf(o) {
|
140
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
141
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
142
|
+
};
|
143
|
+
return _getPrototypeOf(o);
|
144
|
+
}
|
14
145
|
|
15
|
-
|
16
|
-
|
146
|
+
function _setPrototypeOf(o, p) {
|
147
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
148
|
+
o.__proto__ = p;
|
149
|
+
return o;
|
17
150
|
};
|
18
151
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
152
|
+
return _setPrototypeOf(o, p);
|
153
|
+
}
|
154
|
+
|
155
|
+
function _isNativeReflectConstruct() {
|
156
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
157
|
+
if (Reflect.construct.sham) return false;
|
158
|
+
if (typeof Proxy === "function") return true;
|
159
|
+
|
160
|
+
try {
|
161
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
162
|
+
return true;
|
163
|
+
} catch (e) {
|
164
|
+
return false;
|
165
|
+
}
|
166
|
+
}
|
167
|
+
|
168
|
+
function _construct(Parent, args, Class) {
|
169
|
+
if (_isNativeReflectConstruct()) {
|
170
|
+
_construct = Reflect.construct;
|
171
|
+
} else {
|
172
|
+
_construct = function _construct(Parent, args, Class) {
|
173
|
+
var a = [null];
|
174
|
+
a.push.apply(a, args);
|
175
|
+
var Constructor = Function.bind.apply(Parent, a);
|
176
|
+
var instance = new Constructor();
|
177
|
+
if (Class) _setPrototypeOf(instance, Class.prototype);
|
178
|
+
return instance;
|
179
|
+
};
|
180
|
+
}
|
181
|
+
|
182
|
+
return _construct.apply(null, arguments);
|
183
|
+
}
|
184
|
+
|
185
|
+
function _isNativeFunction(fn) {
|
186
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
187
|
+
}
|
188
|
+
|
189
|
+
function _wrapNativeSuper(Class) {
|
190
|
+
var _cache = typeof Map === "function" ? new Map() : undefined;
|
191
|
+
|
192
|
+
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
193
|
+
if (Class === null || !_isNativeFunction(Class)) return Class;
|
194
|
+
|
195
|
+
if (typeof Class !== "function") {
|
196
|
+
throw new TypeError("Super expression must either be null or a function");
|
197
|
+
}
|
198
|
+
|
199
|
+
if (typeof _cache !== "undefined") {
|
200
|
+
if (_cache.has(Class)) return _cache.get(Class);
|
201
|
+
|
202
|
+
_cache.set(Class, Wrapper);
|
203
|
+
}
|
204
|
+
|
205
|
+
function Wrapper() {
|
206
|
+
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
|
207
|
+
}
|
208
|
+
|
209
|
+
Wrapper.prototype = Object.create(Class.prototype, {
|
210
|
+
constructor: {
|
211
|
+
value: Wrapper,
|
212
|
+
enumerable: false,
|
213
|
+
writable: true,
|
214
|
+
configurable: true
|
215
|
+
}
|
216
|
+
});
|
217
|
+
return _setPrototypeOf(Wrapper, Class);
|
218
|
+
};
|
219
|
+
|
220
|
+
return _wrapNativeSuper(Class);
|
221
|
+
}
|
222
|
+
|
223
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
224
|
+
if (source == null) return {};
|
225
|
+
var target = {};
|
226
|
+
var sourceKeys = Object.keys(source);
|
227
|
+
var key, i;
|
228
|
+
|
229
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
230
|
+
key = sourceKeys[i];
|
231
|
+
if (excluded.indexOf(key) >= 0) continue;
|
232
|
+
target[key] = source[key];
|
233
|
+
}
|
234
|
+
|
235
|
+
return target;
|
236
|
+
}
|
237
|
+
|
238
|
+
function _unsupportedIterableToArray(o, minLen) {
|
239
|
+
if (!o) return;
|
240
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
241
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
242
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
243
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
244
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
245
|
+
}
|
246
|
+
|
247
|
+
function _arrayLikeToArray(arr, len) {
|
248
|
+
if (len == null || len > arr.length) len = arr.length;
|
249
|
+
|
250
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
251
|
+
|
252
|
+
return arr2;
|
253
|
+
}
|
254
|
+
|
255
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
256
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
257
|
+
if (it) return (it = it.call(o)).next.bind(it);
|
258
|
+
|
259
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
260
|
+
if (it) o = it;
|
261
|
+
var i = 0;
|
262
|
+
return function () {
|
263
|
+
if (i >= o.length) return {
|
264
|
+
done: true
|
265
|
+
};
|
266
|
+
return {
|
267
|
+
done: false,
|
268
|
+
value: o[i++]
|
269
|
+
};
|
270
|
+
};
|
271
|
+
}
|
272
|
+
|
273
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
274
|
+
}
|
275
|
+
|
276
|
+
function createCommonjsModule(fn, module) {
|
277
|
+
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
278
|
+
}
|
279
|
+
|
280
|
+
var runtime_1 = createCommonjsModule(function (module) {
|
281
|
+
/**
|
282
|
+
* Copyright (c) 2014-present, Facebook, Inc.
|
283
|
+
*
|
284
|
+
* This source code is licensed under the MIT license found in the
|
285
|
+
* LICENSE file in the root directory of this source tree.
|
286
|
+
*/
|
287
|
+
|
288
|
+
var runtime = (function (exports) {
|
289
|
+
|
290
|
+
var Op = Object.prototype;
|
291
|
+
var hasOwn = Op.hasOwnProperty;
|
292
|
+
var undefined$1; // More compressible than void 0.
|
293
|
+
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
294
|
+
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
295
|
+
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
296
|
+
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
26
297
|
|
27
298
|
function define(obj, key, value) {
|
28
|
-
|
299
|
+
Object.defineProperty(obj, key, {
|
29
300
|
value: value,
|
30
|
-
enumerable:
|
31
|
-
configurable:
|
32
|
-
writable:
|
33
|
-
})
|
301
|
+
enumerable: true,
|
302
|
+
configurable: true,
|
303
|
+
writable: true
|
304
|
+
});
|
305
|
+
return obj[key];
|
34
306
|
}
|
35
|
-
|
36
307
|
try {
|
308
|
+
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
37
309
|
define({}, "");
|
38
310
|
} catch (err) {
|
39
|
-
define = function
|
311
|
+
define = function(obj, key, value) {
|
40
312
|
return obj[key] = value;
|
41
313
|
};
|
42
314
|
}
|
43
315
|
|
44
316
|
function wrap(innerFn, outerFn, self, tryLocsList) {
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
var state = "suspendedStart";
|
50
|
-
return function (method, arg) {
|
51
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
52
|
-
|
53
|
-
if ("completed" === state) {
|
54
|
-
if ("throw" === method) throw arg;
|
55
|
-
return doneResult();
|
56
|
-
}
|
57
|
-
|
58
|
-
for (context.method = method, context.arg = arg;;) {
|
59
|
-
var delegate = context.delegate;
|
317
|
+
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
318
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
319
|
+
var generator = Object.create(protoGenerator.prototype);
|
320
|
+
var context = new Context(tryLocsList || []);
|
60
321
|
|
61
|
-
|
62
|
-
|
322
|
+
// The ._invoke method unifies the implementations of the .next,
|
323
|
+
// .throw, and .return methods.
|
324
|
+
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
63
325
|
|
64
|
-
|
65
|
-
if (delegateResult === ContinueSentinel) continue;
|
66
|
-
return delegateResult;
|
67
|
-
}
|
68
|
-
}
|
69
|
-
|
70
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
71
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
72
|
-
context.dispatchException(context.arg);
|
73
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
74
|
-
state = "executing";
|
75
|
-
var record = tryCatch(innerFn, self, context);
|
76
|
-
|
77
|
-
if ("normal" === record.type) {
|
78
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
79
|
-
return {
|
80
|
-
value: record.arg,
|
81
|
-
done: context.done
|
82
|
-
};
|
83
|
-
}
|
84
|
-
|
85
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
86
|
-
}
|
87
|
-
};
|
88
|
-
}(innerFn, self, context), generator;
|
326
|
+
return generator;
|
89
327
|
}
|
328
|
+
exports.wrap = wrap;
|
90
329
|
|
330
|
+
// Try/catch helper to minimize deoptimizations. Returns a completion
|
331
|
+
// record like context.tryEntries[i].completion. This interface could
|
332
|
+
// have been (and was previously) designed to take a closure to be
|
333
|
+
// invoked without arguments, but in all the cases we care about we
|
334
|
+
// already have an existing method we want to call, so there's no need
|
335
|
+
// to create a new function object. We can even get away with assuming
|
336
|
+
// the method takes exactly one argument, since that happens to be true
|
337
|
+
// in every case, so we don't have to touch the arguments object. The
|
338
|
+
// only additional allocation required is the completion record, which
|
339
|
+
// has a stable shape and so hopefully should be cheap to allocate.
|
91
340
|
function tryCatch(fn, obj, arg) {
|
92
341
|
try {
|
93
|
-
return {
|
94
|
-
type: "normal",
|
95
|
-
arg: fn.call(obj, arg)
|
96
|
-
};
|
342
|
+
return { type: "normal", arg: fn.call(obj, arg) };
|
97
343
|
} catch (err) {
|
98
|
-
return {
|
99
|
-
type: "throw",
|
100
|
-
arg: err
|
101
|
-
};
|
344
|
+
return { type: "throw", arg: err };
|
102
345
|
}
|
103
346
|
}
|
104
347
|
|
105
|
-
|
348
|
+
var GenStateSuspendedStart = "suspendedStart";
|
349
|
+
var GenStateSuspendedYield = "suspendedYield";
|
350
|
+
var GenStateExecuting = "executing";
|
351
|
+
var GenStateCompleted = "completed";
|
352
|
+
|
353
|
+
// Returning this object from the innerFn has the same effect as
|
354
|
+
// breaking out of the dispatch switch statement.
|
106
355
|
var ContinueSentinel = {};
|
107
356
|
|
357
|
+
// Dummy constructor functions that we use as the .constructor and
|
358
|
+
// .constructor.prototype properties for functions that return Generator
|
359
|
+
// objects. For full spec compliance, you may wish to configure your
|
360
|
+
// minifier not to mangle the names of these two functions.
|
108
361
|
function Generator() {}
|
109
|
-
|
110
362
|
function GeneratorFunction() {}
|
111
|
-
|
112
363
|
function GeneratorFunctionPrototype() {}
|
113
364
|
|
365
|
+
// This is a polyfill for %IteratorPrototype% for environments that
|
366
|
+
// don't natively support it.
|
114
367
|
var IteratorPrototype = {};
|
115
368
|
define(IteratorPrototype, iteratorSymbol, function () {
|
116
369
|
return this;
|
117
370
|
});
|
118
|
-
var getProto = Object.getPrototypeOf,
|
119
|
-
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
120
|
-
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
121
|
-
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
122
371
|
|
372
|
+
var getProto = Object.getPrototypeOf;
|
373
|
+
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
374
|
+
if (NativeIteratorPrototype &&
|
375
|
+
NativeIteratorPrototype !== Op &&
|
376
|
+
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
377
|
+
// This environment has a native %IteratorPrototype%; use it instead
|
378
|
+
// of the polyfill.
|
379
|
+
IteratorPrototype = NativeIteratorPrototype;
|
380
|
+
}
|
381
|
+
|
382
|
+
var Gp = GeneratorFunctionPrototype.prototype =
|
383
|
+
Generator.prototype = Object.create(IteratorPrototype);
|
384
|
+
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
385
|
+
define(Gp, "constructor", GeneratorFunctionPrototype);
|
386
|
+
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
387
|
+
GeneratorFunction.displayName = define(
|
388
|
+
GeneratorFunctionPrototype,
|
389
|
+
toStringTagSymbol,
|
390
|
+
"GeneratorFunction"
|
391
|
+
);
|
392
|
+
|
393
|
+
// Helper for defining the .next, .throw, and .return methods of the
|
394
|
+
// Iterator interface in terms of a single ._invoke method.
|
123
395
|
function defineIteratorMethods(prototype) {
|
124
|
-
["next", "throw", "return"].forEach(function
|
125
|
-
define(prototype, method, function
|
396
|
+
["next", "throw", "return"].forEach(function(method) {
|
397
|
+
define(prototype, method, function(arg) {
|
126
398
|
return this._invoke(method, arg);
|
127
399
|
});
|
128
400
|
});
|
129
401
|
}
|
130
402
|
|
403
|
+
exports.isGeneratorFunction = function(genFun) {
|
404
|
+
var ctor = typeof genFun === "function" && genFun.constructor;
|
405
|
+
return ctor
|
406
|
+
? ctor === GeneratorFunction ||
|
407
|
+
// For the native GeneratorFunction constructor, the best we can
|
408
|
+
// do is to check its .name property.
|
409
|
+
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
410
|
+
: false;
|
411
|
+
};
|
412
|
+
|
413
|
+
exports.mark = function(genFun) {
|
414
|
+
if (Object.setPrototypeOf) {
|
415
|
+
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
416
|
+
} else {
|
417
|
+
genFun.__proto__ = GeneratorFunctionPrototype;
|
418
|
+
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
419
|
+
}
|
420
|
+
genFun.prototype = Object.create(Gp);
|
421
|
+
return genFun;
|
422
|
+
};
|
423
|
+
|
424
|
+
// Within the body of any async function, `await x` is transformed to
|
425
|
+
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
426
|
+
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
427
|
+
// meant to be awaited.
|
428
|
+
exports.awrap = function(arg) {
|
429
|
+
return { __await: arg };
|
430
|
+
};
|
431
|
+
|
131
432
|
function AsyncIterator(generator, PromiseImpl) {
|
132
433
|
function invoke(method, arg, resolve, reject) {
|
133
434
|
var record = tryCatch(generator[method], generator, arg);
|
435
|
+
if (record.type === "throw") {
|
436
|
+
reject(record.arg);
|
437
|
+
} else {
|
438
|
+
var result = record.arg;
|
439
|
+
var value = result.value;
|
440
|
+
if (value &&
|
441
|
+
typeof value === "object" &&
|
442
|
+
hasOwn.call(value, "__await")) {
|
443
|
+
return PromiseImpl.resolve(value.__await).then(function(value) {
|
444
|
+
invoke("next", value, resolve, reject);
|
445
|
+
}, function(err) {
|
446
|
+
invoke("throw", err, resolve, reject);
|
447
|
+
});
|
448
|
+
}
|
134
449
|
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
}, function (error) {
|
450
|
+
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
451
|
+
// When a yielded Promise is resolved, its final value becomes
|
452
|
+
// the .value of the Promise<{value,done}> result for the
|
453
|
+
// current iteration.
|
454
|
+
result.value = unwrapped;
|
455
|
+
resolve(result);
|
456
|
+
}, function(error) {
|
457
|
+
// If a rejected Promise was yielded, throw the rejection back
|
458
|
+
// into the async generator function so it can be handled there.
|
145
459
|
return invoke("throw", error, resolve, reject);
|
146
460
|
});
|
147
461
|
}
|
148
|
-
|
149
|
-
reject(record.arg);
|
150
462
|
}
|
151
463
|
|
152
464
|
var previousPromise;
|
153
465
|
|
154
|
-
|
466
|
+
function enqueue(method, arg) {
|
155
467
|
function callInvokeWithMethodAndArg() {
|
156
|
-
return new PromiseImpl(function
|
468
|
+
return new PromiseImpl(function(resolve, reject) {
|
157
469
|
invoke(method, arg, resolve, reject);
|
158
470
|
});
|
159
471
|
}
|
160
472
|
|
161
|
-
return previousPromise =
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
473
|
+
return previousPromise =
|
474
|
+
// If enqueue has been called before, then we want to wait until
|
475
|
+
// all previous Promises have been resolved before calling invoke,
|
476
|
+
// so that results are always delivered in the correct order. If
|
477
|
+
// enqueue has not been called before, then it is important to
|
478
|
+
// call invoke immediately, without waiting on a callback to fire,
|
479
|
+
// so that the async generator function has the opportunity to do
|
480
|
+
// any necessary setup in a predictable way. This predictability
|
481
|
+
// is why the Promise constructor synchronously invokes its
|
482
|
+
// executor callback, and why async functions synchronously
|
483
|
+
// execute code before the first await. Since we implement simple
|
484
|
+
// async functions in terms of async generators, it is especially
|
485
|
+
// important to get this right, even though it requires care.
|
486
|
+
previousPromise ? previousPromise.then(
|
487
|
+
callInvokeWithMethodAndArg,
|
488
|
+
// Avoid propagating failures to Promises returned by later
|
489
|
+
// invocations of the iterator.
|
490
|
+
callInvokeWithMethodAndArg
|
491
|
+
) : callInvokeWithMethodAndArg();
|
175
492
|
}
|
176
493
|
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
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);
|
181
|
-
}
|
182
|
-
|
183
|
-
function pushTryEntry(locs) {
|
184
|
-
var entry = {
|
185
|
-
tryLoc: locs[0]
|
186
|
-
};
|
187
|
-
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
188
|
-
}
|
189
|
-
|
190
|
-
function resetTryEntry(entry) {
|
191
|
-
var record = entry.completion || {};
|
192
|
-
record.type = "normal", delete record.arg, entry.completion = record;
|
494
|
+
// Define the unified helper method that is used to implement .next,
|
495
|
+
// .throw, and .return (see defineIteratorMethods).
|
496
|
+
this._invoke = enqueue;
|
193
497
|
}
|
194
498
|
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
499
|
+
defineIteratorMethods(AsyncIterator.prototype);
|
500
|
+
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
501
|
+
return this;
|
502
|
+
});
|
503
|
+
exports.AsyncIterator = AsyncIterator;
|
504
|
+
|
505
|
+
// Note that simple async functions are implemented on top of
|
506
|
+
// AsyncIterator objects; they just return a Promise for the value of
|
507
|
+
// the final result produced by the iterator.
|
508
|
+
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
509
|
+
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
510
|
+
|
511
|
+
var iter = new AsyncIterator(
|
512
|
+
wrap(innerFn, outerFn, self, tryLocsList),
|
513
|
+
PromiseImpl
|
514
|
+
);
|
515
|
+
|
516
|
+
return exports.isGeneratorFunction(outerFn)
|
517
|
+
? iter // If outerFn is a generator, return the full iterator.
|
518
|
+
: iter.next().then(function(result) {
|
519
|
+
return result.done ? result.value : iter.next();
|
520
|
+
});
|
521
|
+
};
|
200
522
|
|
201
|
-
function
|
202
|
-
|
203
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
204
|
-
if (iteratorMethod) return iteratorMethod.call(iterable);
|
205
|
-
if ("function" == typeof iterable.next) return iterable;
|
523
|
+
function makeInvokeMethod(innerFn, self, context) {
|
524
|
+
var state = GenStateSuspendedStart;
|
206
525
|
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
526
|
+
return function invoke(method, arg) {
|
527
|
+
if (state === GenStateExecuting) {
|
528
|
+
throw new Error("Generator is already running");
|
529
|
+
}
|
211
530
|
|
212
|
-
|
213
|
-
|
531
|
+
if (state === GenStateCompleted) {
|
532
|
+
if (method === "throw") {
|
533
|
+
throw arg;
|
534
|
+
}
|
214
535
|
|
215
|
-
|
536
|
+
// Be forgiving, per 25.3.3.3.3 of the spec:
|
537
|
+
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
538
|
+
return doneResult();
|
216
539
|
}
|
217
|
-
}
|
218
|
-
|
219
|
-
return {
|
220
|
-
next: doneResult
|
221
|
-
};
|
222
|
-
}
|
223
540
|
|
224
|
-
|
225
|
-
|
226
|
-
value: undefined,
|
227
|
-
done: !0
|
228
|
-
};
|
229
|
-
}
|
541
|
+
context.method = method;
|
542
|
+
context.arg = arg;
|
230
543
|
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
241
|
-
return this;
|
242
|
-
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
243
|
-
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
244
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
245
|
-
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
246
|
-
return result.done ? result.value : iter.next();
|
247
|
-
});
|
248
|
-
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
249
|
-
return this;
|
250
|
-
}), define(Gp, "toString", function () {
|
251
|
-
return "[object Generator]";
|
252
|
-
}), exports.keys = function (object) {
|
253
|
-
var keys = [];
|
544
|
+
while (true) {
|
545
|
+
var delegate = context.delegate;
|
546
|
+
if (delegate) {
|
547
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
548
|
+
if (delegateResult) {
|
549
|
+
if (delegateResult === ContinueSentinel) continue;
|
550
|
+
return delegateResult;
|
551
|
+
}
|
552
|
+
}
|
254
553
|
|
255
|
-
|
554
|
+
if (context.method === "next") {
|
555
|
+
// Setting context._sent for legacy support of Babel's
|
556
|
+
// function.sent implementation.
|
557
|
+
context.sent = context._sent = context.arg;
|
256
558
|
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
559
|
+
} else if (context.method === "throw") {
|
560
|
+
if (state === GenStateSuspendedStart) {
|
561
|
+
state = GenStateCompleted;
|
562
|
+
throw context.arg;
|
563
|
+
}
|
262
564
|
|
263
|
-
|
264
|
-
};
|
265
|
-
}, exports.values = values, Context.prototype = {
|
266
|
-
constructor: Context,
|
267
|
-
reset: function (skipTempReset) {
|
268
|
-
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);
|
269
|
-
},
|
270
|
-
stop: function () {
|
271
|
-
this.done = !0;
|
272
|
-
var rootRecord = this.tryEntries[0].completion;
|
273
|
-
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
274
|
-
return this.rval;
|
275
|
-
},
|
276
|
-
dispatchException: function (exception) {
|
277
|
-
if (this.done) throw exception;
|
278
|
-
var context = this;
|
565
|
+
context.dispatchException(context.arg);
|
279
566
|
|
280
|
-
|
281
|
-
|
282
|
-
|
567
|
+
} else if (context.method === "return") {
|
568
|
+
context.abrupt("return", context.arg);
|
569
|
+
}
|
283
570
|
|
284
|
-
|
285
|
-
var entry = this.tryEntries[i],
|
286
|
-
record = entry.completion;
|
287
|
-
if ("root" === entry.tryLoc) return handle("end");
|
571
|
+
state = GenStateExecuting;
|
288
572
|
|
289
|
-
|
290
|
-
|
291
|
-
|
573
|
+
var record = tryCatch(innerFn, self, context);
|
574
|
+
if (record.type === "normal") {
|
575
|
+
// If an exception is thrown from innerFn, we leave state ===
|
576
|
+
// GenStateExecuting and loop back for another invocation.
|
577
|
+
state = context.done
|
578
|
+
? GenStateCompleted
|
579
|
+
: GenStateSuspendedYield;
|
292
580
|
|
293
|
-
if (
|
294
|
-
|
295
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
296
|
-
} else if (hasCatch) {
|
297
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
298
|
-
} else {
|
299
|
-
if (!hasFinally) throw new Error("try statement without catch or finally");
|
300
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
581
|
+
if (record.arg === ContinueSentinel) {
|
582
|
+
continue;
|
301
583
|
}
|
302
|
-
}
|
303
|
-
}
|
304
|
-
},
|
305
|
-
abrupt: function (type, arg) {
|
306
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
307
|
-
var entry = this.tryEntries[i];
|
308
584
|
|
309
|
-
|
310
|
-
|
311
|
-
|
585
|
+
return {
|
586
|
+
value: record.arg,
|
587
|
+
done: context.done
|
588
|
+
};
|
589
|
+
|
590
|
+
} else if (record.type === "throw") {
|
591
|
+
state = GenStateCompleted;
|
592
|
+
// Dispatch the exception by looping back around to the
|
593
|
+
// context.dispatchException(context.arg) call above.
|
594
|
+
context.method = "throw";
|
595
|
+
context.arg = record.arg;
|
312
596
|
}
|
313
597
|
}
|
598
|
+
};
|
599
|
+
}
|
314
600
|
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
601
|
+
// Call delegate.iterator[context.method](context.arg) and handle the
|
602
|
+
// result, either by returning a { value, done } result from the
|
603
|
+
// delegate iterator, or by modifying context.method and context.arg,
|
604
|
+
// setting context.delegate to null, and returning the ContinueSentinel.
|
605
|
+
function maybeInvokeDelegate(delegate, context) {
|
606
|
+
var method = delegate.iterator[context.method];
|
607
|
+
if (method === undefined$1) {
|
608
|
+
// A .throw or .return when the delegate iterator has no .throw
|
609
|
+
// method always terminates the yield* loop.
|
610
|
+
context.delegate = null;
|
611
|
+
|
612
|
+
if (context.method === "throw") {
|
613
|
+
// Note: ["return"] must be used for ES3 parsing compatibility.
|
614
|
+
if (delegate.iterator["return"]) {
|
615
|
+
// If the delegate iterator has a return method, give it a
|
616
|
+
// chance to clean up.
|
617
|
+
context.method = "return";
|
618
|
+
context.arg = undefined$1;
|
619
|
+
maybeInvokeDelegate(delegate, context);
|
620
|
+
|
621
|
+
if (context.method === "throw") {
|
622
|
+
// If maybeInvokeDelegate(context) changed context.method from
|
623
|
+
// "return" to "throw", let that override the TypeError below.
|
624
|
+
return ContinueSentinel;
|
339
625
|
}
|
340
|
-
|
341
|
-
return thrown;
|
342
626
|
}
|
627
|
+
|
628
|
+
context.method = "throw";
|
629
|
+
context.arg = new TypeError(
|
630
|
+
"The iterator does not provide a 'throw' method");
|
343
631
|
}
|
344
632
|
|
345
|
-
|
346
|
-
},
|
347
|
-
delegateYield: function (iterable, resultName, nextLoc) {
|
348
|
-
return this.delegate = {
|
349
|
-
iterator: values(iterable),
|
350
|
-
resultName: resultName,
|
351
|
-
nextLoc: nextLoc
|
352
|
-
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
633
|
+
return ContinueSentinel;
|
353
634
|
}
|
354
|
-
}, exports;
|
355
|
-
}
|
356
635
|
|
357
|
-
|
358
|
-
_wrapRegExp = function (re, groups) {
|
359
|
-
return new BabelRegExp(re, void 0, groups);
|
360
|
-
};
|
636
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
361
637
|
|
362
|
-
|
363
|
-
|
638
|
+
if (record.type === "throw") {
|
639
|
+
context.method = "throw";
|
640
|
+
context.arg = record.arg;
|
641
|
+
context.delegate = null;
|
642
|
+
return ContinueSentinel;
|
643
|
+
}
|
364
644
|
|
365
|
-
|
366
|
-
var _this = new RegExp(re, flags);
|
645
|
+
var info = record.arg;
|
367
646
|
|
368
|
-
|
369
|
-
|
647
|
+
if (! info) {
|
648
|
+
context.method = "throw";
|
649
|
+
context.arg = new TypeError("iterator result is not an object");
|
650
|
+
context.delegate = null;
|
651
|
+
return ContinueSentinel;
|
652
|
+
}
|
370
653
|
|
371
|
-
|
372
|
-
|
654
|
+
if (info.done) {
|
655
|
+
// Assign the result of the finished delegate to the temporary
|
656
|
+
// variable specified by delegate.resultName (see delegateYield).
|
657
|
+
context[delegate.resultName] = info.value;
|
658
|
+
|
659
|
+
// Resume execution at the desired location (see delegateYield).
|
660
|
+
context.next = delegate.nextLoc;
|
661
|
+
|
662
|
+
// If context.method was "throw" but the delegate handled the
|
663
|
+
// exception, let the outer generator proceed normally. If
|
664
|
+
// context.method was "next", forget context.arg since it has been
|
665
|
+
// "consumed" by the delegate iterator. If context.method was
|
666
|
+
// "return", allow the original .return call to continue in the
|
667
|
+
// outer generator.
|
668
|
+
if (context.method !== "return") {
|
669
|
+
context.method = "next";
|
670
|
+
context.arg = undefined$1;
|
671
|
+
}
|
373
672
|
|
374
|
-
|
375
|
-
|
376
|
-
|
673
|
+
} else {
|
674
|
+
// Re-yield the result returned by the delegate method.
|
675
|
+
return info;
|
676
|
+
}
|
677
|
+
|
678
|
+
// The delegate iterator is finished, so forget it and continue with
|
679
|
+
// the outer generator.
|
680
|
+
context.delegate = null;
|
681
|
+
return ContinueSentinel;
|
377
682
|
}
|
378
683
|
|
379
|
-
|
380
|
-
|
684
|
+
// Define Generator.prototype.{next,throw,return} in terms of the
|
685
|
+
// unified ._invoke helper method.
|
686
|
+
defineIteratorMethods(Gp);
|
381
687
|
|
382
|
-
|
383
|
-
}, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {
|
384
|
-
if ("string" == typeof substitution) {
|
385
|
-
var groups = _groups.get(this);
|
688
|
+
define(Gp, toStringTagSymbol, "Generator");
|
386
689
|
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
690
|
+
// A Generator should always return itself as the iterator object when the
|
691
|
+
// @@iterator function is called on it. Some browsers' implementations of the
|
692
|
+
// iterator prototype chain incorrectly implement this, causing the Generator
|
693
|
+
// object to not be returned from this call. This ensures that doesn't happen.
|
694
|
+
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
695
|
+
define(Gp, iteratorSymbol, function() {
|
696
|
+
return this;
|
697
|
+
});
|
391
698
|
|
392
|
-
|
393
|
-
|
699
|
+
define(Gp, "toString", function() {
|
700
|
+
return "[object Generator]";
|
701
|
+
});
|
394
702
|
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
703
|
+
function pushTryEntry(locs) {
|
704
|
+
var entry = { tryLoc: locs[0] };
|
705
|
+
|
706
|
+
if (1 in locs) {
|
707
|
+
entry.catchLoc = locs[1];
|
399
708
|
}
|
400
709
|
|
401
|
-
|
402
|
-
|
403
|
-
|
710
|
+
if (2 in locs) {
|
711
|
+
entry.finallyLoc = locs[2];
|
712
|
+
entry.afterLoc = locs[3];
|
713
|
+
}
|
404
714
|
|
405
|
-
|
406
|
-
try {
|
407
|
-
var info = gen[key](arg);
|
408
|
-
var value = info.value;
|
409
|
-
} catch (error) {
|
410
|
-
reject(error);
|
411
|
-
return;
|
715
|
+
this.tryEntries.push(entry);
|
412
716
|
}
|
413
717
|
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
718
|
+
function resetTryEntry(entry) {
|
719
|
+
var record = entry.completion || {};
|
720
|
+
record.type = "normal";
|
721
|
+
delete record.arg;
|
722
|
+
entry.completion = record;
|
418
723
|
}
|
419
|
-
}
|
420
724
|
|
421
|
-
function
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
725
|
+
function Context(tryLocsList) {
|
726
|
+
// The root entry object (effectively a try statement without a catch
|
727
|
+
// or a finally block) gives us a place to store values thrown from
|
728
|
+
// locations where there is no enclosing try statement.
|
729
|
+
this.tryEntries = [{ tryLoc: "root" }];
|
730
|
+
tryLocsList.forEach(pushTryEntry, this);
|
731
|
+
this.reset(true);
|
732
|
+
}
|
427
733
|
|
428
|
-
|
429
|
-
|
430
|
-
|
734
|
+
exports.keys = function(object) {
|
735
|
+
var keys = [];
|
736
|
+
for (var key in object) {
|
737
|
+
keys.push(key);
|
738
|
+
}
|
739
|
+
keys.reverse();
|
431
740
|
|
432
|
-
|
433
|
-
|
741
|
+
// Rather than returning an object with a next method, we keep
|
742
|
+
// things simple and return the next function itself.
|
743
|
+
return function next() {
|
744
|
+
while (keys.length) {
|
745
|
+
var key = keys.pop();
|
746
|
+
if (key in object) {
|
747
|
+
next.value = key;
|
748
|
+
next.done = false;
|
749
|
+
return next;
|
750
|
+
}
|
434
751
|
}
|
435
752
|
|
436
|
-
|
437
|
-
|
753
|
+
// To avoid creating an additional object, we just hang the .value
|
754
|
+
// and .done properties off the next function object itself. This
|
755
|
+
// also ensures that the minifier will not anonymize the function.
|
756
|
+
next.done = true;
|
757
|
+
return next;
|
758
|
+
};
|
438
759
|
};
|
439
|
-
}
|
440
760
|
|
441
|
-
function
|
442
|
-
|
443
|
-
|
444
|
-
|
761
|
+
function values(iterable) {
|
762
|
+
if (iterable) {
|
763
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
764
|
+
if (iteratorMethod) {
|
765
|
+
return iteratorMethod.call(iterable);
|
766
|
+
}
|
445
767
|
|
446
|
-
|
447
|
-
|
448
|
-
target[key] = source[key];
|
449
|
-
}
|
768
|
+
if (typeof iterable.next === "function") {
|
769
|
+
return iterable;
|
450
770
|
}
|
451
|
-
}
|
452
771
|
|
453
|
-
|
454
|
-
|
772
|
+
if (!isNaN(iterable.length)) {
|
773
|
+
var i = -1, next = function next() {
|
774
|
+
while (++i < iterable.length) {
|
775
|
+
if (hasOwn.call(iterable, i)) {
|
776
|
+
next.value = iterable[i];
|
777
|
+
next.done = false;
|
778
|
+
return next;
|
779
|
+
}
|
780
|
+
}
|
781
|
+
|
782
|
+
next.value = undefined$1;
|
783
|
+
next.done = true;
|
784
|
+
|
785
|
+
return next;
|
786
|
+
};
|
455
787
|
|
456
|
-
|
457
|
-
}
|
788
|
+
return next.next = next;
|
789
|
+
}
|
790
|
+
}
|
458
791
|
|
459
|
-
|
460
|
-
|
461
|
-
throw new TypeError("Super expression must either be null or a function");
|
792
|
+
// Return an iterator with no values.
|
793
|
+
return { next: doneResult };
|
462
794
|
}
|
795
|
+
exports.values = values;
|
463
796
|
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
writable: true,
|
468
|
-
configurable: true
|
469
|
-
}
|
470
|
-
});
|
471
|
-
Object.defineProperty(subClass, "prototype", {
|
472
|
-
writable: false
|
473
|
-
});
|
474
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
475
|
-
}
|
797
|
+
function doneResult() {
|
798
|
+
return { value: undefined$1, done: true };
|
799
|
+
}
|
476
800
|
|
477
|
-
|
478
|
-
|
479
|
-
subClass.prototype.constructor = subClass;
|
801
|
+
Context.prototype = {
|
802
|
+
constructor: Context,
|
480
803
|
|
481
|
-
|
482
|
-
|
804
|
+
reset: function(skipTempReset) {
|
805
|
+
this.prev = 0;
|
806
|
+
this.next = 0;
|
807
|
+
// Resetting context._sent for legacy support of Babel's
|
808
|
+
// function.sent implementation.
|
809
|
+
this.sent = this._sent = undefined$1;
|
810
|
+
this.done = false;
|
811
|
+
this.delegate = null;
|
812
|
+
|
813
|
+
this.method = "next";
|
814
|
+
this.arg = undefined$1;
|
815
|
+
|
816
|
+
this.tryEntries.forEach(resetTryEntry);
|
817
|
+
|
818
|
+
if (!skipTempReset) {
|
819
|
+
for (var name in this) {
|
820
|
+
// Not sure about the optimal order of these conditions:
|
821
|
+
if (name.charAt(0) === "t" &&
|
822
|
+
hasOwn.call(this, name) &&
|
823
|
+
!isNaN(+name.slice(1))) {
|
824
|
+
this[name] = undefined$1;
|
825
|
+
}
|
826
|
+
}
|
827
|
+
}
|
828
|
+
},
|
483
829
|
|
484
|
-
function
|
485
|
-
|
486
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
487
|
-
};
|
488
|
-
return _getPrototypeOf(o);
|
489
|
-
}
|
830
|
+
stop: function() {
|
831
|
+
this.done = true;
|
490
832
|
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
833
|
+
var rootEntry = this.tryEntries[0];
|
834
|
+
var rootRecord = rootEntry.completion;
|
835
|
+
if (rootRecord.type === "throw") {
|
836
|
+
throw rootRecord.arg;
|
837
|
+
}
|
496
838
|
|
497
|
-
|
498
|
-
}
|
839
|
+
return this.rval;
|
840
|
+
},
|
499
841
|
|
500
|
-
function
|
501
|
-
|
502
|
-
|
503
|
-
|
842
|
+
dispatchException: function(exception) {
|
843
|
+
if (this.done) {
|
844
|
+
throw exception;
|
845
|
+
}
|
504
846
|
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
847
|
+
var context = this;
|
848
|
+
function handle(loc, caught) {
|
849
|
+
record.type = "throw";
|
850
|
+
record.arg = exception;
|
851
|
+
context.next = loc;
|
852
|
+
|
853
|
+
if (caught) {
|
854
|
+
// If the dispatched exception was caught by a catch block,
|
855
|
+
// then let that catch block handle the exception normally.
|
856
|
+
context.method = "next";
|
857
|
+
context.arg = undefined$1;
|
858
|
+
}
|
512
859
|
|
513
|
-
|
514
|
-
|
515
|
-
_construct = Reflect.construct;
|
516
|
-
} else {
|
517
|
-
_construct = function _construct(Parent, args, Class) {
|
518
|
-
var a = [null];
|
519
|
-
a.push.apply(a, args);
|
520
|
-
var Constructor = Function.bind.apply(Parent, a);
|
521
|
-
var instance = new Constructor();
|
522
|
-
if (Class) _setPrototypeOf(instance, Class.prototype);
|
523
|
-
return instance;
|
524
|
-
};
|
525
|
-
}
|
860
|
+
return !! caught;
|
861
|
+
}
|
526
862
|
|
527
|
-
|
528
|
-
|
863
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
864
|
+
var entry = this.tryEntries[i];
|
865
|
+
var record = entry.completion;
|
529
866
|
|
530
|
-
|
531
|
-
|
532
|
-
|
867
|
+
if (entry.tryLoc === "root") {
|
868
|
+
// Exception thrown outside of any try block that could handle
|
869
|
+
// it, so set the completion value of the entire function to
|
870
|
+
// throw the exception.
|
871
|
+
return handle("end");
|
872
|
+
}
|
533
873
|
|
534
|
-
|
535
|
-
|
874
|
+
if (entry.tryLoc <= this.prev) {
|
875
|
+
var hasCatch = hasOwn.call(entry, "catchLoc");
|
876
|
+
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
536
877
|
|
537
|
-
|
538
|
-
|
878
|
+
if (hasCatch && hasFinally) {
|
879
|
+
if (this.prev < entry.catchLoc) {
|
880
|
+
return handle(entry.catchLoc, true);
|
881
|
+
} else if (this.prev < entry.finallyLoc) {
|
882
|
+
return handle(entry.finallyLoc);
|
883
|
+
}
|
539
884
|
|
540
|
-
|
541
|
-
|
542
|
-
|
885
|
+
} else if (hasCatch) {
|
886
|
+
if (this.prev < entry.catchLoc) {
|
887
|
+
return handle(entry.catchLoc, true);
|
888
|
+
}
|
543
889
|
|
544
|
-
|
545
|
-
|
890
|
+
} else if (hasFinally) {
|
891
|
+
if (this.prev < entry.finallyLoc) {
|
892
|
+
return handle(entry.finallyLoc);
|
893
|
+
}
|
546
894
|
|
547
|
-
|
548
|
-
|
895
|
+
} else {
|
896
|
+
throw new Error("try statement without catch or finally");
|
897
|
+
}
|
898
|
+
}
|
899
|
+
}
|
900
|
+
},
|
549
901
|
|
550
|
-
function
|
551
|
-
|
552
|
-
|
902
|
+
abrupt: function(type, arg) {
|
903
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
904
|
+
var entry = this.tryEntries[i];
|
905
|
+
if (entry.tryLoc <= this.prev &&
|
906
|
+
hasOwn.call(entry, "finallyLoc") &&
|
907
|
+
this.prev < entry.finallyLoc) {
|
908
|
+
var finallyEntry = entry;
|
909
|
+
break;
|
910
|
+
}
|
911
|
+
}
|
553
912
|
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
913
|
+
if (finallyEntry &&
|
914
|
+
(type === "break" ||
|
915
|
+
type === "continue") &&
|
916
|
+
finallyEntry.tryLoc <= arg &&
|
917
|
+
arg <= finallyEntry.finallyLoc) {
|
918
|
+
// Ignore the finally entry if control is not jumping to a
|
919
|
+
// location outside the try/catch block.
|
920
|
+
finallyEntry = null;
|
560
921
|
}
|
561
|
-
});
|
562
|
-
return _setPrototypeOf(Wrapper, Class);
|
563
|
-
};
|
564
922
|
|
565
|
-
|
566
|
-
|
923
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
924
|
+
record.type = type;
|
925
|
+
record.arg = arg;
|
567
926
|
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
927
|
+
if (finallyEntry) {
|
928
|
+
this.method = "next";
|
929
|
+
this.next = finallyEntry.finallyLoc;
|
930
|
+
return ContinueSentinel;
|
931
|
+
}
|
573
932
|
|
574
|
-
|
575
|
-
|
576
|
-
if (excluded.indexOf(key) >= 0) continue;
|
577
|
-
target[key] = source[key];
|
578
|
-
}
|
933
|
+
return this.complete(record);
|
934
|
+
},
|
579
935
|
|
580
|
-
|
581
|
-
|
936
|
+
complete: function(record, afterLoc) {
|
937
|
+
if (record.type === "throw") {
|
938
|
+
throw record.arg;
|
939
|
+
}
|
582
940
|
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
}
|
941
|
+
if (record.type === "break" ||
|
942
|
+
record.type === "continue") {
|
943
|
+
this.next = record.arg;
|
944
|
+
} else if (record.type === "return") {
|
945
|
+
this.rval = this.arg = record.arg;
|
946
|
+
this.method = "return";
|
947
|
+
this.next = "end";
|
948
|
+
} else if (record.type === "normal" && afterLoc) {
|
949
|
+
this.next = afterLoc;
|
950
|
+
}
|
591
951
|
|
592
|
-
|
593
|
-
|
952
|
+
return ContinueSentinel;
|
953
|
+
},
|
594
954
|
|
595
|
-
|
955
|
+
finish: function(finallyLoc) {
|
956
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
957
|
+
var entry = this.tryEntries[i];
|
958
|
+
if (entry.finallyLoc === finallyLoc) {
|
959
|
+
this.complete(entry.completion, entry.afterLoc);
|
960
|
+
resetTryEntry(entry);
|
961
|
+
return ContinueSentinel;
|
962
|
+
}
|
963
|
+
}
|
964
|
+
},
|
596
965
|
|
597
|
-
|
598
|
-
|
966
|
+
"catch": function(tryLoc) {
|
967
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
968
|
+
var entry = this.tryEntries[i];
|
969
|
+
if (entry.tryLoc === tryLoc) {
|
970
|
+
var record = entry.completion;
|
971
|
+
if (record.type === "throw") {
|
972
|
+
var thrown = record.arg;
|
973
|
+
resetTryEntry(entry);
|
974
|
+
}
|
975
|
+
return thrown;
|
976
|
+
}
|
977
|
+
}
|
599
978
|
|
600
|
-
|
601
|
-
|
602
|
-
|
979
|
+
// The context.catch method must only be called with a location
|
980
|
+
// argument that corresponds to a known catch block.
|
981
|
+
throw new Error("illegal catch attempt");
|
982
|
+
},
|
603
983
|
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
done: true
|
610
|
-
};
|
611
|
-
return {
|
612
|
-
done: false,
|
613
|
-
value: o[i++]
|
984
|
+
delegateYield: function(iterable, resultName, nextLoc) {
|
985
|
+
this.delegate = {
|
986
|
+
iterator: values(iterable),
|
987
|
+
resultName: resultName,
|
988
|
+
nextLoc: nextLoc
|
614
989
|
};
|
615
|
-
};
|
616
|
-
}
|
617
990
|
|
618
|
-
|
991
|
+
if (this.method === "next") {
|
992
|
+
// Deliberately forget the last sent value so that we don't
|
993
|
+
// accidentally pass it on to the delegate.
|
994
|
+
this.arg = undefined$1;
|
995
|
+
}
|
996
|
+
|
997
|
+
return ContinueSentinel;
|
998
|
+
}
|
999
|
+
};
|
1000
|
+
|
1001
|
+
// Regardless of whether this script is executing as a CommonJS module
|
1002
|
+
// or not, return the runtime object so that we can declare the variable
|
1003
|
+
// regeneratorRuntime in the outer scope, which allows this module to be
|
1004
|
+
// injected easily by `bin/regenerator --include-runtime script.js`.
|
1005
|
+
return exports;
|
1006
|
+
|
1007
|
+
}(
|
1008
|
+
// If this script is executing as a CommonJS module, use module.exports
|
1009
|
+
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
1010
|
+
// object. Either way, the resulting object will be used to initialize
|
1011
|
+
// the regeneratorRuntime variable at the top of this file.
|
1012
|
+
module.exports
|
1013
|
+
));
|
1014
|
+
|
1015
|
+
try {
|
1016
|
+
regeneratorRuntime = runtime;
|
1017
|
+
} catch (accidentalStrictMode) {
|
1018
|
+
// This module should not be running in strict mode, so the above
|
1019
|
+
// assignment should always work unless something is misconfigured. Just
|
1020
|
+
// in case runtime.js accidentally runs in strict mode, in modern engines
|
1021
|
+
// we can explicitly access globalThis. In older engines we can escape
|
1022
|
+
// strict mode using a global Function call. This could conceivably fail
|
1023
|
+
// if a Content Security Policy forbids using Function, but in that case
|
1024
|
+
// the proper solution is to fix the accidental strict mode problem. If
|
1025
|
+
// you've misconfigured your bundler to force strict mode and applied a
|
1026
|
+
// CSP to forbid Function, and you're not willing to fix either of those
|
1027
|
+
// problems, please detail your unique predicament in a GitHub issue.
|
1028
|
+
if (typeof globalThis === "object") {
|
1029
|
+
globalThis.regeneratorRuntime = runtime;
|
1030
|
+
} else {
|
1031
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
1032
|
+
}
|
619
1033
|
}
|
1034
|
+
});
|
620
1035
|
|
621
1036
|
var _personalMetaToPrefix;
|
622
1037
|
var personalMetaToPrefix = (_personalMetaToPrefix = {}, _personalMetaToPrefix[initApis.MetadataCategory.Personal] = 'you', _personalMetaToPrefix[initApis.MetadataCategory.ChildPersonal] = 'child', _personalMetaToPrefix[initApis.MetadataCategory.OtherPersonal] = 'other', _personalMetaToPrefix);
|
@@ -846,9 +1261,9 @@ function filterTriggeredAnsweredWithKind(_x, _x2) {
|
|
846
1261
|
*/
|
847
1262
|
|
848
1263
|
function _filterTriggeredAnsweredWithKind() {
|
849
|
-
_filterTriggeredAnsweredWithKind = _asyncToGenerator( /*#__PURE__*/
|
1264
|
+
_filterTriggeredAnsweredWithKind = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(workflowData, kind) {
|
850
1265
|
var flattenedAnswers, triggeredQuestionsWithKind, samePageAnswers, res;
|
851
|
-
return
|
1266
|
+
return runtime_1.wrap(function _callee$(_context) {
|
852
1267
|
while (1) {
|
853
1268
|
switch (_context.prev = _context.next) {
|
854
1269
|
case 0:
|
@@ -892,9 +1307,9 @@ function getWorkflowDataByCategory(_x3, _x4) {
|
|
892
1307
|
}
|
893
1308
|
|
894
1309
|
function _getWorkflowDataByCategory() {
|
895
|
-
_getWorkflowDataByCategory = _asyncToGenerator( /*#__PURE__*/
|
1310
|
+
_getWorkflowDataByCategory = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(workflowData, category) {
|
896
1311
|
var flattenedAnswers, triggeredQuestions, fields;
|
897
|
-
return
|
1312
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
898
1313
|
while (1) {
|
899
1314
|
switch (_context2.prev = _context2.next) {
|
900
1315
|
case 0:
|
@@ -965,8 +1380,8 @@ function getImagesFromIndexDb(_x5) {
|
|
965
1380
|
*/
|
966
1381
|
|
967
1382
|
function _getImagesFromIndexDb() {
|
968
|
-
_getImagesFromIndexDb = _asyncToGenerator( /*#__PURE__*/
|
969
|
-
return
|
1383
|
+
_getImagesFromIndexDb = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(answer) {
|
1384
|
+
return runtime_1.wrap(function _callee3$(_context3) {
|
970
1385
|
while (1) {
|
971
1386
|
switch (_context3.prev = _context3.next) {
|
972
1387
|
case 0:
|
@@ -1042,9 +1457,9 @@ function populateWorkflowField(_x6, _x7) {
|
|
1042
1457
|
|
1043
1458
|
|
1044
1459
|
function _populateWorkflowField() {
|
1045
|
-
_populateWorkflowField = _asyncToGenerator( /*#__PURE__*/
|
1460
|
+
_populateWorkflowField = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(question, answerValue) {
|
1046
1461
|
var answer, displayedAnswer;
|
1047
|
-
return
|
1462
|
+
return runtime_1.wrap(function _callee4$(_context4) {
|
1048
1463
|
while (1) {
|
1049
1464
|
switch (_context4.prev = _context4.next) {
|
1050
1465
|
case 0:
|
@@ -1237,10 +1652,10 @@ function registerPatient(_x, _x2, _x3, _x4, _x5, _x6, _x7, _x8) {
|
|
1237
1652
|
*/
|
1238
1653
|
|
1239
1654
|
function _registerPatient() {
|
1240
|
-
_registerPatient = _asyncToGenerator( /*#__PURE__*/
|
1655
|
+
_registerPatient = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(patientUuid, consultRequest, workflow, oroClient, masterKey, recoveryQA, indexSearch, onProgress) {
|
1241
1656
|
var consult, lockboxUuid, practitionerAdmin, retry, identity, errorsThrown, stepsTotalNum, currentStep, _ret;
|
1242
1657
|
|
1243
|
-
return
|
1658
|
+
return runtime_1.wrap(function _callee4$(_context4) {
|
1244
1659
|
while (1) {
|
1245
1660
|
switch (_context4.prev = _context4.next) {
|
1246
1661
|
case 0:
|
@@ -1263,11 +1678,11 @@ function _registerPatient() {
|
|
1263
1678
|
}
|
1264
1679
|
|
1265
1680
|
_context4.prev = 9;
|
1266
|
-
return _context4.delegateYield( /*#__PURE__*/
|
1681
|
+
return _context4.delegateYield( /*#__PURE__*/runtime_1.mark(function _callee3() {
|
1267
1682
|
var _consultIndex, _identity, _identity2;
|
1268
1683
|
|
1269
1684
|
var practitioners, grantPromises, consultIndex, consultIndexPromises;
|
1270
|
-
return
|
1685
|
+
return runtime_1.wrap(function _callee3$(_context3) {
|
1271
1686
|
while (1) {
|
1272
1687
|
switch (_context3.prev = _context3.next) {
|
1273
1688
|
case 0:
|
@@ -1346,6 +1761,7 @@ function _registerPatient() {
|
|
1346
1761
|
return oroClient.grantLockbox(practitionerAdmin, lockboxUuid)["catch"](function (err) {
|
1347
1762
|
console.error("Error while granting lockbox to practitioner admin " + practitionerAdmin, err); // if we cannot grant to the admin, then the registration will fail
|
1348
1763
|
|
1764
|
+
// if we cannot grant to the admin, then the registration will fail
|
1349
1765
|
errorsThrown.push(err);
|
1350
1766
|
});
|
1351
1767
|
|
@@ -1355,14 +1771,15 @@ function _registerPatient() {
|
|
1355
1771
|
grantPromises = practitioners.filter(function (practitioner) {
|
1356
1772
|
return practitioner.uuid !== practitionerAdmin;
|
1357
1773
|
}).map( /*#__PURE__*/function () {
|
1358
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/
|
1359
|
-
return
|
1774
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(practitioner) {
|
1775
|
+
return runtime_1.wrap(function _callee$(_context) {
|
1360
1776
|
while (1) {
|
1361
1777
|
switch (_context.prev = _context.next) {
|
1362
1778
|
case 0:
|
1363
1779
|
return _context.abrupt("return", oroClient.grantLockbox(practitioner.uuid, lockboxUuid)["catch"](function (err) {
|
1364
1780
|
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
|
1365
1781
|
|
1782
|
+
// Acceptable to continue as admin has already been granted, but we should still retry until the last retry remains
|
1366
1783
|
if (retry <= 1) return;
|
1367
1784
|
errorsThrown.push(err);
|
1368
1785
|
}));
|
@@ -1388,14 +1805,15 @@ function _registerPatient() {
|
|
1388
1805
|
}], _consultIndex); // the index will identify in which lockbox a consultation resides
|
1389
1806
|
|
1390
1807
|
consultIndexPromises = practitioners.map( /*#__PURE__*/function () {
|
1391
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/
|
1392
|
-
return
|
1808
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(practitioner) {
|
1809
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
1393
1810
|
while (1) {
|
1394
1811
|
switch (_context2.prev = _context2.next) {
|
1395
1812
|
case 0:
|
1396
1813
|
return _context2.abrupt("return", oroClient.vaultIndexAdd(consultIndex, practitioner.uuid)["catch"](function (err) {
|
1397
1814
|
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
|
1398
1815
|
|
1816
|
+
// Acceptable to continue as the index can be rebuilt, but we should still retry until the last retry remains
|
1399
1817
|
if (retry <= 1) return;else errorsThrown.push(err);
|
1400
1818
|
}));
|
1401
1819
|
|
@@ -1419,6 +1837,7 @@ function _registerPatient() {
|
|
1419
1837
|
} : undefined)["catch"](function (err) {
|
1420
1838
|
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
|
1421
1839
|
|
1840
|
+
// Acceptable to continue as images can be requested during the consultation, but we should still retry until the last retry remains
|
1422
1841
|
if (retry <= 1) return;else errorsThrown.push(err);
|
1423
1842
|
});
|
1424
1843
|
|
@@ -1443,6 +1862,7 @@ function _registerPatient() {
|
|
1443
1862
|
return oroClient.updateMasterKey(patientUuid, masterKey, lockboxUuid)["catch"](function (err) {
|
1444
1863
|
console.error("[SDK: registration] Error while updating master key", err); /// it's acceptable to continue registration (return old identity)
|
1445
1864
|
|
1865
|
+
/// it's acceptable to continue registration (return old identity)
|
1446
1866
|
if (retry <= 1) return;
|
1447
1867
|
errorsThrown.push(err);
|
1448
1868
|
return identity;
|
@@ -1469,6 +1889,7 @@ function _registerPatient() {
|
|
1469
1889
|
return oroClient.updateSecurityQuestions(patientUuid, recoveryQA.recoverySecurityQuestions, recoveryQA.recoverySecurityAnswers, 2)["catch"](function (err) {
|
1470
1890
|
console.error("[SDK: registration] Error while updating security questions", err); /// it's acceptable to continue registration (return old identity)
|
1471
1891
|
|
1892
|
+
/// it's acceptable to continue registration (return old identity)
|
1472
1893
|
if (retry <= 1) return;
|
1473
1894
|
errorsThrown.push(err);
|
1474
1895
|
return identity;
|
@@ -1494,6 +1915,7 @@ function _registerPatient() {
|
|
1494
1915
|
console.error('[SDK: registration] personal information not found or another error occured during search indexing', err);
|
1495
1916
|
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
|
1496
1917
|
|
1918
|
+
// this statement is to avoid failing the registration due to the failure in search indexing the consult, this practically implements a soft retry
|
1497
1919
|
errorsThrown.push(err);
|
1498
1920
|
});
|
1499
1921
|
|
@@ -1592,9 +2014,9 @@ function getOrCreatePatientConsultationUuid(_x9, _x10) {
|
|
1592
2014
|
|
1593
2015
|
|
1594
2016
|
function _getOrCreatePatientConsultationUuid() {
|
1595
|
-
_getOrCreatePatientConsultationUuid = _asyncToGenerator( /*#__PURE__*/
|
2017
|
+
_getOrCreatePatientConsultationUuid = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(consult, oroClient) {
|
1596
2018
|
var payment;
|
1597
|
-
return
|
2019
|
+
return runtime_1.wrap(function _callee5$(_context5) {
|
1598
2020
|
while (1) {
|
1599
2021
|
switch (_context5.prev = _context5.next) {
|
1600
2022
|
case 0:
|
@@ -1649,9 +2071,9 @@ function getOrCreatePatientLockbox(_x11) {
|
|
1649
2071
|
|
1650
2072
|
|
1651
2073
|
function _getOrCreatePatientLockbox() {
|
1652
|
-
_getOrCreatePatientLockbox = _asyncToGenerator( /*#__PURE__*/
|
2074
|
+
_getOrCreatePatientLockbox = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(oroClient) {
|
1653
2075
|
var grants, lockboxResponse, tokens;
|
1654
|
-
return
|
2076
|
+
return runtime_1.wrap(function _callee6$(_context6) {
|
1655
2077
|
while (1) {
|
1656
2078
|
switch (_context6.prev = _context6.next) {
|
1657
2079
|
case 0:
|
@@ -1711,8 +2133,8 @@ function storePatientData(_x12, _x13, _x14, _x15, _x16) {
|
|
1711
2133
|
}
|
1712
2134
|
|
1713
2135
|
function _storePatientData() {
|
1714
|
-
_storePatientData = _asyncToGenerator( /*#__PURE__*/
|
1715
|
-
return
|
2136
|
+
_storePatientData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(consultationId, isoLanguage, lockboxUuid, workflow, oroClient) {
|
2137
|
+
return runtime_1.wrap(function _callee7$(_context7) {
|
1716
2138
|
while (1) {
|
1717
2139
|
switch (_context7.prev = _context7.next) {
|
1718
2140
|
case 0:
|
@@ -1728,7 +2150,8 @@ function _storePatientData() {
|
|
1728
2150
|
consultationId: consultationId
|
1729
2151
|
}, {
|
1730
2152
|
consultationId: consultationId
|
1731
|
-
}
|
2153
|
+
}, false, true // the only data that needs to include an email notification
|
2154
|
+
);
|
1732
2155
|
}), getWorkflowDataByCategory(workflow, initApis.MetadataCategory.Medical).then(function (data) {
|
1733
2156
|
return oroClient.getOrInsertJsonData(lockboxUuid, data, {
|
1734
2157
|
category: initApis.MetadataCategory.Medical,
|
@@ -1769,9 +2192,9 @@ function storeImageAliases(_x17, _x18, _x19, _x20, _x21) {
|
|
1769
2192
|
|
1770
2193
|
|
1771
2194
|
function _storeImageAliases() {
|
1772
|
-
_storeImageAliases = _asyncToGenerator( /*#__PURE__*/
|
2195
|
+
_storeImageAliases = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(consultationId, lockboxUuid, workflow, oroClient, progress) {
|
1773
2196
|
var images, nonNullImages, storedImagesNum, totalImagesNum, promises;
|
1774
|
-
return
|
2197
|
+
return runtime_1.wrap(function _callee8$(_context8) {
|
1775
2198
|
while (1) {
|
1776
2199
|
switch (_context8.prev = _context8.next) {
|
1777
2200
|
case 0:
|
@@ -1838,8 +2261,8 @@ function extractAndStorePersonalWorkflowData(_x22, _x23, _x24, _x25, _x26) {
|
|
1838
2261
|
*/
|
1839
2262
|
|
1840
2263
|
function _extractAndStorePersonalWorkflowData() {
|
1841
|
-
_extractAndStorePersonalWorkflowData = _asyncToGenerator( /*#__PURE__*/
|
1842
|
-
return
|
2264
|
+
_extractAndStorePersonalWorkflowData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(workflow, lockboxUuid, consultationId, category, oroClient) {
|
2265
|
+
return runtime_1.wrap(function _callee9$(_context9) {
|
1843
2266
|
while (1) {
|
1844
2267
|
switch (_context9.prev = _context9.next) {
|
1845
2268
|
case 0:
|
@@ -1873,8 +2296,8 @@ function extractPersonalInfoFromWorkflowData(_x27) {
|
|
1873
2296
|
*/
|
1874
2297
|
|
1875
2298
|
function _extractPersonalInfoFromWorkflowData() {
|
1876
|
-
_extractPersonalInfoFromWorkflowData = _asyncToGenerator( /*#__PURE__*/
|
1877
|
-
return
|
2299
|
+
_extractPersonalInfoFromWorkflowData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(workflow) {
|
2300
|
+
return runtime_1.wrap(function _callee10$(_context10) {
|
1878
2301
|
while (1) {
|
1879
2302
|
switch (_context10.prev = _context10.next) {
|
1880
2303
|
case 0:
|
@@ -1904,10 +2327,10 @@ function buildConsultSearchIndex(_x28, _x29, _x30) {
|
|
1904
2327
|
}
|
1905
2328
|
|
1906
2329
|
function _buildConsultSearchIndex() {
|
1907
|
-
_buildConsultSearchIndex = _asyncToGenerator( /*#__PURE__*/
|
2330
|
+
_buildConsultSearchIndex = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(consult, workflow, oroClient) {
|
1908
2331
|
var terms, _yield$extractPersona, personalInfoPopulatedWfData, childPersonalInfoPopulatedWfData, otherPersonalInfoPopulatedWfData, personalInfo, childPersonalInfo, otherPersonalInfo;
|
1909
2332
|
|
1910
|
-
return
|
2333
|
+
return runtime_1.wrap(function _callee11$(_context11) {
|
1911
2334
|
while (1) {
|
1912
2335
|
switch (_context11.prev = _context11.next) {
|
1913
2336
|
case 0:
|
@@ -2028,10 +2451,10 @@ function filterGrantsWithLockboxMetadata(_x, _x2) {
|
|
2028
2451
|
}
|
2029
2452
|
|
2030
2453
|
function _filterGrantsWithLockboxMetadata() {
|
2031
|
-
_filterGrantsWithLockboxMetadata = _asyncToGenerator( /*#__PURE__*/
|
2454
|
+
_filterGrantsWithLockboxMetadata = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(oroClient, filter) {
|
2032
2455
|
var grants, filteredGrants, _iterator, _step, grant, consultationIdExistsInMetadata;
|
2033
2456
|
|
2034
|
-
return
|
2457
|
+
return runtime_1.wrap(function _callee$(_context) {
|
2035
2458
|
while (1) {
|
2036
2459
|
switch (_context.prev = _context.next) {
|
2037
2460
|
case 0:
|
@@ -2104,8 +2527,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
2104
2527
|
_proto.cleanIndex =
|
2105
2528
|
/*#__PURE__*/
|
2106
2529
|
function () {
|
2107
|
-
var _cleanIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2108
|
-
return
|
2530
|
+
var _cleanIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
|
2531
|
+
return runtime_1.wrap(function _callee$(_context) {
|
2109
2532
|
while (1) {
|
2110
2533
|
switch (_context.prev = _context.next) {
|
2111
2534
|
case 0:
|
@@ -2142,9 +2565,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2142
2565
|
_proto.signUp =
|
2143
2566
|
/*#__PURE__*/
|
2144
2567
|
function () {
|
2145
|
-
var _signUp = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2568
|
+
var _signUp = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(email, password, practice, tosAndCpAcceptance, tokenData, subscription, skipEmailValidation) {
|
2146
2569
|
var privateKey, symmetricEncryptor, recoveryPassword, hashedPassword, emailConfirmed, signupRequest, identity, symetricEncryptor;
|
2147
|
-
return
|
2570
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
2148
2571
|
while (1) {
|
2149
2572
|
switch (_context2.prev = _context2.next) {
|
2150
2573
|
case 0:
|
@@ -2203,9 +2626,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2203
2626
|
_proto.confirmEmail =
|
2204
2627
|
/*#__PURE__*/
|
2205
2628
|
function () {
|
2206
|
-
var _confirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2629
|
+
var _confirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(accessToken) {
|
2207
2630
|
var claims;
|
2208
|
-
return
|
2631
|
+
return runtime_1.wrap(function _callee3$(_context3) {
|
2209
2632
|
while (1) {
|
2210
2633
|
switch (_context3.prev = _context3.next) {
|
2211
2634
|
case 0:
|
@@ -2250,9 +2673,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2250
2673
|
_proto.signIn =
|
2251
2674
|
/*#__PURE__*/
|
2252
2675
|
function () {
|
2253
|
-
var _signIn = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2676
|
+
var _signIn = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(practiceUuid, email, password, otp) {
|
2254
2677
|
var hashedPassword, tokenRequest, userUuid;
|
2255
|
-
return
|
2678
|
+
return runtime_1.wrap(function _callee4$(_context4) {
|
2256
2679
|
while (1) {
|
2257
2680
|
switch (_context4.prev = _context4.next) {
|
2258
2681
|
case 0:
|
@@ -2305,9 +2728,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2305
2728
|
_proto.resumeSession =
|
2306
2729
|
/*#__PURE__*/
|
2307
2730
|
function () {
|
2308
|
-
var _resumeSession = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2731
|
+
var _resumeSession = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5() {
|
2309
2732
|
var id, recoveryPayload, recoveryKey, symmetricDecryptor, privateKey;
|
2310
|
-
return
|
2733
|
+
return runtime_1.wrap(function _callee5$(_context5) {
|
2311
2734
|
while (1) {
|
2312
2735
|
switch (_context5.prev = _context5.next) {
|
2313
2736
|
case 0:
|
@@ -2408,8 +2831,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
2408
2831
|
_proto.signOut =
|
2409
2832
|
/*#__PURE__*/
|
2410
2833
|
function () {
|
2411
|
-
var _signOut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2412
|
-
return
|
2834
|
+
var _signOut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6() {
|
2835
|
+
return runtime_1.wrap(function _callee6$(_context6) {
|
2413
2836
|
while (1) {
|
2414
2837
|
switch (_context6.prev = _context6.next) {
|
2415
2838
|
case 0:
|
@@ -2460,8 +2883,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
2460
2883
|
_proto.registerPatient =
|
2461
2884
|
/*#__PURE__*/
|
2462
2885
|
function () {
|
2463
|
-
var _registerPatient2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2464
|
-
return
|
2886
|
+
var _registerPatient2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(patientUuid, consult, workflow, recoveryQA, indexSearch, onProgress) {
|
2887
|
+
return runtime_1.wrap(function _callee7$(_context7) {
|
2465
2888
|
while (1) {
|
2466
2889
|
switch (_context7.prev = _context7.next) {
|
2467
2890
|
case 0:
|
@@ -2502,12 +2925,12 @@ var OroClient = /*#__PURE__*/function () {
|
|
2502
2925
|
_proto.forceUpdateIndexEntries =
|
2503
2926
|
/*#__PURE__*/
|
2504
2927
|
function () {
|
2505
|
-
var _forceUpdateIndexEntries = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2928
|
+
var _forceUpdateIndexEntries = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9() {
|
2506
2929
|
var _this = this,
|
2507
2930
|
_this$vaultIndexAdd;
|
2508
2931
|
|
2509
2932
|
var grants, indexConsultLockbox;
|
2510
|
-
return
|
2933
|
+
return runtime_1.wrap(function _callee9$(_context9) {
|
2511
2934
|
while (1) {
|
2512
2935
|
switch (_context9.prev = _context9.next) {
|
2513
2936
|
case 0:
|
@@ -2518,8 +2941,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
2518
2941
|
grants = _context9.sent;
|
2519
2942
|
_context9.next = 5;
|
2520
2943
|
return Promise.all(grants.map( /*#__PURE__*/function () {
|
2521
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/
|
2522
|
-
return
|
2944
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(grant) {
|
2945
|
+
return runtime_1.wrap(function _callee8$(_context8) {
|
2523
2946
|
while (1) {
|
2524
2947
|
switch (_context8.prev = _context8.next) {
|
2525
2948
|
case 0:
|
@@ -2595,10 +3018,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
2595
3018
|
_proto.vaultIndexAdd =
|
2596
3019
|
/*#__PURE__*/
|
2597
3020
|
function () {
|
2598
|
-
var _vaultIndexAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3021
|
+
var _vaultIndexAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(entries, indexOwnerUuid) {
|
2599
3022
|
var rsaPub, base64IndexOwnerPubKey, encryptedIndex, _i, _Object$keys, keyString, key;
|
2600
3023
|
|
2601
|
-
return
|
3024
|
+
return runtime_1.wrap(function _callee10$(_context10) {
|
2602
3025
|
while (1) {
|
2603
3026
|
switch (_context10.prev = _context10.next) {
|
2604
3027
|
case 0:
|
@@ -2696,9 +3119,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2696
3119
|
_proto.grantLockbox =
|
2697
3120
|
/*#__PURE__*/
|
2698
3121
|
function () {
|
2699
|
-
var _grantLockbox = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3122
|
+
var _grantLockbox = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(granteeUuid, lockboxUuid, lockboxOwnerUuid) {
|
2700
3123
|
var secret, base64GranteePublicKey, granteePublicKey, granteeEncryptedSecret, request;
|
2701
|
-
return
|
3124
|
+
return runtime_1.wrap(function _callee11$(_context11) {
|
2702
3125
|
while (1) {
|
2703
3126
|
switch (_context11.prev = _context11.next) {
|
2704
3127
|
case 0:
|
@@ -2758,9 +3181,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2758
3181
|
_proto.createMessageData =
|
2759
3182
|
/*#__PURE__*/
|
2760
3183
|
function () {
|
2761
|
-
var _createMessageData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3184
|
+
var _createMessageData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(lockboxUuid, message, consultationId, lockboxOwnerUuid, previousDataUuid) {
|
2762
3185
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, meta, request;
|
2763
|
-
return
|
3186
|
+
return runtime_1.wrap(function _callee12$(_context12) {
|
2764
3187
|
while (1) {
|
2765
3188
|
switch (_context12.prev = _context12.next) {
|
2766
3189
|
case 0:
|
@@ -2830,9 +3253,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2830
3253
|
_proto.createMessageAttachmentData =
|
2831
3254
|
/*#__PURE__*/
|
2832
3255
|
function () {
|
2833
|
-
var _createMessageAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3256
|
+
var _createMessageAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee13(lockboxUuid, data, consultationId, lockboxOwnerUuid, previousDataUuid) {
|
2834
3257
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, meta, request;
|
2835
|
-
return
|
3258
|
+
return runtime_1.wrap(function _callee13$(_context13) {
|
2836
3259
|
while (1) {
|
2837
3260
|
switch (_context13.prev = _context13.next) {
|
2838
3261
|
case 0:
|
@@ -2910,6 +3333,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
2910
3333
|
* @param category the category for the attachment data
|
2911
3334
|
* @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
|
2912
3335
|
* @param previousDataUuid if it's a revision of existing file, specify the previous data uuid
|
3336
|
+
* @param withNotification if the insertion of data requires notification
|
2913
3337
|
* @returns the data uuid
|
2914
3338
|
*/
|
2915
3339
|
;
|
@@ -2917,26 +3341,30 @@ var OroClient = /*#__PURE__*/function () {
|
|
2917
3341
|
_proto.createConsultationAttachmentData =
|
2918
3342
|
/*#__PURE__*/
|
2919
3343
|
function () {
|
2920
|
-
var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2921
|
-
return
|
3344
|
+
var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee14(lockboxUuid, data, consultationId, documentType, lockboxOwnerUuid, previousDataUuid, withNotification) {
|
3345
|
+
return runtime_1.wrap(function _callee14$(_context14) {
|
2922
3346
|
while (1) {
|
2923
3347
|
switch (_context14.prev = _context14.next) {
|
2924
3348
|
case 0:
|
3349
|
+
if (withNotification === void 0) {
|
3350
|
+
withNotification = false;
|
3351
|
+
}
|
3352
|
+
|
2925
3353
|
if (this.rsa) {
|
2926
|
-
_context14.next =
|
3354
|
+
_context14.next = 3;
|
2927
3355
|
break;
|
2928
3356
|
}
|
2929
3357
|
|
2930
3358
|
throw IncompleteAuthentication;
|
2931
3359
|
|
2932
|
-
case
|
3360
|
+
case 3:
|
2933
3361
|
_context14.t0 = this;
|
2934
3362
|
_context14.t1 = lockboxUuid;
|
2935
3363
|
_context14.t2 = Uint8Array;
|
2936
|
-
_context14.next =
|
3364
|
+
_context14.next = 8;
|
2937
3365
|
return data.arrayBuffer();
|
2938
3366
|
|
2939
|
-
case
|
3367
|
+
case 8:
|
2940
3368
|
_context14.t3 = _context14.sent;
|
2941
3369
|
_context14.t4 = new _context14.t2(_context14.t3);
|
2942
3370
|
_context14.t5 = {
|
@@ -2945,10 +3373,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
2945
3373
|
documentType: documentType,
|
2946
3374
|
contentType: data.type
|
2947
3375
|
};
|
2948
|
-
_context14.next =
|
3376
|
+
_context14.next = 13;
|
2949
3377
|
return this.guardClient.whoAmI();
|
2950
3378
|
|
2951
|
-
case
|
3379
|
+
case 13:
|
2952
3380
|
_context14.t6 = _context14.sent.sub;
|
2953
3381
|
_context14.t7 = data.name;
|
2954
3382
|
_context14.t8 = {
|
@@ -2957,9 +3385,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
2957
3385
|
};
|
2958
3386
|
_context14.t9 = lockboxOwnerUuid;
|
2959
3387
|
_context14.t10 = previousDataUuid;
|
2960
|
-
|
3388
|
+
_context14.t11 = withNotification;
|
3389
|
+
return _context14.abrupt("return", _context14.t0.createBytesData.call(_context14.t0, _context14.t1, _context14.t4, _context14.t5, _context14.t8, _context14.t9, _context14.t10, _context14.t11));
|
2961
3390
|
|
2962
|
-
case
|
3391
|
+
case 20:
|
2963
3392
|
case "end":
|
2964
3393
|
return _context14.stop();
|
2965
3394
|
}
|
@@ -2967,7 +3396,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
2967
3396
|
}, _callee14, this);
|
2968
3397
|
}));
|
2969
3398
|
|
2970
|
-
function createConsultationAttachmentData(_x35, _x36, _x37, _x38, _x39, _x40) {
|
3399
|
+
function createConsultationAttachmentData(_x35, _x36, _x37, _x38, _x39, _x40, _x41) {
|
2971
3400
|
return _createConsultationAttachmentData.apply(this, arguments);
|
2972
3401
|
}
|
2973
3402
|
|
@@ -2982,6 +3411,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
2982
3411
|
* @param privateMeta the metadata that will be secured in the vault
|
2983
3412
|
* @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
|
2984
3413
|
* @param previousDataUuid if it's a revision of existing data, specify the previous data uuid
|
3414
|
+
* @param withNotification if the insertion of data requires notification
|
2985
3415
|
* @returns the data uuid
|
2986
3416
|
*/
|
2987
3417
|
;
|
@@ -2989,24 +3419,28 @@ var OroClient = /*#__PURE__*/function () {
|
|
2989
3419
|
_proto.createJsonData =
|
2990
3420
|
/*#__PURE__*/
|
2991
3421
|
function () {
|
2992
|
-
var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3422
|
+
var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee15(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid, withNotification) {
|
2993
3423
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
|
2994
|
-
return
|
3424
|
+
return runtime_1.wrap(function _callee15$(_context15) {
|
2995
3425
|
while (1) {
|
2996
3426
|
switch (_context15.prev = _context15.next) {
|
2997
3427
|
case 0:
|
3428
|
+
if (withNotification === void 0) {
|
3429
|
+
withNotification = false;
|
3430
|
+
}
|
3431
|
+
|
2998
3432
|
if (this.rsa) {
|
2999
|
-
_context15.next =
|
3433
|
+
_context15.next = 3;
|
3000
3434
|
break;
|
3001
3435
|
}
|
3002
3436
|
|
3003
3437
|
throw IncompleteAuthentication;
|
3004
3438
|
|
3005
|
-
case
|
3006
|
-
_context15.next =
|
3439
|
+
case 3:
|
3440
|
+
_context15.next = 5;
|
3007
3441
|
return this.getCachedSecretCryptor(lockboxUuid, lockboxOwnerUuid);
|
3008
3442
|
|
3009
|
-
case
|
3443
|
+
case 5:
|
3010
3444
|
symmetricEncryptor = _context15.sent;
|
3011
3445
|
encryptedData = symmetricEncryptor.jsonEncryptToBase64Payload(data);
|
3012
3446
|
encryptedPrivateMeta = symmetricEncryptor.jsonEncryptToBase64Payload(privateMeta);
|
@@ -3015,9 +3449,18 @@ var OroClient = /*#__PURE__*/function () {
|
|
3015
3449
|
publicMetadata: meta,
|
3016
3450
|
privateMetadata: encryptedPrivateMeta
|
3017
3451
|
};
|
3452
|
+
|
3453
|
+
if (!withNotification) {
|
3454
|
+
_context15.next = 13;
|
3455
|
+
break;
|
3456
|
+
}
|
3457
|
+
|
3018
3458
|
return _context15.abrupt("return", this.tellerClient.lockboxDataStore(lockboxUuid, request, lockboxOwnerUuid, previousDataUuid));
|
3019
3459
|
|
3020
|
-
case
|
3460
|
+
case 13:
|
3461
|
+
return _context15.abrupt("return", this.vaultClient.lockboxDataStore(lockboxUuid, request, lockboxOwnerUuid, previousDataUuid));
|
3462
|
+
|
3463
|
+
case 14:
|
3021
3464
|
case "end":
|
3022
3465
|
return _context15.stop();
|
3023
3466
|
}
|
@@ -3025,7 +3468,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3025
3468
|
}, _callee15, this);
|
3026
3469
|
}));
|
3027
3470
|
|
3028
|
-
function createJsonData(
|
3471
|
+
function createJsonData(_x42, _x43, _x44, _x45, _x46, _x47, _x48) {
|
3029
3472
|
return _createJsonData.apply(this, arguments);
|
3030
3473
|
}
|
3031
3474
|
|
@@ -3038,6 +3481,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3038
3481
|
* @param publicMetadata the public Metadata
|
3039
3482
|
* @param privateMetadata the private Metadata
|
3040
3483
|
* @param forceReplace set true when the insertion of data requires to replace the data when it exists already
|
3484
|
+
* @param withNotification if the insertion of data requires notification
|
3041
3485
|
* @returns the data uuid
|
3042
3486
|
*/
|
3043
3487
|
;
|
@@ -3045,9 +3489,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3045
3489
|
_proto.getOrInsertJsonData =
|
3046
3490
|
/*#__PURE__*/
|
3047
3491
|
function () {
|
3048
|
-
var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3492
|
+
var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee16(lockboxUuid, data, publicMetadata, privateMetadata, forceReplace, withNotification) {
|
3049
3493
|
var manifest;
|
3050
|
-
return
|
3494
|
+
return runtime_1.wrap(function _callee16$(_context16) {
|
3051
3495
|
while (1) {
|
3052
3496
|
switch (_context16.prev = _context16.next) {
|
3053
3497
|
case 0:
|
@@ -3055,32 +3499,36 @@ var OroClient = /*#__PURE__*/function () {
|
|
3055
3499
|
forceReplace = false;
|
3056
3500
|
}
|
3057
3501
|
|
3058
|
-
|
3502
|
+
if (withNotification === void 0) {
|
3503
|
+
withNotification = false;
|
3504
|
+
}
|
3505
|
+
|
3506
|
+
_context16.next = 4;
|
3059
3507
|
return this.vaultClient.lockboxManifestGet(lockboxUuid, publicMetadata);
|
3060
3508
|
|
3061
|
-
case
|
3509
|
+
case 4:
|
3062
3510
|
manifest = _context16.sent;
|
3063
3511
|
|
3064
3512
|
if (!(!forceReplace && manifest.length > 0)) {
|
3065
|
-
_context16.next =
|
3513
|
+
_context16.next = 10;
|
3066
3514
|
break;
|
3067
3515
|
}
|
3068
3516
|
|
3069
3517
|
console.log("The data for " + JSON.stringify(publicMetadata) + " already exist");
|
3070
3518
|
return _context16.abrupt("return", manifest[0].dataUuid);
|
3071
3519
|
|
3072
|
-
case
|
3073
|
-
_context16.next =
|
3074
|
-
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
|
3075
|
-
)["catch"](function (err) {
|
3520
|
+
case 10:
|
3521
|
+
_context16.next = 12;
|
3522
|
+
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
|
3523
|
+
withNotification)["catch"](function (err) {
|
3076
3524
|
console.error("Error while upserting data " + JSON.stringify(publicMetadata) + " data", err);
|
3077
3525
|
throw err;
|
3078
3526
|
});
|
3079
3527
|
|
3080
|
-
case
|
3528
|
+
case 12:
|
3081
3529
|
return _context16.abrupt("return", _context16.sent.dataUuid);
|
3082
3530
|
|
3083
|
-
case
|
3531
|
+
case 13:
|
3084
3532
|
case "end":
|
3085
3533
|
return _context16.stop();
|
3086
3534
|
}
|
@@ -3088,7 +3536,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3088
3536
|
}, _callee16, this);
|
3089
3537
|
}));
|
3090
3538
|
|
3091
|
-
function getOrInsertJsonData(
|
3539
|
+
function getOrInsertJsonData(_x49, _x50, _x51, _x52, _x53, _x54) {
|
3092
3540
|
return _getOrInsertJsonData.apply(this, arguments);
|
3093
3541
|
}
|
3094
3542
|
|
@@ -3103,6 +3551,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3103
3551
|
* @param privateMeta the metadata that will be secured in the vault
|
3104
3552
|
* @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
|
3105
3553
|
* @param previousDataUuid if it's a revision of existing data, specify the previous data uuid
|
3554
|
+
* @param withNotification if the insertion of data requires notification
|
3106
3555
|
* @returns the data uuid
|
3107
3556
|
*/
|
3108
3557
|
;
|
@@ -3110,24 +3559,28 @@ var OroClient = /*#__PURE__*/function () {
|
|
3110
3559
|
_proto.createBytesData =
|
3111
3560
|
/*#__PURE__*/
|
3112
3561
|
function () {
|
3113
|
-
var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3562
|
+
var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee17(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid, withNotification) {
|
3114
3563
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
|
3115
|
-
return
|
3564
|
+
return runtime_1.wrap(function _callee17$(_context17) {
|
3116
3565
|
while (1) {
|
3117
3566
|
switch (_context17.prev = _context17.next) {
|
3118
3567
|
case 0:
|
3568
|
+
if (withNotification === void 0) {
|
3569
|
+
withNotification = false;
|
3570
|
+
}
|
3571
|
+
|
3119
3572
|
if (this.rsa) {
|
3120
|
-
_context17.next =
|
3573
|
+
_context17.next = 3;
|
3121
3574
|
break;
|
3122
3575
|
}
|
3123
3576
|
|
3124
3577
|
throw IncompleteAuthentication;
|
3125
3578
|
|
3126
|
-
case
|
3127
|
-
_context17.next =
|
3579
|
+
case 3:
|
3580
|
+
_context17.next = 5;
|
3128
3581
|
return this.getCachedSecretCryptor(lockboxUuid, lockboxOwnerUuid);
|
3129
3582
|
|
3130
|
-
case
|
3583
|
+
case 5:
|
3131
3584
|
symmetricEncryptor = _context17.sent;
|
3132
3585
|
encryptedData = symmetricEncryptor.bytesEncryptToBase64Payload(data);
|
3133
3586
|
encryptedPrivateMeta = symmetricEncryptor.jsonEncryptToBase64Payload(privateMeta);
|
@@ -3136,9 +3589,18 @@ var OroClient = /*#__PURE__*/function () {
|
|
3136
3589
|
publicMetadata: meta,
|
3137
3590
|
privateMetadata: encryptedPrivateMeta
|
3138
3591
|
};
|
3592
|
+
|
3593
|
+
if (!withNotification) {
|
3594
|
+
_context17.next = 13;
|
3595
|
+
break;
|
3596
|
+
}
|
3597
|
+
|
3139
3598
|
return _context17.abrupt("return", this.tellerClient.lockboxDataStore(lockboxUuid, request, lockboxOwnerUuid, previousDataUuid));
|
3140
3599
|
|
3141
|
-
case
|
3600
|
+
case 13:
|
3601
|
+
return _context17.abrupt("return", this.vaultClient.lockboxDataStore(lockboxUuid, request, lockboxOwnerUuid, previousDataUuid));
|
3602
|
+
|
3603
|
+
case 14:
|
3142
3604
|
case "end":
|
3143
3605
|
return _context17.stop();
|
3144
3606
|
}
|
@@ -3146,7 +3608,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3146
3608
|
}, _callee17, this);
|
3147
3609
|
}));
|
3148
3610
|
|
3149
|
-
function createBytesData(
|
3611
|
+
function createBytesData(_x55, _x56, _x57, _x58, _x59, _x60, _x61) {
|
3150
3612
|
return _createBytesData.apply(this, arguments);
|
3151
3613
|
}
|
3152
3614
|
|
@@ -3168,10 +3630,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
3168
3630
|
_proto.getJsonData =
|
3169
3631
|
/*#__PURE__*/
|
3170
3632
|
function () {
|
3171
|
-
var _getJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3633
|
+
var _getJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee18(lockboxUuid, dataUuid, lockboxOwnerUuid) {
|
3172
3634
|
var _yield$Promise$all, encryptedPayload, symmetricDecryptor;
|
3173
3635
|
|
3174
|
-
return
|
3636
|
+
return runtime_1.wrap(function _callee18$(_context18) {
|
3175
3637
|
while (1) {
|
3176
3638
|
switch (_context18.prev = _context18.next) {
|
3177
3639
|
case 0:
|
@@ -3200,7 +3662,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3200
3662
|
}, _callee18, this);
|
3201
3663
|
}));
|
3202
3664
|
|
3203
|
-
function getJsonData(
|
3665
|
+
function getJsonData(_x62, _x63, _x64) {
|
3204
3666
|
return _getJsonData.apply(this, arguments);
|
3205
3667
|
}
|
3206
3668
|
|
@@ -3218,10 +3680,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
3218
3680
|
_proto.getBytesData =
|
3219
3681
|
/*#__PURE__*/
|
3220
3682
|
function () {
|
3221
|
-
var _getBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3683
|
+
var _getBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee19(lockboxUuid, dataUuid, lockboxOwnerUuid) {
|
3222
3684
|
var _yield$Promise$all2, encryptedPayload, symmetricDecryptor;
|
3223
3685
|
|
3224
|
-
return
|
3686
|
+
return runtime_1.wrap(function _callee19$(_context19) {
|
3225
3687
|
while (1) {
|
3226
3688
|
switch (_context19.prev = _context19.next) {
|
3227
3689
|
case 0:
|
@@ -3250,7 +3712,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3250
3712
|
}, _callee19, this);
|
3251
3713
|
}));
|
3252
3714
|
|
3253
|
-
function getBytesData(
|
3715
|
+
function getBytesData(_x65, _x66, _x67) {
|
3254
3716
|
return _getBytesData.apply(this, arguments);
|
3255
3717
|
}
|
3256
3718
|
|
@@ -3271,9 +3733,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3271
3733
|
_proto.getGrants =
|
3272
3734
|
/*#__PURE__*/
|
3273
3735
|
function () {
|
3274
|
-
var _getGrants = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3736
|
+
var _getGrants = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee20(filter) {
|
3275
3737
|
var filterString, currentAccountRole, encryptedGrants, decryptedGrants, grantsByConsultLockbox, decryptedConsults;
|
3276
|
-
return
|
3738
|
+
return runtime_1.wrap(function _callee20$(_context20) {
|
3277
3739
|
while (1) {
|
3278
3740
|
switch (_context20.prev = _context20.next) {
|
3279
3741
|
case 0:
|
@@ -3388,7 +3850,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3388
3850
|
}, _callee20, this);
|
3389
3851
|
}));
|
3390
3852
|
|
3391
|
-
function getGrants(
|
3853
|
+
function getGrants(_x68) {
|
3392
3854
|
return _getGrants.apply(this, arguments);
|
3393
3855
|
}
|
3394
3856
|
|
@@ -3404,8 +3866,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
3404
3866
|
_proto.getAccountRole =
|
3405
3867
|
/*#__PURE__*/
|
3406
3868
|
function () {
|
3407
|
-
var _getAccountRole = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3408
|
-
return
|
3869
|
+
var _getAccountRole = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee21() {
|
3870
|
+
return runtime_1.wrap(function _callee21$(_context21) {
|
3409
3871
|
while (1) {
|
3410
3872
|
switch (_context21.prev = _context21.next) {
|
3411
3873
|
case 0:
|
@@ -3441,9 +3903,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3441
3903
|
_proto.getCachedSecretCryptor =
|
3442
3904
|
/*#__PURE__*/
|
3443
3905
|
function () {
|
3444
|
-
var _getCachedSecretCryptor = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3906
|
+
var _getCachedSecretCryptor = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee22(lockboxUuid, lockboxOwnerUuid) {
|
3445
3907
|
var index, encryptedSecret, secret, cryptor;
|
3446
|
-
return
|
3908
|
+
return runtime_1.wrap(function _callee22$(_context22) {
|
3447
3909
|
while (1) {
|
3448
3910
|
switch (_context22.prev = _context22.next) {
|
3449
3911
|
case 0:
|
@@ -3488,7 +3950,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3488
3950
|
}, _callee22, this);
|
3489
3951
|
}));
|
3490
3952
|
|
3491
|
-
function getCachedSecretCryptor(
|
3953
|
+
function getCachedSecretCryptor(_x69, _x70) {
|
3492
3954
|
return _getCachedSecretCryptor.apply(this, arguments);
|
3493
3955
|
}
|
3494
3956
|
|
@@ -3508,8 +3970,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
3508
3970
|
_proto.getPersonalInformationsFromConsultId =
|
3509
3971
|
/*#__PURE__*/
|
3510
3972
|
function () {
|
3511
|
-
var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3512
|
-
return
|
3973
|
+
var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee23(consultationId, category, forceRefresh) {
|
3974
|
+
return runtime_1.wrap(function _callee23$(_context23) {
|
3513
3975
|
while (1) {
|
3514
3976
|
switch (_context23.prev = _context23.next) {
|
3515
3977
|
case 0:
|
@@ -3527,7 +3989,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3527
3989
|
}, _callee23, this);
|
3528
3990
|
}));
|
3529
3991
|
|
3530
|
-
function getPersonalInformationsFromConsultId(
|
3992
|
+
function getPersonalInformationsFromConsultId(_x71, _x72, _x73) {
|
3531
3993
|
return _getPersonalInformationsFromConsultId.apply(this, arguments);
|
3532
3994
|
}
|
3533
3995
|
|
@@ -3546,8 +4008,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
3546
4008
|
_proto.getMedicalDataFromConsultId =
|
3547
4009
|
/*#__PURE__*/
|
3548
4010
|
function () {
|
3549
|
-
var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3550
|
-
return
|
4011
|
+
var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee24(consultationId, forceRefresh) {
|
4012
|
+
return runtime_1.wrap(function _callee24$(_context24) {
|
3551
4013
|
while (1) {
|
3552
4014
|
switch (_context24.prev = _context24.next) {
|
3553
4015
|
case 0:
|
@@ -3565,7 +4027,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3565
4027
|
}, _callee24, this);
|
3566
4028
|
}));
|
3567
4029
|
|
3568
|
-
function getMedicalDataFromConsultId(
|
4030
|
+
function getMedicalDataFromConsultId(_x74, _x75) {
|
3569
4031
|
return _getMedicalDataFromConsultId.apply(this, arguments);
|
3570
4032
|
}
|
3571
4033
|
|
@@ -3573,12 +4035,12 @@ var OroClient = /*#__PURE__*/function () {
|
|
3573
4035
|
}();
|
3574
4036
|
|
3575
4037
|
_proto.getMetaCategoryFromConsultId = /*#__PURE__*/function () {
|
3576
|
-
var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4038
|
+
var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee26(consultationId, category, forceRefresh) {
|
3577
4039
|
var _this2 = this;
|
3578
4040
|
|
3579
4041
|
var grants, workflowData, _loop, _iterator, _step;
|
3580
4042
|
|
3581
|
-
return
|
4043
|
+
return runtime_1.wrap(function _callee26$(_context27) {
|
3582
4044
|
while (1) {
|
3583
4045
|
switch (_context27.prev = _context27.next) {
|
3584
4046
|
case 0:
|
@@ -3594,9 +4056,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3594
4056
|
case 3:
|
3595
4057
|
grants = _context27.sent;
|
3596
4058
|
workflowData = [];
|
3597
|
-
_loop = /*#__PURE__*/
|
4059
|
+
_loop = /*#__PURE__*/runtime_1.mark(function _loop() {
|
3598
4060
|
var grant, manifest, data;
|
3599
|
-
return
|
4061
|
+
return runtime_1.wrap(function _loop$(_context26) {
|
3600
4062
|
while (1) {
|
3601
4063
|
switch (_context26.prev = _context26.next) {
|
3602
4064
|
case 0:
|
@@ -3630,8 +4092,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
3630
4092
|
case 8:
|
3631
4093
|
_context26.next = 10;
|
3632
4094
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
3633
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/
|
3634
|
-
return
|
4095
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee25(entry) {
|
4096
|
+
return runtime_1.wrap(function _callee25$(_context25) {
|
3635
4097
|
while (1) {
|
3636
4098
|
switch (_context25.prev = _context25.next) {
|
3637
4099
|
case 0:
|
@@ -3658,7 +4120,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3658
4120
|
}, _callee25);
|
3659
4121
|
}));
|
3660
4122
|
|
3661
|
-
return function (
|
4123
|
+
return function (_x79) {
|
3662
4124
|
return _ref3.apply(this, arguments);
|
3663
4125
|
};
|
3664
4126
|
}()));
|
@@ -3699,7 +4161,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3699
4161
|
}, _callee26, this);
|
3700
4162
|
}));
|
3701
4163
|
|
3702
|
-
function getMetaCategoryFromConsultId(
|
4164
|
+
function getMetaCategoryFromConsultId(_x76, _x77, _x78) {
|
3703
4165
|
return _getMetaCategoryFromConsultId.apply(this, arguments);
|
3704
4166
|
}
|
3705
4167
|
|
@@ -3715,9 +4177,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3715
4177
|
_proto.getPersonalInformations =
|
3716
4178
|
/*#__PURE__*/
|
3717
4179
|
function () {
|
3718
|
-
var _getPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4180
|
+
var _getPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee27(userId) {
|
3719
4181
|
var grant, lockboxUuid, lockboxOwnerUuid, identificationDataUuid;
|
3720
|
-
return
|
4182
|
+
return runtime_1.wrap(function _callee27$(_context28) {
|
3721
4183
|
while (1) {
|
3722
4184
|
switch (_context28.prev = _context28.next) {
|
3723
4185
|
case 0:
|
@@ -3786,7 +4248,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3786
4248
|
}, _callee27, this);
|
3787
4249
|
}));
|
3788
4250
|
|
3789
|
-
function getPersonalInformations(
|
4251
|
+
function getPersonalInformations(_x80) {
|
3790
4252
|
return _getPersonalInformations.apply(this, arguments);
|
3791
4253
|
}
|
3792
4254
|
|
@@ -3803,9 +4265,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3803
4265
|
_proto.getGrantFromConsultId =
|
3804
4266
|
/*#__PURE__*/
|
3805
4267
|
function () {
|
3806
|
-
var _getGrantFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4268
|
+
var _getGrantFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee28(consultationId) {
|
3807
4269
|
var grants;
|
3808
|
-
return
|
4270
|
+
return runtime_1.wrap(function _callee28$(_context29) {
|
3809
4271
|
while (1) {
|
3810
4272
|
switch (_context29.prev = _context29.next) {
|
3811
4273
|
case 0:
|
@@ -3835,7 +4297,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3835
4297
|
}, _callee28, this);
|
3836
4298
|
}));
|
3837
4299
|
|
3838
|
-
function getGrantFromConsultId(
|
4300
|
+
function getGrantFromConsultId(_x81) {
|
3839
4301
|
return _getGrantFromConsultId.apply(this, arguments);
|
3840
4302
|
}
|
3841
4303
|
|
@@ -3851,9 +4313,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3851
4313
|
_proto.getIdentityFromConsultId =
|
3852
4314
|
/*#__PURE__*/
|
3853
4315
|
function () {
|
3854
|
-
var _getIdentityFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4316
|
+
var _getIdentityFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee29(consultationId) {
|
3855
4317
|
var grant;
|
3856
|
-
return
|
4318
|
+
return runtime_1.wrap(function _callee29$(_context30) {
|
3857
4319
|
while (1) {
|
3858
4320
|
switch (_context30.prev = _context30.next) {
|
3859
4321
|
case 0:
|
@@ -3885,7 +4347,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3885
4347
|
}, _callee29, this);
|
3886
4348
|
}));
|
3887
4349
|
|
3888
|
-
function getIdentityFromConsultId(
|
4350
|
+
function getIdentityFromConsultId(_x82) {
|
3889
4351
|
return _getIdentityFromConsultId.apply(this, arguments);
|
3890
4352
|
}
|
3891
4353
|
|
@@ -3906,11 +4368,11 @@ var OroClient = /*#__PURE__*/function () {
|
|
3906
4368
|
_proto.getLockboxManifest =
|
3907
4369
|
/*#__PURE__*/
|
3908
4370
|
function () {
|
3909
|
-
var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4371
|
+
var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee31(lockboxUuid, filter, expandPrivateMetadata, lockboxOwnerUuid, forceRefresh) {
|
3910
4372
|
var _this3 = this;
|
3911
4373
|
|
3912
4374
|
var manifestKey;
|
3913
|
-
return
|
4375
|
+
return runtime_1.wrap(function _callee31$(_context32) {
|
3914
4376
|
while (1) {
|
3915
4377
|
switch (_context32.prev = _context32.next) {
|
3916
4378
|
case 0:
|
@@ -3935,9 +4397,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3935
4397
|
case 4:
|
3936
4398
|
return _context32.abrupt("return", this.vaultClient.lockboxManifestGet(lockboxUuid, filter, lockboxOwnerUuid).then(function (manifest) {
|
3937
4399
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
3938
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/
|
4400
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee30(entry) {
|
3939
4401
|
var privateMeta;
|
3940
|
-
return
|
4402
|
+
return runtime_1.wrap(function _callee30$(_context31) {
|
3941
4403
|
while (1) {
|
3942
4404
|
switch (_context31.prev = _context31.next) {
|
3943
4405
|
case 0:
|
@@ -3964,7 +4426,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3964
4426
|
}, _callee30);
|
3965
4427
|
}));
|
3966
4428
|
|
3967
|
-
return function (
|
4429
|
+
return function (_x88) {
|
3968
4430
|
return _ref4.apply(this, arguments);
|
3969
4431
|
};
|
3970
4432
|
}())).then(function (manifest) {
|
@@ -3980,7 +4442,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3980
4442
|
}, _callee31, this);
|
3981
4443
|
}));
|
3982
4444
|
|
3983
|
-
function getLockboxManifest(
|
4445
|
+
function getLockboxManifest(_x83, _x84, _x85, _x86, _x87) {
|
3984
4446
|
return _getLockboxManifest.apply(this, arguments);
|
3985
4447
|
}
|
3986
4448
|
|
@@ -3998,11 +4460,11 @@ var OroClient = /*#__PURE__*/function () {
|
|
3998
4460
|
_proto.createPersonalInformations =
|
3999
4461
|
/*#__PURE__*/
|
4000
4462
|
function () {
|
4001
|
-
var _createPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4463
|
+
var _createPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee32(identity, data, dataUuid) {
|
4002
4464
|
var _yield$this$getGrants;
|
4003
4465
|
|
4004
4466
|
var lockboxUuid;
|
4005
|
-
return
|
4467
|
+
return runtime_1.wrap(function _callee32$(_context33) {
|
4006
4468
|
while (1) {
|
4007
4469
|
switch (_context33.prev = _context33.next) {
|
4008
4470
|
case 0:
|
@@ -4050,7 +4512,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4050
4512
|
}, _callee32, this);
|
4051
4513
|
}));
|
4052
4514
|
|
4053
|
-
function createPersonalInformations(
|
4515
|
+
function createPersonalInformations(_x89, _x90, _x91) {
|
4054
4516
|
return _createPersonalInformations.apply(this, arguments);
|
4055
4517
|
}
|
4056
4518
|
|
@@ -4068,11 +4530,11 @@ var OroClient = /*#__PURE__*/function () {
|
|
4068
4530
|
_proto.createUserPreference =
|
4069
4531
|
/*#__PURE__*/
|
4070
4532
|
function () {
|
4071
|
-
var _createUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4533
|
+
var _createUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee33(identity, preference, dataUuid) {
|
4072
4534
|
var _yield$this$getGrants2;
|
4073
4535
|
|
4074
4536
|
var lockboxUuid;
|
4075
|
-
return
|
4537
|
+
return runtime_1.wrap(function _callee33$(_context34) {
|
4076
4538
|
while (1) {
|
4077
4539
|
switch (_context34.prev = _context34.next) {
|
4078
4540
|
case 0:
|
@@ -4120,7 +4582,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4120
4582
|
}, _callee33, this);
|
4121
4583
|
}));
|
4122
4584
|
|
4123
|
-
function createUserPreference(
|
4585
|
+
function createUserPreference(_x92, _x93, _x94) {
|
4124
4586
|
return _createUserPreference.apply(this, arguments);
|
4125
4587
|
}
|
4126
4588
|
|
@@ -4136,9 +4598,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4136
4598
|
_proto.getDataFromGrant =
|
4137
4599
|
/*#__PURE__*/
|
4138
4600
|
function () {
|
4139
|
-
var _getDataFromGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4601
|
+
var _getDataFromGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee34(grant, filter) {
|
4140
4602
|
var lockboxUuid, lockboxOwnerUuid, identificationDataUuid;
|
4141
|
-
return
|
4603
|
+
return runtime_1.wrap(function _callee34$(_context35) {
|
4142
4604
|
while (1) {
|
4143
4605
|
switch (_context35.prev = _context35.next) {
|
4144
4606
|
case 0:
|
@@ -4188,7 +4650,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4188
4650
|
}, _callee34, this);
|
4189
4651
|
}));
|
4190
4652
|
|
4191
|
-
function getDataFromGrant(
|
4653
|
+
function getDataFromGrant(_x95, _x96) {
|
4192
4654
|
return _getDataFromGrant.apply(this, arguments);
|
4193
4655
|
}
|
4194
4656
|
|
@@ -4204,9 +4666,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4204
4666
|
_proto.getUserPreferenceFromConsultId =
|
4205
4667
|
/*#__PURE__*/
|
4206
4668
|
function () {
|
4207
|
-
var _getUserPreferenceFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4669
|
+
var _getUserPreferenceFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee35(consultationId) {
|
4208
4670
|
var grant;
|
4209
|
-
return
|
4671
|
+
return runtime_1.wrap(function _callee35$(_context36) {
|
4210
4672
|
while (1) {
|
4211
4673
|
switch (_context36.prev = _context36.next) {
|
4212
4674
|
case 0:
|
@@ -4237,7 +4699,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4237
4699
|
}, _callee35, this);
|
4238
4700
|
}));
|
4239
4701
|
|
4240
|
-
function getUserPreferenceFromConsultId(
|
4702
|
+
function getUserPreferenceFromConsultId(_x97) {
|
4241
4703
|
return _getUserPreferenceFromConsultId.apply(this, arguments);
|
4242
4704
|
}
|
4243
4705
|
|
@@ -4253,9 +4715,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4253
4715
|
_proto.getUserPreference =
|
4254
4716
|
/*#__PURE__*/
|
4255
4717
|
function () {
|
4256
|
-
var _getUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4718
|
+
var _getUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee36(identity) {
|
4257
4719
|
var grant;
|
4258
|
-
return
|
4720
|
+
return runtime_1.wrap(function _callee36$(_context37) {
|
4259
4721
|
while (1) {
|
4260
4722
|
switch (_context37.prev = _context37.next) {
|
4261
4723
|
case 0:
|
@@ -4288,7 +4750,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4288
4750
|
}, _callee36, this);
|
4289
4751
|
}));
|
4290
4752
|
|
4291
|
-
function getUserPreference(
|
4753
|
+
function getUserPreference(_x98) {
|
4292
4754
|
return _getUserPreference.apply(this, arguments);
|
4293
4755
|
}
|
4294
4756
|
|
@@ -4304,9 +4766,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4304
4766
|
_proto.getRecoveryDataFromConsultId =
|
4305
4767
|
/*#__PURE__*/
|
4306
4768
|
function () {
|
4307
|
-
var _getRecoveryDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4769
|
+
var _getRecoveryDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee37(consultationId) {
|
4308
4770
|
var grant;
|
4309
|
-
return
|
4771
|
+
return runtime_1.wrap(function _callee37$(_context38) {
|
4310
4772
|
while (1) {
|
4311
4773
|
switch (_context38.prev = _context38.next) {
|
4312
4774
|
case 0:
|
@@ -4337,7 +4799,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4337
4799
|
}, _callee37, this);
|
4338
4800
|
}));
|
4339
4801
|
|
4340
|
-
function getRecoveryDataFromConsultId(
|
4802
|
+
function getRecoveryDataFromConsultId(_x99) {
|
4341
4803
|
return _getRecoveryDataFromConsultId.apply(this, arguments);
|
4342
4804
|
}
|
4343
4805
|
|
@@ -4353,9 +4815,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4353
4815
|
_proto.getRecoveryData =
|
4354
4816
|
/*#__PURE__*/
|
4355
4817
|
function () {
|
4356
|
-
var _getRecoveryData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4818
|
+
var _getRecoveryData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee38(identity) {
|
4357
4819
|
var grant;
|
4358
|
-
return
|
4820
|
+
return runtime_1.wrap(function _callee38$(_context39) {
|
4359
4821
|
while (1) {
|
4360
4822
|
switch (_context39.prev = _context39.next) {
|
4361
4823
|
case 0:
|
@@ -4388,7 +4850,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4388
4850
|
}, _callee38, this);
|
4389
4851
|
}));
|
4390
4852
|
|
4391
|
-
function getRecoveryData(
|
4853
|
+
function getRecoveryData(_x100) {
|
4392
4854
|
return _getRecoveryData.apply(this, arguments);
|
4393
4855
|
}
|
4394
4856
|
|
@@ -4409,10 +4871,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
4409
4871
|
_proto.getAssignedConsultations =
|
4410
4872
|
/*#__PURE__*/
|
4411
4873
|
function () {
|
4412
|
-
var _getAssignedConsultations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4874
|
+
var _getAssignedConsultations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee40(practiceUuid) {
|
4413
4875
|
var _this4 = this;
|
4414
4876
|
|
4415
|
-
return
|
4877
|
+
return runtime_1.wrap(function _callee40$(_context41) {
|
4416
4878
|
while (1) {
|
4417
4879
|
switch (_context41.prev = _context41.next) {
|
4418
4880
|
case 0:
|
@@ -4427,8 +4889,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4427
4889
|
documentType: initApis.DocumentType.PopulatedWorkflowData
|
4428
4890
|
}, true, undefined).then(function (manifest) {
|
4429
4891
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
4430
|
-
var _ref5 = _asyncToGenerator( /*#__PURE__*/
|
4431
|
-
return
|
4892
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee39(entry) {
|
4893
|
+
return runtime_1.wrap(function _callee39$(_context40) {
|
4432
4894
|
while (1) {
|
4433
4895
|
switch (_context40.prev = _context40.next) {
|
4434
4896
|
case 0:
|
@@ -4446,7 +4908,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4446
4908
|
}, _callee39);
|
4447
4909
|
}));
|
4448
4910
|
|
4449
|
-
return function (
|
4911
|
+
return function (_x102) {
|
4450
4912
|
return _ref5.apply(this, arguments);
|
4451
4913
|
};
|
4452
4914
|
}())).then(function (promise) {
|
@@ -4466,7 +4928,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4466
4928
|
}, _callee40, this);
|
4467
4929
|
}));
|
4468
4930
|
|
4469
|
-
function getAssignedConsultations(
|
4931
|
+
function getAssignedConsultations(_x101) {
|
4470
4932
|
return _getAssignedConsultations.apply(this, arguments);
|
4471
4933
|
}
|
4472
4934
|
|
@@ -4482,11 +4944,11 @@ var OroClient = /*#__PURE__*/function () {
|
|
4482
4944
|
_proto.getPastConsultationsFromConsultId =
|
4483
4945
|
/*#__PURE__*/
|
4484
4946
|
function () {
|
4485
|
-
var _getPastConsultationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4947
|
+
var _getPastConsultationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee42(consultationId, practiceUuid) {
|
4486
4948
|
var _this5 = this;
|
4487
4949
|
|
4488
4950
|
var grant, consultationsInLockbox;
|
4489
|
-
return
|
4951
|
+
return runtime_1.wrap(function _callee42$(_context43) {
|
4490
4952
|
while (1) {
|
4491
4953
|
switch (_context43.prev = _context43.next) {
|
4492
4954
|
case 0:
|
@@ -4525,8 +4987,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4525
4987
|
case 10:
|
4526
4988
|
_context43.next = 12;
|
4527
4989
|
return Promise.all(consultationsInLockbox.map( /*#__PURE__*/function () {
|
4528
|
-
var _ref6 = _asyncToGenerator( /*#__PURE__*/
|
4529
|
-
return
|
4990
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee41(consultId) {
|
4991
|
+
return runtime_1.wrap(function _callee41$(_context42) {
|
4530
4992
|
while (1) {
|
4531
4993
|
switch (_context42.prev = _context42.next) {
|
4532
4994
|
case 0:
|
@@ -4544,7 +5006,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4544
5006
|
}, _callee41);
|
4545
5007
|
}));
|
4546
5008
|
|
4547
|
-
return function (
|
5009
|
+
return function (_x105) {
|
4548
5010
|
return _ref6.apply(this, arguments);
|
4549
5011
|
};
|
4550
5012
|
}()));
|
@@ -4560,7 +5022,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4560
5022
|
}, _callee42, this);
|
4561
5023
|
}));
|
4562
5024
|
|
4563
|
-
function getPastConsultationsFromConsultId(
|
5025
|
+
function getPastConsultationsFromConsultId(_x103, _x104) {
|
4564
5026
|
return _getPastConsultationsFromConsultId.apply(this, arguments);
|
4565
5027
|
}
|
4566
5028
|
|
@@ -4577,10 +5039,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
4577
5039
|
_proto.getPatientConsultationData =
|
4578
5040
|
/*#__PURE__*/
|
4579
5041
|
function () {
|
4580
|
-
var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5042
|
+
var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee43(consultationId, forceRefresh) {
|
4581
5043
|
var _this6 = this;
|
4582
5044
|
|
4583
|
-
return
|
5045
|
+
return runtime_1.wrap(function _callee43$(_context44) {
|
4584
5046
|
while (1) {
|
4585
5047
|
switch (_context44.prev = _context44.next) {
|
4586
5048
|
case 0:
|
@@ -4618,7 +5080,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4618
5080
|
}, _callee43, this);
|
4619
5081
|
}));
|
4620
5082
|
|
4621
|
-
function getPatientConsultationData(
|
5083
|
+
function getPatientConsultationData(_x106, _x107) {
|
4622
5084
|
return _getPatientConsultationData.apply(this, arguments);
|
4623
5085
|
}
|
4624
5086
|
|
@@ -4634,8 +5096,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4634
5096
|
_proto.getPatientPrescriptionsList =
|
4635
5097
|
/*#__PURE__*/
|
4636
5098
|
function () {
|
4637
|
-
var _getPatientPrescriptionsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4638
|
-
return
|
5099
|
+
var _getPatientPrescriptionsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee44(consultationId) {
|
5100
|
+
return runtime_1.wrap(function _callee44$(_context45) {
|
4639
5101
|
while (1) {
|
4640
5102
|
switch (_context45.prev = _context45.next) {
|
4641
5103
|
case 0:
|
@@ -4652,7 +5114,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4652
5114
|
}, _callee44, this);
|
4653
5115
|
}));
|
4654
5116
|
|
4655
|
-
function getPatientPrescriptionsList(
|
5117
|
+
function getPatientPrescriptionsList(_x108) {
|
4656
5118
|
return _getPatientPrescriptionsList.apply(this, arguments);
|
4657
5119
|
}
|
4658
5120
|
|
@@ -4668,8 +5130,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4668
5130
|
_proto.getPatientResultsList =
|
4669
5131
|
/*#__PURE__*/
|
4670
5132
|
function () {
|
4671
|
-
var _getPatientResultsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4672
|
-
return
|
5133
|
+
var _getPatientResultsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee45(consultationId) {
|
5134
|
+
return runtime_1.wrap(function _callee45$(_context46) {
|
4673
5135
|
while (1) {
|
4674
5136
|
switch (_context46.prev = _context46.next) {
|
4675
5137
|
case 0:
|
@@ -4686,7 +5148,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4686
5148
|
}, _callee45, this);
|
4687
5149
|
}));
|
4688
5150
|
|
4689
|
-
function getPatientResultsList(
|
5151
|
+
function getPatientResultsList(_x109) {
|
4690
5152
|
return _getPatientResultsList.apply(this, arguments);
|
4691
5153
|
}
|
4692
5154
|
|
@@ -4702,8 +5164,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4702
5164
|
_proto.getPatientTreatmentPlans =
|
4703
5165
|
/*#__PURE__*/
|
4704
5166
|
function () {
|
4705
|
-
var _getPatientTreatmentPlans = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4706
|
-
return
|
5167
|
+
var _getPatientTreatmentPlans = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee46(consultationId) {
|
5168
|
+
return runtime_1.wrap(function _callee46$(_context47) {
|
4707
5169
|
while (1) {
|
4708
5170
|
switch (_context47.prev = _context47.next) {
|
4709
5171
|
case 0:
|
@@ -4720,7 +5182,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4720
5182
|
}, _callee46, this);
|
4721
5183
|
}));
|
4722
5184
|
|
4723
|
-
function getPatientTreatmentPlans(
|
5185
|
+
function getPatientTreatmentPlans(_x110) {
|
4724
5186
|
return _getPatientTreatmentPlans.apply(this, arguments);
|
4725
5187
|
}
|
4726
5188
|
|
@@ -4737,8 +5199,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4737
5199
|
_proto.getPatientTreatmentPlanByUuid =
|
4738
5200
|
/*#__PURE__*/
|
4739
5201
|
function () {
|
4740
|
-
var _getPatientTreatmentPlanByUuid = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4741
|
-
return
|
5202
|
+
var _getPatientTreatmentPlanByUuid = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee47(consultationId, treatmentPlanId) {
|
5203
|
+
return runtime_1.wrap(function _callee47$(_context48) {
|
4742
5204
|
while (1) {
|
4743
5205
|
switch (_context48.prev = _context48.next) {
|
4744
5206
|
case 0:
|
@@ -4756,7 +5218,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4756
5218
|
}, _callee47, this);
|
4757
5219
|
}));
|
4758
5220
|
|
4759
|
-
function getPatientTreatmentPlanByUuid(
|
5221
|
+
function getPatientTreatmentPlanByUuid(_x111, _x112) {
|
4760
5222
|
return _getPatientTreatmentPlanByUuid.apply(this, arguments);
|
4761
5223
|
}
|
4762
5224
|
|
@@ -4776,10 +5238,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
4776
5238
|
_proto.getPatientDocumentsList =
|
4777
5239
|
/*#__PURE__*/
|
4778
5240
|
function () {
|
4779
|
-
var _getPatientDocumentsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5241
|
+
var _getPatientDocumentsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee49(filters, expandPrivateMetadata, consultationId) {
|
4780
5242
|
var _this7 = this;
|
4781
5243
|
|
4782
|
-
return
|
5244
|
+
return runtime_1.wrap(function _callee49$(_context50) {
|
4783
5245
|
while (1) {
|
4784
5246
|
switch (_context50.prev = _context50.next) {
|
4785
5247
|
case 0:
|
@@ -4795,8 +5257,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4795
5257
|
consultationId: consultationId
|
4796
5258
|
}), expandPrivateMetadata, grant.lockboxOwnerUuid, true).then(function (manifest) {
|
4797
5259
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
4798
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/
|
4799
|
-
return
|
5260
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee48(entry) {
|
5261
|
+
return runtime_1.wrap(function _callee48$(_context49) {
|
4800
5262
|
while (1) {
|
4801
5263
|
switch (_context49.prev = _context49.next) {
|
4802
5264
|
case 0:
|
@@ -4813,7 +5275,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4813
5275
|
}, _callee48);
|
4814
5276
|
}));
|
4815
5277
|
|
4816
|
-
return function (
|
5278
|
+
return function (_x116) {
|
4817
5279
|
return _ref7.apply(this, arguments);
|
4818
5280
|
};
|
4819
5281
|
}()));
|
@@ -4831,7 +5293,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4831
5293
|
}, _callee49, this);
|
4832
5294
|
}));
|
4833
5295
|
|
4834
|
-
function getPatientDocumentsList(
|
5296
|
+
function getPatientDocumentsList(_x113, _x114, _x115) {
|
4835
5297
|
return _getPatientDocumentsList.apply(this, arguments);
|
4836
5298
|
}
|
4837
5299
|
|
@@ -4854,9 +5316,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4854
5316
|
_proto.recoverPrivateKeyFromSecurityQuestions =
|
4855
5317
|
/*#__PURE__*/
|
4856
5318
|
function () {
|
4857
|
-
var _recoverPrivateKeyFromSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5319
|
+
var _recoverPrivateKeyFromSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee50(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
|
4858
5320
|
var shards, answeredShards, privateKey;
|
4859
|
-
return
|
5321
|
+
return runtime_1.wrap(function _callee50$(_context51) {
|
4860
5322
|
while (1) {
|
4861
5323
|
switch (_context51.prev = _context51.next) {
|
4862
5324
|
case 0:
|
@@ -4893,7 +5355,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4893
5355
|
}, _callee50, this);
|
4894
5356
|
}));
|
4895
5357
|
|
4896
|
-
function recoverPrivateKeyFromSecurityQuestions(
|
5358
|
+
function recoverPrivateKeyFromSecurityQuestions(_x117, _x118, _x119, _x120) {
|
4897
5359
|
return _recoverPrivateKeyFromSecurityQuestions.apply(this, arguments);
|
4898
5360
|
}
|
4899
5361
|
|
@@ -4910,9 +5372,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4910
5372
|
_proto.recoverPrivateKeyFromPassword =
|
4911
5373
|
/*#__PURE__*/
|
4912
5374
|
function () {
|
4913
|
-
var _recoverPrivateKeyFromPassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5375
|
+
var _recoverPrivateKeyFromPassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee51(id, password) {
|
4914
5376
|
var identity, recoveryPayload, symmetricDecryptor, privateKey, symetricEncryptor;
|
4915
|
-
return
|
5377
|
+
return runtime_1.wrap(function _callee51$(_context52) {
|
4916
5378
|
while (1) {
|
4917
5379
|
switch (_context52.prev = _context52.next) {
|
4918
5380
|
case 0:
|
@@ -4941,7 +5403,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4941
5403
|
}, _callee51, this);
|
4942
5404
|
}));
|
4943
5405
|
|
4944
|
-
function recoverPrivateKeyFromPassword(
|
5406
|
+
function recoverPrivateKeyFromPassword(_x121, _x122) {
|
4945
5407
|
return _recoverPrivateKeyFromPassword.apply(this, arguments);
|
4946
5408
|
}
|
4947
5409
|
|
@@ -4958,9 +5420,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4958
5420
|
_proto.recoverPrivateKeyFromMasterKey =
|
4959
5421
|
/*#__PURE__*/
|
4960
5422
|
function () {
|
4961
|
-
var _recoverPrivateKeyFromMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5423
|
+
var _recoverPrivateKeyFromMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee52(id, masterKey) {
|
4962
5424
|
var recoveryPayload, symmetricDecryptor, privateKey;
|
4963
|
-
return
|
5425
|
+
return runtime_1.wrap(function _callee52$(_context53) {
|
4964
5426
|
while (1) {
|
4965
5427
|
switch (_context53.prev = _context53.next) {
|
4966
5428
|
case 0:
|
@@ -4981,7 +5443,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4981
5443
|
}, _callee52, this);
|
4982
5444
|
}));
|
4983
5445
|
|
4984
|
-
function recoverPrivateKeyFromMasterKey(
|
5446
|
+
function recoverPrivateKeyFromMasterKey(_x123, _x124) {
|
4985
5447
|
return _recoverPrivateKeyFromMasterKey.apply(this, arguments);
|
4986
5448
|
}
|
4987
5449
|
|
@@ -5000,9 +5462,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
5000
5462
|
_proto.updateSecurityQuestions =
|
5001
5463
|
/*#__PURE__*/
|
5002
5464
|
function () {
|
5003
|
-
var _updateSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5465
|
+
var _updateSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee53(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
|
5004
5466
|
var securityQuestionPayload, updateRequest;
|
5005
|
-
return
|
5467
|
+
return runtime_1.wrap(function _callee53$(_context54) {
|
5006
5468
|
while (1) {
|
5007
5469
|
switch (_context54.prev = _context54.next) {
|
5008
5470
|
case 0:
|
@@ -5032,7 +5494,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
5032
5494
|
}, _callee53, this);
|
5033
5495
|
}));
|
5034
5496
|
|
5035
|
-
function updateSecurityQuestions(
|
5497
|
+
function updateSecurityQuestions(_x125, _x126, _x127, _x128) {
|
5036
5498
|
return _updateSecurityQuestions.apply(this, arguments);
|
5037
5499
|
}
|
5038
5500
|
|
@@ -5054,9 +5516,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
5054
5516
|
_proto.updatePassword =
|
5055
5517
|
/*#__PURE__*/
|
5056
5518
|
function () {
|
5057
|
-
var _updatePassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5519
|
+
var _updatePassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee54(id, newPassword, oldPassword) {
|
5058
5520
|
var symmetricEncryptor, passwordPayload, updateRequest;
|
5059
|
-
return
|
5521
|
+
return runtime_1.wrap(function _callee54$(_context55) {
|
5060
5522
|
while (1) {
|
5061
5523
|
switch (_context55.prev = _context55.next) {
|
5062
5524
|
case 0:
|
@@ -5097,7 +5559,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
5097
5559
|
}, _callee54, this);
|
5098
5560
|
}));
|
5099
5561
|
|
5100
|
-
function updatePassword(
|
5562
|
+
function updatePassword(_x129, _x130, _x131) {
|
5101
5563
|
return _updatePassword.apply(this, arguments);
|
5102
5564
|
}
|
5103
5565
|
|
@@ -5116,9 +5578,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
5116
5578
|
_proto.updateMasterKey =
|
5117
5579
|
/*#__PURE__*/
|
5118
5580
|
function () {
|
5119
|
-
var _updateMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5581
|
+
var _updateMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee55(id, masterKey, lockboxUuid) {
|
5120
5582
|
var symmetricEncryptor, masterKeyPayload, updateRequest, updatedIdentity;
|
5121
|
-
return
|
5583
|
+
return runtime_1.wrap(function _callee55$(_context56) {
|
5122
5584
|
while (1) {
|
5123
5585
|
switch (_context56.prev = _context56.next) {
|
5124
5586
|
case 0:
|
@@ -5159,7 +5621,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
5159
5621
|
}, _callee55, this);
|
5160
5622
|
}));
|
5161
5623
|
|
5162
|
-
function updateMasterKey(
|
5624
|
+
function updateMasterKey(_x132, _x133, _x134) {
|
5163
5625
|
return _updateMasterKey.apply(this, arguments);
|
5164
5626
|
}
|
5165
5627
|
|