@aurigma/ng-backoffice-api-client 2.66.1 → 2.68.1

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.
@@ -206,9 +206,7 @@ class ProductReferencesManagementApiClient extends ApiClientBase {
206
206
  url_ += "productId=" + encodeURIComponent("" + productId) + "&";
207
207
  if (productLinkId !== undefined && productLinkId !== null)
208
208
  url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
209
- if (productBundleId === null)
210
- throw new Error("The parameter 'productBundleId' cannot be null.");
211
- else if (productBundleId !== undefined)
209
+ if (productBundleId !== undefined && productBundleId !== null)
212
210
  url_ += "productBundleId=" + encodeURIComponent("" + productBundleId) + "&";
213
211
  if (skip !== undefined && skip !== null)
214
212
  url_ += "skip=" + encodeURIComponent("" + skip) + "&";
@@ -2282,6 +2280,90 @@ class ProductsManagementApiClient extends ApiClientBase {
2282
2280
  }
2283
2281
  return of(null);
2284
2282
  }
2283
+ /**
2284
+ * @param tenantId (optional) Tenant identifier.
2285
+ * @return Success
2286
+ */
2287
+ getProductDesignConnections(id, tenantId) {
2288
+ let url_ = this.baseUrl + "/api/backoffice/v1/products/{id}/design-connections?";
2289
+ if (id === undefined || id === null)
2290
+ throw new Error("The parameter 'id' must be defined.");
2291
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
2292
+ if (tenantId !== undefined && tenantId !== null)
2293
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2294
+ url_ = url_.replace(/[?&]$/, "");
2295
+ let options_ = {
2296
+ observe: "response",
2297
+ responseType: "blob",
2298
+ headers: new HttpHeaders({
2299
+ "Accept": "application/json"
2300
+ })
2301
+ };
2302
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2303
+ return this.http.request("get", url_, transformedOptions_);
2304
+ })).pipe(mergeMap((response_) => {
2305
+ return this.transformResult(url_, response_, (r) => this.processGetProductDesignConnections(r));
2306
+ })).pipe(catchError((response_) => {
2307
+ if (response_ instanceof HttpResponseBase) {
2308
+ try {
2309
+ return this.transformResult(url_, response_, (r) => this.processGetProductDesignConnections(r));
2310
+ }
2311
+ catch (e) {
2312
+ return throwError(e);
2313
+ }
2314
+ }
2315
+ else
2316
+ return throwError(response_);
2317
+ }));
2318
+ }
2319
+ processGetProductDesignConnections(response) {
2320
+ const status = response.status;
2321
+ const responseBlob = response instanceof HttpResponse ? response.body :
2322
+ response.error instanceof Blob ? response.error : undefined;
2323
+ let _headers = {};
2324
+ if (response.headers) {
2325
+ for (let key of response.headers.keys()) {
2326
+ _headers[key] = response.headers.get(key);
2327
+ }
2328
+ }
2329
+ if (status === 200) {
2330
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2331
+ let result200 = null;
2332
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2333
+ return of(result200);
2334
+ }));
2335
+ }
2336
+ else if (status === 404) {
2337
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2338
+ let result404 = null;
2339
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2340
+ return throwException("Not Found", status, _responseText, _headers, result404);
2341
+ }));
2342
+ }
2343
+ else if (status === 409) {
2344
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2345
+ let result409 = null;
2346
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2347
+ return throwException("Conflict", status, _responseText, _headers, result409);
2348
+ }));
2349
+ }
2350
+ else if (status === 401) {
2351
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2352
+ return throwException("Unauthorized", status, _responseText, _headers);
2353
+ }));
2354
+ }
2355
+ else if (status === 403) {
2356
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2357
+ return throwException("Forbidden", status, _responseText, _headers);
2358
+ }));
2359
+ }
2360
+ else if (status !== 200 && status !== 204) {
2361
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2362
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2363
+ }));
2364
+ }
2365
+ return of(null);
2366
+ }
2285
2367
  /**
2286
2368
  * Creates new designs connections for a specified product.
2287
2369
  * @param id Product identifier.
@@ -2456,6 +2538,90 @@ class ProductsManagementApiClient extends ApiClientBase {
2456
2538
  }
2457
2539
  return of(null);
2458
2540
  }
2541
+ /**
2542
+ * @param tenantId (optional) Tenant identifier.
2543
+ * @return Success
2544
+ */
2545
+ getMockupConnections(id, tenantId) {
2546
+ let url_ = this.baseUrl + "/api/backoffice/v1/products/{id}/mockup-connections?";
2547
+ if (id === undefined || id === null)
2548
+ throw new Error("The parameter 'id' must be defined.");
2549
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
2550
+ if (tenantId !== undefined && tenantId !== null)
2551
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2552
+ url_ = url_.replace(/[?&]$/, "");
2553
+ let options_ = {
2554
+ observe: "response",
2555
+ responseType: "blob",
2556
+ headers: new HttpHeaders({
2557
+ "Accept": "application/json"
2558
+ })
2559
+ };
2560
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2561
+ return this.http.request("get", url_, transformedOptions_);
2562
+ })).pipe(mergeMap((response_) => {
2563
+ return this.transformResult(url_, response_, (r) => this.processGetMockupConnections(r));
2564
+ })).pipe(catchError((response_) => {
2565
+ if (response_ instanceof HttpResponseBase) {
2566
+ try {
2567
+ return this.transformResult(url_, response_, (r) => this.processGetMockupConnections(r));
2568
+ }
2569
+ catch (e) {
2570
+ return throwError(e);
2571
+ }
2572
+ }
2573
+ else
2574
+ return throwError(response_);
2575
+ }));
2576
+ }
2577
+ processGetMockupConnections(response) {
2578
+ const status = response.status;
2579
+ const responseBlob = response instanceof HttpResponse ? response.body :
2580
+ response.error instanceof Blob ? response.error : undefined;
2581
+ let _headers = {};
2582
+ if (response.headers) {
2583
+ for (let key of response.headers.keys()) {
2584
+ _headers[key] = response.headers.get(key);
2585
+ }
2586
+ }
2587
+ if (status === 200) {
2588
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2589
+ let result200 = null;
2590
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2591
+ return of(result200);
2592
+ }));
2593
+ }
2594
+ else if (status === 404) {
2595
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2596
+ let result404 = null;
2597
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2598
+ return throwException("Not Found", status, _responseText, _headers, result404);
2599
+ }));
2600
+ }
2601
+ else if (status === 409) {
2602
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2603
+ let result409 = null;
2604
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2605
+ return throwException("Conflict", status, _responseText, _headers, result409);
2606
+ }));
2607
+ }
2608
+ else if (status === 401) {
2609
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2610
+ return throwException("Unauthorized", status, _responseText, _headers);
2611
+ }));
2612
+ }
2613
+ else if (status === 403) {
2614
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2615
+ return throwException("Forbidden", status, _responseText, _headers);
2616
+ }));
2617
+ }
2618
+ else if (status !== 200 && status !== 204) {
2619
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2620
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2621
+ }));
2622
+ }
2623
+ return of(null);
2624
+ }
2459
2625
  /**
2460
2626
  * Creates new mockups connections for a specified product.
2461
2627
  * @param id Product identifier.
@@ -2630,6 +2796,90 @@ class ProductsManagementApiClient extends ApiClientBase {
2630
2796
  }
2631
2797
  return of(null);
2632
2798
  }
2799
+ /**
2800
+ * @param tenantId (optional) Tenant identifier.
2801
+ * @return Success
2802
+ */
2803
+ getDocumentConnections(id, tenantId) {
2804
+ let url_ = this.baseUrl + "/api/backoffice/v1/products/{id}/document-connections?";
2805
+ if (id === undefined || id === null)
2806
+ throw new Error("The parameter 'id' must be defined.");
2807
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
2808
+ if (tenantId !== undefined && tenantId !== null)
2809
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2810
+ url_ = url_.replace(/[?&]$/, "");
2811
+ let options_ = {
2812
+ observe: "response",
2813
+ responseType: "blob",
2814
+ headers: new HttpHeaders({
2815
+ "Accept": "application/json"
2816
+ })
2817
+ };
2818
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2819
+ return this.http.request("get", url_, transformedOptions_);
2820
+ })).pipe(mergeMap((response_) => {
2821
+ return this.transformResult(url_, response_, (r) => this.processGetDocumentConnections(r));
2822
+ })).pipe(catchError((response_) => {
2823
+ if (response_ instanceof HttpResponseBase) {
2824
+ try {
2825
+ return this.transformResult(url_, response_, (r) => this.processGetDocumentConnections(r));
2826
+ }
2827
+ catch (e) {
2828
+ return throwError(e);
2829
+ }
2830
+ }
2831
+ else
2832
+ return throwError(response_);
2833
+ }));
2834
+ }
2835
+ processGetDocumentConnections(response) {
2836
+ const status = response.status;
2837
+ const responseBlob = response instanceof HttpResponse ? response.body :
2838
+ response.error instanceof Blob ? response.error : undefined;
2839
+ let _headers = {};
2840
+ if (response.headers) {
2841
+ for (let key of response.headers.keys()) {
2842
+ _headers[key] = response.headers.get(key);
2843
+ }
2844
+ }
2845
+ if (status === 200) {
2846
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2847
+ let result200 = null;
2848
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2849
+ return of(result200);
2850
+ }));
2851
+ }
2852
+ else if (status === 404) {
2853
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2854
+ let result404 = null;
2855
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2856
+ return throwException("Not Found", status, _responseText, _headers, result404);
2857
+ }));
2858
+ }
2859
+ else if (status === 409) {
2860
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2861
+ let result409 = null;
2862
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2863
+ return throwException("Conflict", status, _responseText, _headers, result409);
2864
+ }));
2865
+ }
2866
+ else if (status === 401) {
2867
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2868
+ return throwException("Unauthorized", status, _responseText, _headers);
2869
+ }));
2870
+ }
2871
+ else if (status === 403) {
2872
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2873
+ return throwException("Forbidden", status, _responseText, _headers);
2874
+ }));
2875
+ }
2876
+ else if (status !== 200 && status !== 204) {
2877
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2878
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2879
+ }));
2880
+ }
2881
+ return of(null);
2882
+ }
2633
2883
  /**
2634
2884
  * Creates new documents connections for a specified product.
2635
2885
  * @param id Product identifier.