wt-front-shared 1.0.50 → 1.0.52

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.
@@ -1962,7 +1962,7 @@ class BaseAPIService {
1962
1962
  observe: 'response',
1963
1963
  responseType: 'json'
1964
1964
  };
1965
- if (request instanceof PostRequest || request instanceof PutRequest) {
1965
+ if (request instanceof PostRequest || request instanceof PutRequest || request instanceof PatchRequest) {
1966
1966
  if (request.body instanceof FormData) {
1967
1967
  options.body = request.body;
1968
1968
  }
@@ -5507,6 +5507,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
5507
5507
  args: [PLATFORM_ID]
5508
5508
  }] }]; } });
5509
5509
 
5510
+ class StaticDataPatchUpdateRequest extends PatchRequest {
5511
+ constructor(domain, config) {
5512
+ super(domain);
5513
+ this.domain = domain;
5514
+ this.config = config;
5515
+ }
5516
+ get url() {
5517
+ return `${this.domain}/api/static-data/${this.config.contentType}/${this.config.itemId}`;
5518
+ }
5519
+ get headers() {
5520
+ return this.addAuthHeaders(this.config.headers);
5521
+ }
5522
+ get params() {
5523
+ return null;
5524
+ }
5525
+ get body() {
5526
+ const { data, formId, contentType, itemId } = this.config;
5527
+ const comment = {
5528
+ data,
5529
+ meta: {
5530
+ formId,
5531
+ contentType,
5532
+ itemId
5533
+ }
5534
+ };
5535
+ return { ...this.cleanParams(comment) };
5536
+ }
5537
+ }
5538
+
5510
5539
  class StaticDataApi extends BaseAPI {
5511
5540
  constructor(domain) {
5512
5541
  super(domain);
@@ -5530,6 +5559,9 @@ class StaticDataApi extends BaseAPI {
5530
5559
  case StaticDataEndpointTypes.UPDATE:
5531
5560
  request = new StaticDataUpdateRequest(this.domain, paramsConfig);
5532
5561
  break;
5562
+ case StaticDataEndpointTypes.PATCH_UPDATE:
5563
+ request = new StaticDataPatchUpdateRequest(this.domain, paramsConfig);
5564
+ break;
5533
5565
  case StaticDataEndpointTypes.CREATE:
5534
5566
  request = new StaticDataCreateRequest(this.domain, paramsConfig);
5535
5567
  break;