bx-rest 0.0.23 → 0.0.24
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/esm2020/services/http/sessionKey.mjs +10 -8
- package/esm2020/settings.mjs +8 -0
- package/esm2020/typification/settings.mjs +2 -0
- package/fesm2015/bx-rest.mjs +14 -5
- package/fesm2015/bx-rest.mjs.map +1 -1
- package/fesm2020/bx-rest.mjs +14 -5
- package/fesm2020/bx-rest.mjs.map +1 -1
- package/package.json +1 -1
- package/services/http/sessionKey.d.ts +1 -1
- package/settings.d.ts +2 -0
- package/typification/settings.d.ts +7 -0
package/fesm2020/bx-rest.mjs
CHANGED
|
@@ -664,6 +664,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
664
664
|
}]
|
|
665
665
|
}] });
|
|
666
666
|
|
|
667
|
+
const REST_SETTINGS = {
|
|
668
|
+
support: {
|
|
669
|
+
map: true,
|
|
670
|
+
result: true
|
|
671
|
+
},
|
|
672
|
+
auth: 'cookies'
|
|
673
|
+
};
|
|
674
|
+
|
|
667
675
|
class RestServices {
|
|
668
676
|
constructor() {
|
|
669
677
|
this.BX24 = false;
|
|
@@ -832,11 +840,12 @@ class SessionKeyServices extends BaseServices {
|
|
|
832
840
|
return false;
|
|
833
841
|
}
|
|
834
842
|
getAuthParams() {
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
843
|
+
switch (REST_SETTINGS.auth) {
|
|
844
|
+
case 'cookies':
|
|
845
|
+
return of(this.getAuth());
|
|
846
|
+
default:
|
|
847
|
+
return this.authData$.pipe(take(1), map(v => (v) ? v.access_token : undefined));
|
|
848
|
+
}
|
|
840
849
|
}
|
|
841
850
|
getBaseUrl() {
|
|
842
851
|
return this.authData$.pipe(map(v => (v && v.domain) ? this.prepareBaseAddress(v.domain, 'b24.trace-studio.com') : undefined));
|