oro-sdk 2.19.1 → 2.20.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/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/oro-sdk.cjs.development.js +35 -18
- 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 +35 -18
- package/dist/oro-sdk.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/client.ts +34 -29
package/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2021 ORO Health Inc.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
@@ -57,6 +57,7 @@ Two cases are possible:
|
|
57
57
|
npm run link:watch:apis
|
58
58
|
```
|
59
59
|
|
60
|
+
Make sure that you are using the same version of node and npm in the SDK and in the service that you are trying to link.
|
60
61
|
#### Then you need to link it locally to the app
|
61
62
|
|
62
63
|
In **`oro-apps/web`**:
|
@@ -3690,16 +3690,33 @@ var OroClient = /*#__PURE__*/function () {
|
|
3690
3690
|
return _context22.abrupt("return", this.cachedMetadataGrants[filterString]);
|
3691
3691
|
|
3692
3692
|
case 6:
|
3693
|
-
|
3694
|
-
|
3693
|
+
if (!filter) {
|
3694
|
+
_context22.next = 12;
|
3695
|
+
break;
|
3696
|
+
}
|
3695
3697
|
|
3696
|
-
|
3697
|
-
|
3698
|
-
|
3698
|
+
_context22.next = 9;
|
3699
|
+
return this.vaultClient.vaultIndexGet([initApis.IndexKey.ConsultationLockbox], [filter.consultationId]).then(function (res) {
|
3700
|
+
return res[initApis.IndexKey.ConsultationLockbox];
|
3701
|
+
})["catch"](function (e) {
|
3702
|
+
console.error(e);
|
3703
|
+
return [];
|
3704
|
+
});
|
3705
|
+
|
3706
|
+
case 9:
|
3707
|
+
_context22.t0 = _context22.sent;
|
3708
|
+
_context22.next = 13;
|
3709
|
+
break;
|
3710
|
+
|
3711
|
+
case 12:
|
3712
|
+
_context22.t0 = undefined;
|
3713
|
+
|
3714
|
+
case 13:
|
3715
|
+
grantsByConsultLockbox = _context22.t0;
|
3699
3716
|
decryptedConsults = decryptConsultLockboxGrants(grantsByConsultLockbox != null ? grantsByConsultLockbox : [], this.rsa);
|
3700
3717
|
|
3701
3718
|
if (!(decryptedConsults.length > 0)) {
|
3702
|
-
_context22.next =
|
3719
|
+
_context22.next = 19;
|
3703
3720
|
break;
|
3704
3721
|
}
|
3705
3722
|
|
@@ -3707,38 +3724,38 @@ var OroClient = /*#__PURE__*/function () {
|
|
3707
3724
|
this.cachedMetadataGrants[JSON.stringify(filter)] = decryptedConsults;
|
3708
3725
|
return _context22.abrupt("return", this.cachedMetadataGrants[filterString]);
|
3709
3726
|
|
3710
|
-
case
|
3727
|
+
case 19:
|
3711
3728
|
if (!filter) {
|
3712
|
-
_context22.next =
|
3729
|
+
_context22.next = 25;
|
3713
3730
|
break;
|
3714
3731
|
}
|
3715
3732
|
|
3716
|
-
_context22.next =
|
3733
|
+
_context22.next = 22;
|
3717
3734
|
return filterGrantsWithLockboxMetadata(this, filter, this.vaultIndex, forceRefresh);
|
3718
3735
|
|
3719
|
-
case
|
3736
|
+
case 22:
|
3720
3737
|
encryptedGrants = _context22.sent;
|
3721
|
-
_context22.next =
|
3738
|
+
_context22.next = 28;
|
3722
3739
|
break;
|
3723
3740
|
|
3724
|
-
case
|
3725
|
-
_context22.next =
|
3741
|
+
case 25:
|
3742
|
+
_context22.next = 27;
|
3726
3743
|
return this.vaultClient.grantsGet();
|
3727
3744
|
|
3728
|
-
case
|
3745
|
+
case 27:
|
3729
3746
|
encryptedGrants = _context22.sent.grants;
|
3730
3747
|
|
3731
|
-
case
|
3732
|
-
_context22.next =
|
3748
|
+
case 28:
|
3749
|
+
_context22.next = 30;
|
3733
3750
|
return decryptGrants(encryptedGrants, this.rsa);
|
3734
3751
|
|
3735
|
-
case
|
3752
|
+
case 30:
|
3736
3753
|
decryptedGrants = _context22.sent;
|
3737
3754
|
// sets the cached grant
|
3738
3755
|
this.cachedMetadataGrants[filterString] = decryptedGrants;
|
3739
3756
|
return _context22.abrupt("return", decryptedGrants);
|
3740
3757
|
|
3741
|
-
case
|
3758
|
+
case 33:
|
3742
3759
|
case "end":
|
3743
3760
|
return _context22.stop();
|
3744
3761
|
}
|