@tiba-spark/client-shared-lib 25.4.0-192 → 25.4.0-197
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/esm2022/libraries/modules/login/login.state.mjs +6 -4
- package/esm2022/libraries/service-proxy/identity-service-proxies.mjs +41 -13
- package/fesm2022/tiba-spark-client-shared-lib.mjs +45 -14
- package/fesm2022/tiba-spark-client-shared-lib.mjs.map +1 -1
- package/libraries/modules/login/login.state.d.ts.map +1 -1
- package/libraries/service-proxy/identity-service-proxies.d.ts +15 -3
- package/libraries/service-proxy/identity-service-proxies.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -93912,25 +93912,19 @@ class BackofficeUserIdentityServiceProxy {
|
|
|
93912
93912
|
this.baseUrl = baseUrl ?? "";
|
|
93913
93913
|
}
|
|
93914
93914
|
/**
|
|
93915
|
-
* @param
|
|
93916
|
-
* @param tenantName (optional)
|
|
93915
|
+
* @param body (optional)
|
|
93917
93916
|
* @return Success
|
|
93918
93917
|
*/
|
|
93919
|
-
backofficeAuthenticate(
|
|
93920
|
-
let url_ = this.baseUrl + "/api/services/backofficeuser/authenticate
|
|
93921
|
-
if (code === null)
|
|
93922
|
-
throw new Error("The parameter 'code' cannot be null.");
|
|
93923
|
-
else if (code !== undefined)
|
|
93924
|
-
url_ += "code=" + encodeURIComponent("" + code) + "&";
|
|
93925
|
-
if (tenantName === null)
|
|
93926
|
-
throw new Error("The parameter 'tenantName' cannot be null.");
|
|
93927
|
-
else if (tenantName !== undefined)
|
|
93928
|
-
url_ += "tenantName=" + encodeURIComponent("" + tenantName) + "&";
|
|
93918
|
+
backofficeAuthenticate(body) {
|
|
93919
|
+
let url_ = this.baseUrl + "/api/services/backofficeuser/authenticate";
|
|
93929
93920
|
url_ = url_.replace(/[?&]$/, "");
|
|
93921
|
+
const content_ = JSON.stringify(body);
|
|
93930
93922
|
let options_ = {
|
|
93923
|
+
body: content_,
|
|
93931
93924
|
observe: "response",
|
|
93932
93925
|
responseType: "blob",
|
|
93933
93926
|
headers: new HttpHeaders({
|
|
93927
|
+
"Content-Type": "application/json-patch+json",
|
|
93934
93928
|
"Accept": "text/plain"
|
|
93935
93929
|
})
|
|
93936
93930
|
};
|
|
@@ -96260,6 +96254,40 @@ var AppModule;
|
|
|
96260
96254
|
AppModule[AppModule["LotConfiguration"] = 10] = "LotConfiguration";
|
|
96261
96255
|
AppModule[AppModule["ECommerceBackoffice"] = 11] = "ECommerceBackoffice";
|
|
96262
96256
|
})(AppModule || (AppModule = {}));
|
|
96257
|
+
class AuthenticateBackofficeRequestDto {
|
|
96258
|
+
constructor(data) {
|
|
96259
|
+
if (data) {
|
|
96260
|
+
for (var property in data) {
|
|
96261
|
+
if (data.hasOwnProperty(property))
|
|
96262
|
+
this[property] = data[property];
|
|
96263
|
+
}
|
|
96264
|
+
}
|
|
96265
|
+
}
|
|
96266
|
+
init(_data) {
|
|
96267
|
+
if (_data) {
|
|
96268
|
+
this.code = _data["code"];
|
|
96269
|
+
this.tenantName = _data["tenantName"];
|
|
96270
|
+
}
|
|
96271
|
+
}
|
|
96272
|
+
static fromJS(data) {
|
|
96273
|
+
data = typeof data === 'object' ? data : {};
|
|
96274
|
+
let result = new AuthenticateBackofficeRequestDto();
|
|
96275
|
+
result.init(data);
|
|
96276
|
+
return result;
|
|
96277
|
+
}
|
|
96278
|
+
toJSON(data) {
|
|
96279
|
+
data = typeof data === 'object' ? data : {};
|
|
96280
|
+
data["code"] = this.code;
|
|
96281
|
+
data["tenantName"] = this.tenantName;
|
|
96282
|
+
return data;
|
|
96283
|
+
}
|
|
96284
|
+
clone() {
|
|
96285
|
+
const json = this.toJSON();
|
|
96286
|
+
let result = new AuthenticateBackofficeRequestDto();
|
|
96287
|
+
result.init(json);
|
|
96288
|
+
return result;
|
|
96289
|
+
}
|
|
96290
|
+
}
|
|
96263
96291
|
class AuthenticateErrorResponseDto {
|
|
96264
96292
|
constructor(data) {
|
|
96265
96293
|
if (data) {
|
|
@@ -98645,6 +98673,7 @@ var identityServiceProxies = /*#__PURE__*/Object.freeze({
|
|
|
98645
98673
|
AppConfigurationDtoHttpResponseData: AppConfigurationDtoHttpResponseData,
|
|
98646
98674
|
get AppModule () { return AppModule; },
|
|
98647
98675
|
AssetIdentityServiceProxy: AssetIdentityServiceProxy,
|
|
98676
|
+
AuthenticateBackofficeRequestDto: AuthenticateBackofficeRequestDto,
|
|
98648
98677
|
AuthenticateErrorResponseDto: AuthenticateErrorResponseDto,
|
|
98649
98678
|
AuthenticateErrorResponseDtoHttpResponseData: AuthenticateErrorResponseDtoHttpResponseData,
|
|
98650
98679
|
AuthenticateRequestDto: AuthenticateRequestDto,
|
|
@@ -110651,8 +110680,10 @@ let LoginState = class LoginState {
|
|
|
110651
110680
|
localStorage.clear();
|
|
110652
110681
|
}
|
|
110653
110682
|
onBackofficeAutheticateAction(ctx, { token, tenantInfo }) {
|
|
110654
|
-
|
|
110655
|
-
|
|
110683
|
+
const authenticateRequestDto = new AuthenticateBackofficeRequestDto();
|
|
110684
|
+
authenticateRequestDto.code = token;
|
|
110685
|
+
authenticateRequestDto.tenantName = tenantInfo.tenantName;
|
|
110686
|
+
const authenticateOidc$ = this.backofficeUserIdentityServiceProxy.backofficeAuthenticate(authenticateRequestDto);
|
|
110656
110687
|
return authenticateOidc$.pipe(tap$1({
|
|
110657
110688
|
next: authResponse => {
|
|
110658
110689
|
if (authResponse.data.message === Localization.sso_pending_approval) {
|