@tiba-spark/client-shared-lib 25.3.1-5020 → 25.3.1-5021

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.
@@ -2530,6 +2530,77 @@ class BackofficeCloudServiceProxy {
2530
2530
  }
2531
2531
  return of(null);
2532
2532
  }
2533
+ /**
2534
+ * @param tenantId (optional)
2535
+ * @param userName (optional)
2536
+ * @return Success
2537
+ */
2538
+ assignDynamicPricingRole(tenantId, userName) {
2539
+ let url_ = this.baseUrl + "/api/services/backoffice/assign/dynamic-pricing?";
2540
+ if (tenantId === null)
2541
+ throw new Error("The parameter 'tenantId' cannot be null.");
2542
+ else if (tenantId !== undefined)
2543
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2544
+ if (userName === null)
2545
+ throw new Error("The parameter 'userName' cannot be null.");
2546
+ else if (userName !== undefined)
2547
+ url_ += "userName=" + encodeURIComponent("" + userName) + "&";
2548
+ url_ = url_.replace(/[?&]$/, "");
2549
+ let options_ = {
2550
+ observe: "response",
2551
+ responseType: "blob",
2552
+ headers: new HttpHeaders({
2553
+ "Accept": "text/plain"
2554
+ })
2555
+ };
2556
+ return this.http.request("post", url_, options_).pipe(mergeMap((response_) => {
2557
+ return this.processAssignDynamicPricingRole(response_);
2558
+ })).pipe(catchError((response_) => {
2559
+ if (response_ instanceof HttpResponseBase) {
2560
+ try {
2561
+ return this.processAssignDynamicPricingRole(response_);
2562
+ }
2563
+ catch (e) {
2564
+ return throwError(e);
2565
+ }
2566
+ }
2567
+ else
2568
+ return throwError(response_);
2569
+ }));
2570
+ }
2571
+ processAssignDynamicPricingRole(response) {
2572
+ const status = response.status;
2573
+ const responseBlob = response instanceof HttpResponse ? response.body :
2574
+ response.error instanceof Blob ? response.error : undefined;
2575
+ let _headers = {};
2576
+ if (response.headers) {
2577
+ for (let key of response.headers.keys()) {
2578
+ _headers[key] = response.headers.get(key);
2579
+ }
2580
+ }
2581
+ if (status === 404) {
2582
+ return blobToText$3(responseBlob).pipe(mergeMap(_responseText => {
2583
+ let result404 = null;
2584
+ let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2585
+ result404 = ProblemDetails$3.fromJS(resultData404);
2586
+ return throwException$3("Not Found", status, _responseText, _headers, result404);
2587
+ }));
2588
+ }
2589
+ else if (status === 200) {
2590
+ return blobToText$3(responseBlob).pipe(mergeMap(_responseText => {
2591
+ let result200 = null;
2592
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2593
+ result200 = BooleanHttpResponseData$1.fromJS(resultData200);
2594
+ return of(result200);
2595
+ }));
2596
+ }
2597
+ else if (status !== 200 && status !== 204) {
2598
+ return blobToText$3(responseBlob).pipe(mergeMap(_responseText => {
2599
+ return throwException$3("An unexpected server error occurred.", status, _responseText, _headers);
2600
+ }));
2601
+ }
2602
+ return of(null);
2603
+ }
2533
2604
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BackofficeCloudServiceProxy, deps: [{ token: HttpClient }, { token: API_BASE_URL$3, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
2534
2605
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BackofficeCloudServiceProxy }); }
2535
2606
  }
@@ -6461,77 +6532,6 @@ class RoleCloudServiceProxy {
6461
6532
  }
6462
6533
  return of(null);
6463
6534
  }
6464
- /**
6465
- * @param tenantId (optional)
6466
- * @param userName (optional)
6467
- * @return Success
6468
- */
6469
- assignDynamicPricingRole(tenantId, userName) {
6470
- let url_ = this.baseUrl + "/api/services/role/assign/dynamic-pricing?";
6471
- if (tenantId === null)
6472
- throw new Error("The parameter 'tenantId' cannot be null.");
6473
- else if (tenantId !== undefined)
6474
- url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
6475
- if (userName === null)
6476
- throw new Error("The parameter 'userName' cannot be null.");
6477
- else if (userName !== undefined)
6478
- url_ += "userName=" + encodeURIComponent("" + userName) + "&";
6479
- url_ = url_.replace(/[?&]$/, "");
6480
- let options_ = {
6481
- observe: "response",
6482
- responseType: "blob",
6483
- headers: new HttpHeaders({
6484
- "Accept": "text/plain"
6485
- })
6486
- };
6487
- return this.http.request("post", url_, options_).pipe(mergeMap((response_) => {
6488
- return this.processAssignDynamicPricingRole(response_);
6489
- })).pipe(catchError((response_) => {
6490
- if (response_ instanceof HttpResponseBase) {
6491
- try {
6492
- return this.processAssignDynamicPricingRole(response_);
6493
- }
6494
- catch (e) {
6495
- return throwError(e);
6496
- }
6497
- }
6498
- else
6499
- return throwError(response_);
6500
- }));
6501
- }
6502
- processAssignDynamicPricingRole(response) {
6503
- const status = response.status;
6504
- const responseBlob = response instanceof HttpResponse ? response.body :
6505
- response.error instanceof Blob ? response.error : undefined;
6506
- let _headers = {};
6507
- if (response.headers) {
6508
- for (let key of response.headers.keys()) {
6509
- _headers[key] = response.headers.get(key);
6510
- }
6511
- }
6512
- if (status === 404) {
6513
- return blobToText$3(responseBlob).pipe(mergeMap(_responseText => {
6514
- let result404 = null;
6515
- let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
6516
- result404 = ProblemDetails$3.fromJS(resultData404);
6517
- return throwException$3("Not Found", status, _responseText, _headers, result404);
6518
- }));
6519
- }
6520
- else if (status === 200) {
6521
- return blobToText$3(responseBlob).pipe(mergeMap(_responseText => {
6522
- let result200 = null;
6523
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
6524
- result200 = BooleanHttpResponseData$1.fromJS(resultData200);
6525
- return of(result200);
6526
- }));
6527
- }
6528
- else if (status !== 200 && status !== 204) {
6529
- return blobToText$3(responseBlob).pipe(mergeMap(_responseText => {
6530
- return throwException$3("An unexpected server error occurred.", status, _responseText, _headers);
6531
- }));
6532
- }
6533
- return of(null);
6534
- }
6535
6535
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RoleCloudServiceProxy, deps: [{ token: HttpClient }, { token: API_BASE_URL$3, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
6536
6536
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RoleCloudServiceProxy }); }
6537
6537
  }