oro-sdk 5.7.0 → 5.8.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/oro-sdk.cjs.development.js +76 -51
- 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 +76 -51
- package/dist/oro-sdk.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/client.ts +5 -2
- package/LICENSE +0 -21
@@ -16,6 +16,9 @@ function _regeneratorRuntime() {
|
|
16
16
|
var exports = {},
|
17
17
|
Op = Object.prototype,
|
18
18
|
hasOwn = Op.hasOwnProperty,
|
19
|
+
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
20
|
+
obj[key] = desc.value;
|
21
|
+
},
|
19
22
|
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
20
23
|
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
21
24
|
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
@@ -39,40 +42,9 @@ function _regeneratorRuntime() {
|
|
39
42
|
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
40
43
|
generator = Object.create(protoGenerator.prototype),
|
41
44
|
context = new Context(tryLocsList || []);
|
42
|
-
return generator
|
43
|
-
|
44
|
-
|
45
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
46
|
-
if ("completed" === state) {
|
47
|
-
if ("throw" === method) throw arg;
|
48
|
-
return doneResult();
|
49
|
-
}
|
50
|
-
for (context.method = method, context.arg = arg;;) {
|
51
|
-
var delegate = context.delegate;
|
52
|
-
if (delegate) {
|
53
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
54
|
-
if (delegateResult) {
|
55
|
-
if (delegateResult === ContinueSentinel) continue;
|
56
|
-
return delegateResult;
|
57
|
-
}
|
58
|
-
}
|
59
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
60
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
61
|
-
context.dispatchException(context.arg);
|
62
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
63
|
-
state = "executing";
|
64
|
-
var record = tryCatch(innerFn, self, context);
|
65
|
-
if ("normal" === record.type) {
|
66
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
67
|
-
return {
|
68
|
-
value: record.arg,
|
69
|
-
done: context.done
|
70
|
-
};
|
71
|
-
}
|
72
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
73
|
-
}
|
74
|
-
};
|
75
|
-
}(innerFn, self, context), generator;
|
45
|
+
return defineProperty(generator, "_invoke", {
|
46
|
+
value: makeInvokeMethod(innerFn, self, context)
|
47
|
+
}), generator;
|
76
48
|
}
|
77
49
|
function tryCatch(fn, obj, arg) {
|
78
50
|
try {
|
@@ -126,13 +98,49 @@ function _regeneratorRuntime() {
|
|
126
98
|
reject(record.arg);
|
127
99
|
}
|
128
100
|
var previousPromise;
|
129
|
-
this
|
130
|
-
function
|
131
|
-
|
132
|
-
|
133
|
-
|
101
|
+
defineProperty(this, "_invoke", {
|
102
|
+
value: function (method, arg) {
|
103
|
+
function callInvokeWithMethodAndArg() {
|
104
|
+
return new PromiseImpl(function (resolve, reject) {
|
105
|
+
invoke(method, arg, resolve, reject);
|
106
|
+
});
|
107
|
+
}
|
108
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
109
|
+
}
|
110
|
+
});
|
111
|
+
}
|
112
|
+
function makeInvokeMethod(innerFn, self, context) {
|
113
|
+
var state = "suspendedStart";
|
114
|
+
return function (method, arg) {
|
115
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
116
|
+
if ("completed" === state) {
|
117
|
+
if ("throw" === method) throw arg;
|
118
|
+
return doneResult();
|
119
|
+
}
|
120
|
+
for (context.method = method, context.arg = arg;;) {
|
121
|
+
var delegate = context.delegate;
|
122
|
+
if (delegate) {
|
123
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
124
|
+
if (delegateResult) {
|
125
|
+
if (delegateResult === ContinueSentinel) continue;
|
126
|
+
return delegateResult;
|
127
|
+
}
|
128
|
+
}
|
129
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
130
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
131
|
+
context.dispatchException(context.arg);
|
132
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
133
|
+
state = "executing";
|
134
|
+
var record = tryCatch(innerFn, self, context);
|
135
|
+
if ("normal" === record.type) {
|
136
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
137
|
+
return {
|
138
|
+
value: record.arg,
|
139
|
+
done: context.done
|
140
|
+
};
|
141
|
+
}
|
142
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
134
143
|
}
|
135
|
-
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
136
144
|
};
|
137
145
|
}
|
138
146
|
function maybeInvokeDelegate(delegate, context) {
|
@@ -188,7 +196,13 @@ function _regeneratorRuntime() {
|
|
188
196
|
done: !0
|
189
197
|
};
|
190
198
|
}
|
191
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
199
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
200
|
+
value: GeneratorFunctionPrototype,
|
201
|
+
configurable: !0
|
202
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
203
|
+
value: GeneratorFunction,
|
204
|
+
configurable: !0
|
205
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
192
206
|
var ctor = "function" == typeof genFun && genFun.constructor;
|
193
207
|
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
194
208
|
}, exports.mark = function (genFun) {
|
@@ -209,8 +223,9 @@ function _regeneratorRuntime() {
|
|
209
223
|
return this;
|
210
224
|
}), define(Gp, "toString", function () {
|
211
225
|
return "[object Generator]";
|
212
|
-
}), exports.keys = function (
|
213
|
-
var
|
226
|
+
}), exports.keys = function (val) {
|
227
|
+
var object = Object(val),
|
228
|
+
keys = [];
|
214
229
|
for (var key in object) keys.push(key);
|
215
230
|
return keys.reverse(), function next() {
|
216
231
|
for (; keys.length;) {
|
@@ -323,12 +338,18 @@ function _wrapRegExp() {
|
|
323
338
|
}
|
324
339
|
return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) {
|
325
340
|
var result = _super.exec.call(this, str);
|
326
|
-
|
341
|
+
if (result) {
|
342
|
+
result.groups = buildGroups(result, this);
|
343
|
+
var indices = result.indices;
|
344
|
+
indices && (indices.groups = buildGroups(indices, this));
|
345
|
+
}
|
346
|
+
return result;
|
327
347
|
}, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {
|
328
348
|
if ("string" == typeof substitution) {
|
329
349
|
var groups = _groups.get(this);
|
330
350
|
return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) {
|
331
|
-
|
351
|
+
var group = groups[name];
|
352
|
+
return "$" + (Array.isArray(group) ? group.join("$") : group);
|
332
353
|
}));
|
333
354
|
}
|
334
355
|
if ("function" == typeof substitution) {
|
@@ -2091,7 +2112,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
2091
2112
|
/*#__PURE__*/
|
2092
2113
|
function () {
|
2093
2114
|
var _signUp = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(email, password, practice, tosAndCpAcceptance, tokenData, subscription, skipEmailValidation) {
|
2094
|
-
var privateKey, symmetricEncryptor, recoveryPassword, hashedPassword, emailConfirmed, signupRequest, identity, symetricEncryptor;
|
2115
|
+
var privateKey, symmetricEncryptor, recoveryPassword, hashedPassword, emailConfirmed, subscriptionAcceptance, signupRequest, identity, symetricEncryptor;
|
2095
2116
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
2096
2117
|
while (1) {
|
2097
2118
|
switch (_context2.prev = _context2.next) {
|
@@ -2101,21 +2122,25 @@ var OroClient = /*#__PURE__*/function () {
|
|
2101
2122
|
symmetricEncryptor = this.toolbox.CryptoChaCha.fromPassphrase(password);
|
2102
2123
|
recoveryPassword = symmetricEncryptor.bytesEncryptToBase64Payload(privateKey);
|
2103
2124
|
hashedPassword = this.toolbox.hashStringToBase64(this.toolbox.hashStringToBase64(password));
|
2125
|
+
email = email.toLowerCase();
|
2104
2126
|
emailConfirmed = !!skipEmailValidation;
|
2127
|
+
subscriptionAcceptance = subscription ? {
|
2128
|
+
email: email
|
2129
|
+
} : undefined;
|
2105
2130
|
signupRequest = {
|
2106
2131
|
practiceUuid: practice.uuid,
|
2107
|
-
email: email
|
2132
|
+
email: email,
|
2108
2133
|
emailConfirmed: emailConfirmed,
|
2109
2134
|
password: hashedPassword,
|
2110
2135
|
publicKey: this.toolbox.encodeToBase64(this.rsa["public"]()),
|
2111
2136
|
recoveryPassword: recoveryPassword,
|
2112
2137
|
tosAndCpAcceptance: tosAndCpAcceptance,
|
2113
2138
|
tokenData: tokenData,
|
2114
|
-
|
2139
|
+
subscriptionAcceptance: subscriptionAcceptance
|
2115
2140
|
};
|
2116
|
-
_context2.next =
|
2141
|
+
_context2.next = 11;
|
2117
2142
|
return this.guardClient.identityCreate(signupRequest);
|
2118
|
-
case
|
2143
|
+
case 11:
|
2119
2144
|
identity = _context2.sent;
|
2120
2145
|
if (identity.recoveryLogin) {
|
2121
2146
|
//Ensure we can recover from a page reload
|
@@ -2123,7 +2148,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
2123
2148
|
sessionStorage.setItem(sessionStorePrivateKeyName(identity.id), symetricEncryptor.bytesEncryptToBase64Payload(privateKey));
|
2124
2149
|
}
|
2125
2150
|
return _context2.abrupt("return", identity);
|
2126
|
-
case
|
2151
|
+
case 14:
|
2127
2152
|
case "end":
|
2128
2153
|
return _context2.stop();
|
2129
2154
|
}
|