@aurigma/ng-design-atoms-api-client 2.53.1 → 2.55.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.
- package/aurigma-ng-design-atoms-api-client.metadata.json +1 -1
- package/bundles/aurigma-ng-design-atoms-api-client.umd.js +264 -295
- package/bundles/aurigma-ng-design-atoms-api-client.umd.js.map +1 -1
- package/bundles/aurigma-ng-design-atoms-api-client.umd.min.js +1 -1
- package/bundles/aurigma-ng-design-atoms-api-client.umd.min.js.map +1 -1
- package/esm2015/aurigma-ng-design-atoms-api-client.js +1 -1
- package/esm2015/lib/design-atoms-api-client.js +219 -250
- package/esm2015/lib/design-atoms-api.module.js +1 -1
- package/esm2015/public-api.js +1 -1
- package/fesm2015/aurigma-ng-design-atoms-api-client.js +218 -249
- package/fesm2015/aurigma-ng-design-atoms-api-client.js.map +1 -1
- package/lib/design-atoms-api-client.d.ts +166 -176
- package/package.json +1 -1
|
@@ -2135,7 +2135,7 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2135
2135
|
* @return Success
|
|
2136
2136
|
*/
|
|
2137
2137
|
renderImagePreview(attachment, tenantId, body) {
|
|
2138
|
-
let url_ = this.baseUrl + "/api/atoms/v1/images/render-
|
|
2138
|
+
let url_ = this.baseUrl + "/api/atoms/v1/images/render-preview?";
|
|
2139
2139
|
if (attachment !== undefined && attachment !== null)
|
|
2140
2140
|
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
2141
2141
|
if (tenantId === null)
|
|
@@ -2217,7 +2217,7 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2217
2217
|
* @return Success
|
|
2218
2218
|
*/
|
|
2219
2219
|
renderImagePreviewToResource(tenantId, body) {
|
|
2220
|
-
let url_ = this.baseUrl + "/api/atoms/v1/images/render-
|
|
2220
|
+
let url_ = this.baseUrl + "/api/atoms/v1/images/render-preview/to-resource?";
|
|
2221
2221
|
if (tenantId === null)
|
|
2222
2222
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2223
2223
|
else if (tenantId !== undefined)
|
|
@@ -2621,106 +2621,15 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2621
2621
|
this.http = http;
|
|
2622
2622
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
2623
2623
|
}
|
|
2624
|
-
/**
|
|
2625
|
-
* Converts colors
|
|
2626
|
-
* @param tenantId (optional) Tenant identifier
|
|
2627
|
-
* @param body (optional) Convert colors operation parameters
|
|
2628
|
-
* @return Success
|
|
2629
|
-
*/
|
|
2630
|
-
convertColors(tenantId, body) {
|
|
2631
|
-
let url_ = this.baseUrl + "/api/atoms/v1/colorConverter?";
|
|
2632
|
-
if (tenantId === null)
|
|
2633
|
-
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2634
|
-
else if (tenantId !== undefined)
|
|
2635
|
-
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2636
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
2637
|
-
const content_ = JSON.stringify(body);
|
|
2638
|
-
let options_ = {
|
|
2639
|
-
body: content_,
|
|
2640
|
-
observe: "response",
|
|
2641
|
-
responseType: "blob",
|
|
2642
|
-
headers: new HttpHeaders({
|
|
2643
|
-
"Content-Type": "application/json",
|
|
2644
|
-
"Accept": "application/json"
|
|
2645
|
-
})
|
|
2646
|
-
};
|
|
2647
|
-
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
2648
|
-
return this.http.request("post", url_, transformedOptions_);
|
|
2649
|
-
})).pipe(mergeMap((response_) => {
|
|
2650
|
-
return this.transformResult(url_, response_, (r) => this.processConvertColors(r));
|
|
2651
|
-
})).pipe(catchError((response_) => {
|
|
2652
|
-
if (response_ instanceof HttpResponseBase) {
|
|
2653
|
-
try {
|
|
2654
|
-
return this.transformResult(url_, response_, (r) => this.processConvertColors(r));
|
|
2655
|
-
}
|
|
2656
|
-
catch (e) {
|
|
2657
|
-
return throwError(e);
|
|
2658
|
-
}
|
|
2659
|
-
}
|
|
2660
|
-
else
|
|
2661
|
-
return throwError(response_);
|
|
2662
|
-
}));
|
|
2663
|
-
}
|
|
2664
|
-
processConvertColors(response) {
|
|
2665
|
-
const status = response.status;
|
|
2666
|
-
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2667
|
-
response.error instanceof Blob ? response.error : undefined;
|
|
2668
|
-
let _headers = {};
|
|
2669
|
-
if (response.headers) {
|
|
2670
|
-
for (let key of response.headers.keys()) {
|
|
2671
|
-
_headers[key] = response.headers.get(key);
|
|
2672
|
-
}
|
|
2673
|
-
}
|
|
2674
|
-
if (status === 200) {
|
|
2675
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2676
|
-
let result200 = null;
|
|
2677
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2678
|
-
return of(result200);
|
|
2679
|
-
}));
|
|
2680
|
-
}
|
|
2681
|
-
else if (status === 404) {
|
|
2682
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2683
|
-
let result404 = null;
|
|
2684
|
-
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2685
|
-
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2686
|
-
}));
|
|
2687
|
-
}
|
|
2688
|
-
else if (status === 401) {
|
|
2689
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2690
|
-
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2691
|
-
}));
|
|
2692
|
-
}
|
|
2693
|
-
else if (status === 403) {
|
|
2694
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2695
|
-
return throwException("Forbidden", status, _responseText, _headers);
|
|
2696
|
-
}));
|
|
2697
|
-
}
|
|
2698
|
-
else if (status === 500) {
|
|
2699
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2700
|
-
let result500 = null;
|
|
2701
|
-
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2702
|
-
return throwException("Internal server error", status, _responseText, _headers, result500);
|
|
2703
|
-
}));
|
|
2704
|
-
}
|
|
2705
|
-
else if (status !== 200 && status !== 204) {
|
|
2706
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2707
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2708
|
-
}));
|
|
2709
|
-
}
|
|
2710
|
-
return of(null);
|
|
2711
|
-
}
|
|
2712
2624
|
/**
|
|
2713
2625
|
* Creates new design file with specified parameters and saves it in storage.
|
|
2714
|
-
* @param privateStorage (optional) If set to 'true' design will be saved to private storage
|
|
2715
2626
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
2716
2627
|
* @param tenantId (optional) Tenant identifier
|
|
2717
2628
|
* @param body (optional) Design creation parameters
|
|
2718
2629
|
* @return Success
|
|
2719
2630
|
*/
|
|
2720
|
-
createDesign(
|
|
2631
|
+
createDesign(privateStorageOwner, tenantId, body) {
|
|
2721
2632
|
let url_ = this.baseUrl + "/api/atoms/v1/designs?";
|
|
2722
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
2723
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
2724
2633
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
2725
2634
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
2726
2635
|
if (tenantId === null)
|
|
@@ -2899,18 +2808,15 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2899
2808
|
/**
|
|
2900
2809
|
* Loads product (design model) from design file taken from storage
|
|
2901
2810
|
* @param id Design identifier
|
|
2902
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
2903
2811
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
2904
2812
|
* @param tenantId (optional) Tenant identifier
|
|
2905
2813
|
* @return Success
|
|
2906
2814
|
*/
|
|
2907
|
-
loadProduct(id,
|
|
2815
|
+
loadProduct(id, privateStorageOwner, tenantId) {
|
|
2908
2816
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/model?";
|
|
2909
2817
|
if (id === undefined || id === null)
|
|
2910
2818
|
throw new Error("The parameter 'id' must be defined.");
|
|
2911
2819
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2912
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
2913
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
2914
2820
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
2915
2821
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
2916
2822
|
if (tenantId === null)
|
|
@@ -2993,19 +2899,16 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2993
2899
|
/**
|
|
2994
2900
|
* Saves product (design model) to design file and updates design in storage.
|
|
2995
2901
|
* @param id Design identifier
|
|
2996
|
-
* @param privateStorage (optional) If set to 'true' design will be saved to private storage
|
|
2997
2902
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
2998
2903
|
* @param tenantId (optional) Tenant identifier
|
|
2999
2904
|
* @param body (optional) Serialized product description
|
|
3000
2905
|
* @return Success
|
|
3001
2906
|
*/
|
|
3002
|
-
saveProduct(id,
|
|
2907
|
+
saveProduct(id, privateStorageOwner, tenantId, body) {
|
|
3003
2908
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/model?";
|
|
3004
2909
|
if (id === undefined || id === null)
|
|
3005
2910
|
throw new Error("The parameter 'id' must be defined.");
|
|
3006
2911
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3007
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3008
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3009
2912
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3010
2913
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3011
2914
|
if (tenantId === null)
|
|
@@ -3088,7 +2991,6 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3088
2991
|
/**
|
|
3089
2992
|
* Patches product (design model) in design file.
|
|
3090
2993
|
* @param id Design identifier.
|
|
3091
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage.
|
|
3092
2994
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3093
2995
|
* @param tenantId (optional) Tenant identifier
|
|
3094
2996
|
* @param patchType (optional)
|
|
@@ -3099,13 +3001,11 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3099
3001
|
* @param replacePlaceholderItemContentInfo_sourceFile (optional)
|
|
3100
3002
|
* @return Success
|
|
3101
3003
|
*/
|
|
3102
|
-
patchProduct(id,
|
|
3004
|
+
patchProduct(id, privateStorageOwner, tenantId, patchType, replaceImageItemFileInfo_itemName, replaceImageItemFileInfo_sourceFile, replacePlaceholderItemContentInfo_placeholderItemName, replacePlaceholderItemContentInfo_newContentType, replacePlaceholderItemContentInfo_sourceFile) {
|
|
3103
3005
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/model?";
|
|
3104
3006
|
if (id === undefined || id === null)
|
|
3105
3007
|
throw new Error("The parameter 'id' must be defined.");
|
|
3106
3008
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3107
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3108
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3109
3009
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3110
3010
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3111
3011
|
if (tenantId === null)
|
|
@@ -3293,18 +3193,15 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3293
3193
|
/**
|
|
3294
3194
|
* Loads data schema from design file taken from storage
|
|
3295
3195
|
* @param id Design identifier
|
|
3296
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
3297
3196
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3298
3197
|
* @param tenantId (optional) Tenant identifier
|
|
3299
3198
|
* @return Success
|
|
3300
3199
|
*/
|
|
3301
|
-
loadDataSchema(id,
|
|
3200
|
+
loadDataSchema(id, privateStorageOwner, tenantId) {
|
|
3302
3201
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/schema?";
|
|
3303
3202
|
if (id === undefined || id === null)
|
|
3304
3203
|
throw new Error("The parameter 'id' must be defined.");
|
|
3305
3204
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3306
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3307
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3308
3205
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3309
3206
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3310
3207
|
if (tenantId === null)
|
|
@@ -3393,18 +3290,15 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3393
3290
|
/**
|
|
3394
3291
|
* Gets variable items information for design file taken from storage
|
|
3395
3292
|
* @param id Design identifier
|
|
3396
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
3397
3293
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3398
3294
|
* @param tenantId (optional) Tenant identifier
|
|
3399
3295
|
* @return Success
|
|
3400
3296
|
*/
|
|
3401
|
-
getVariables(id,
|
|
3297
|
+
getVariables(id, privateStorageOwner, tenantId) {
|
|
3402
3298
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/variables?";
|
|
3403
3299
|
if (id === undefined || id === null)
|
|
3404
3300
|
throw new Error("The parameter 'id' must be defined.");
|
|
3405
3301
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3406
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3407
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3408
3302
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3409
3303
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3410
3304
|
if (tenantId === null)
|
|
@@ -3487,19 +3381,16 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3487
3381
|
/**
|
|
3488
3382
|
* Sets variable items values for design file taken from storage
|
|
3489
3383
|
* @param id Design identifier
|
|
3490
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
3491
3384
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3492
3385
|
* @param tenantId (optional) Tenant identifier
|
|
3493
3386
|
* @param body (optional) Design variable values
|
|
3494
3387
|
* @return Success
|
|
3495
3388
|
*/
|
|
3496
|
-
setVariables(id,
|
|
3389
|
+
setVariables(id, privateStorageOwner, tenantId, body) {
|
|
3497
3390
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/variables?";
|
|
3498
3391
|
if (id === undefined || id === null)
|
|
3499
3392
|
throw new Error("The parameter 'id' must be defined.");
|
|
3500
3393
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3501
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3502
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3503
3394
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3504
3395
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3505
3396
|
if (tenantId === null)
|
|
@@ -3589,18 +3480,15 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3589
3480
|
/**
|
|
3590
3481
|
* Loads variable data printing information from design file taken from storage
|
|
3591
3482
|
* @param id Design identifier
|
|
3592
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
3593
3483
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3594
3484
|
* @param tenantId (optional) Tenant identifier
|
|
3595
3485
|
* @return Success
|
|
3596
3486
|
*/
|
|
3597
|
-
loadVdpData(id,
|
|
3598
|
-
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/
|
|
3487
|
+
loadVdpData(id, privateStorageOwner, tenantId) {
|
|
3488
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/vdp-data?";
|
|
3599
3489
|
if (id === undefined || id === null)
|
|
3600
3490
|
throw new Error("The parameter 'id' must be defined.");
|
|
3601
3491
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3602
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3603
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3604
3492
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3605
3493
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3606
3494
|
if (tenantId === null)
|
|
@@ -3690,19 +3578,16 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3690
3578
|
/**
|
|
3691
3579
|
* Saves variable data printing information to design file and updates design in storage.
|
|
3692
3580
|
* @param id Design identifier
|
|
3693
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
3694
3581
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3695
3582
|
* @param tenantId (optional) Tenant identifier
|
|
3696
3583
|
* @param body (optional) Serialized vdp data
|
|
3697
3584
|
* @return Success
|
|
3698
3585
|
*/
|
|
3699
|
-
saveVdpData(id,
|
|
3700
|
-
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/
|
|
3586
|
+
saveVdpData(id, privateStorageOwner, tenantId, body) {
|
|
3587
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/vdp-data?";
|
|
3701
3588
|
if (id === undefined || id === null)
|
|
3702
3589
|
throw new Error("The parameter 'id' must be defined.");
|
|
3703
3590
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3704
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3705
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3706
3591
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3707
3592
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3708
3593
|
if (tenantId === null)
|
|
@@ -3783,20 +3668,17 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3783
3668
|
return of(null);
|
|
3784
3669
|
}
|
|
3785
3670
|
/**
|
|
3786
|
-
* Deletes variable data printing
|
|
3671
|
+
* Deletes variable data printing information from design file and updates design in storage.
|
|
3787
3672
|
* @param id Design identifier
|
|
3788
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
3789
3673
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3790
3674
|
* @param tenantId (optional) Tenant identifier
|
|
3791
3675
|
* @return Success
|
|
3792
3676
|
*/
|
|
3793
|
-
deleteVdpData(id,
|
|
3794
|
-
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/
|
|
3677
|
+
deleteVdpData(id, privateStorageOwner, tenantId) {
|
|
3678
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/vdp-data?";
|
|
3795
3679
|
if (id === undefined || id === null)
|
|
3796
3680
|
throw new Error("The parameter 'id' must be defined.");
|
|
3797
3681
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3798
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3799
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3800
3682
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3801
3683
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3802
3684
|
if (tenantId === null)
|
|
@@ -3873,13 +3755,111 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3873
3755
|
return of(null);
|
|
3874
3756
|
}
|
|
3875
3757
|
/**
|
|
3876
|
-
*
|
|
3758
|
+
* Loads product (design model) from resource file taken from storage
|
|
3759
|
+
* @param id Resource identifier
|
|
3760
|
+
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3877
3761
|
* @param tenantId (optional) Tenant identifier
|
|
3878
|
-
* @param body (optional) Items to flatten.
|
|
3879
3762
|
* @return Success
|
|
3880
3763
|
*/
|
|
3881
|
-
|
|
3882
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
3764
|
+
loadProductFromResource(id, privateStorageOwner, tenantId) {
|
|
3765
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/from-resource/{id}/model?";
|
|
3766
|
+
if (id === undefined || id === null)
|
|
3767
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3768
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3769
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3770
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3771
|
+
if (tenantId === null)
|
|
3772
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3773
|
+
else if (tenantId !== undefined)
|
|
3774
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3775
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3776
|
+
let options_ = {
|
|
3777
|
+
observe: "response",
|
|
3778
|
+
responseType: "blob",
|
|
3779
|
+
headers: new HttpHeaders({
|
|
3780
|
+
"Accept": "application/json"
|
|
3781
|
+
})
|
|
3782
|
+
};
|
|
3783
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
3784
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
3785
|
+
})).pipe(mergeMap((response_) => {
|
|
3786
|
+
return this.transformResult(url_, response_, (r) => this.processLoadProductFromResource(r));
|
|
3787
|
+
})).pipe(catchError((response_) => {
|
|
3788
|
+
if (response_ instanceof HttpResponseBase) {
|
|
3789
|
+
try {
|
|
3790
|
+
return this.transformResult(url_, response_, (r) => this.processLoadProductFromResource(r));
|
|
3791
|
+
}
|
|
3792
|
+
catch (e) {
|
|
3793
|
+
return throwError(e);
|
|
3794
|
+
}
|
|
3795
|
+
}
|
|
3796
|
+
else
|
|
3797
|
+
return throwError(response_);
|
|
3798
|
+
}));
|
|
3799
|
+
}
|
|
3800
|
+
processLoadProductFromResource(response) {
|
|
3801
|
+
const status = response.status;
|
|
3802
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
3803
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
3804
|
+
let _headers = {};
|
|
3805
|
+
if (response.headers) {
|
|
3806
|
+
for (let key of response.headers.keys()) {
|
|
3807
|
+
_headers[key] = response.headers.get(key);
|
|
3808
|
+
}
|
|
3809
|
+
}
|
|
3810
|
+
if (status === 200) {
|
|
3811
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3812
|
+
let result200 = null;
|
|
3813
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3814
|
+
return of(result200);
|
|
3815
|
+
}));
|
|
3816
|
+
}
|
|
3817
|
+
else if (status === 404) {
|
|
3818
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3819
|
+
let result404 = null;
|
|
3820
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3821
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3822
|
+
}));
|
|
3823
|
+
}
|
|
3824
|
+
else if (status === 422) {
|
|
3825
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3826
|
+
let result422 = null;
|
|
3827
|
+
result422 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3828
|
+
return throwException("Client Error", status, _responseText, _headers, result422);
|
|
3829
|
+
}));
|
|
3830
|
+
}
|
|
3831
|
+
else if (status === 401) {
|
|
3832
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3833
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3834
|
+
}));
|
|
3835
|
+
}
|
|
3836
|
+
else if (status === 403) {
|
|
3837
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3838
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3839
|
+
}));
|
|
3840
|
+
}
|
|
3841
|
+
else if (status === 500) {
|
|
3842
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3843
|
+
let result500 = null;
|
|
3844
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3845
|
+
return throwException("Internal server error", status, _responseText, _headers, result500);
|
|
3846
|
+
}));
|
|
3847
|
+
}
|
|
3848
|
+
else if (status !== 200 && status !== 204) {
|
|
3849
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3850
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3851
|
+
}));
|
|
3852
|
+
}
|
|
3853
|
+
return of(null);
|
|
3854
|
+
}
|
|
3855
|
+
/**
|
|
3856
|
+
* Converts colors
|
|
3857
|
+
* @param tenantId (optional) Tenant identifier
|
|
3858
|
+
* @param body (optional) Convert colors operation parameters
|
|
3859
|
+
* @return Success
|
|
3860
|
+
*/
|
|
3861
|
+
convertColors(tenantId, body) {
|
|
3862
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/model/convert-colors?";
|
|
3883
3863
|
if (tenantId === null)
|
|
3884
3864
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3885
3865
|
else if (tenantId !== undefined)
|
|
@@ -3898,11 +3878,11 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3898
3878
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
3899
3879
|
return this.http.request("post", url_, transformedOptions_);
|
|
3900
3880
|
})).pipe(mergeMap((response_) => {
|
|
3901
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
3881
|
+
return this.transformResult(url_, response_, (r) => this.processConvertColors(r));
|
|
3902
3882
|
})).pipe(catchError((response_) => {
|
|
3903
3883
|
if (response_ instanceof HttpResponseBase) {
|
|
3904
3884
|
try {
|
|
3905
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
3885
|
+
return this.transformResult(url_, response_, (r) => this.processConvertColors(r));
|
|
3906
3886
|
}
|
|
3907
3887
|
catch (e) {
|
|
3908
3888
|
return throwError(e);
|
|
@@ -3912,7 +3892,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3912
3892
|
return throwError(response_);
|
|
3913
3893
|
}));
|
|
3914
3894
|
}
|
|
3915
|
-
|
|
3895
|
+
processConvertColors(response) {
|
|
3916
3896
|
const status = response.status;
|
|
3917
3897
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
3918
3898
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -3929,6 +3909,13 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3929
3909
|
return of(result200);
|
|
3930
3910
|
}));
|
|
3931
3911
|
}
|
|
3912
|
+
else if (status === 404) {
|
|
3913
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3914
|
+
let result404 = null;
|
|
3915
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3916
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3917
|
+
}));
|
|
3918
|
+
}
|
|
3932
3919
|
else if (status === 401) {
|
|
3933
3920
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3934
3921
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -3964,7 +3951,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3964
3951
|
* @return Success
|
|
3965
3952
|
*/
|
|
3966
3953
|
createItem(itemType, tenantId, sourceType, sourceId, sourceOwnerId, sourceFile) {
|
|
3967
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
3954
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items?";
|
|
3968
3955
|
if (itemType !== undefined && itemType !== null)
|
|
3969
3956
|
url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
|
|
3970
3957
|
if (tenantId === null)
|
|
@@ -4061,7 +4048,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4061
4048
|
* @return Success
|
|
4062
4049
|
*/
|
|
4063
4050
|
extractItemImage(tenantId, body) {
|
|
4064
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
4051
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/extract-image?";
|
|
4065
4052
|
if (tenantId === null)
|
|
4066
4053
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4067
4054
|
else if (tenantId !== undefined)
|
|
@@ -4135,39 +4122,36 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4135
4122
|
return of(null);
|
|
4136
4123
|
}
|
|
4137
4124
|
/**
|
|
4138
|
-
*
|
|
4139
|
-
* @param designId (optional) Public design ID.
|
|
4140
|
-
* @param privateDesignId (optional) Private design ID.
|
|
4141
|
-
* @param privateStorageOwner (optional) Private storage owner ID.
|
|
4125
|
+
* Flatten items.
|
|
4142
4126
|
* @param tenantId (optional) Tenant identifier
|
|
4127
|
+
* @param body (optional) Items to flatten.
|
|
4143
4128
|
* @return Success
|
|
4144
4129
|
*/
|
|
4145
|
-
|
|
4146
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
4147
|
-
if (designId !== undefined && designId !== null)
|
|
4148
|
-
url_ += "designId=" + encodeURIComponent("" + designId) + "&";
|
|
4149
|
-
if (privateDesignId !== undefined && privateDesignId !== null)
|
|
4150
|
-
url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
|
|
4151
|
-
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4152
|
-
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
4130
|
+
flattenItems(tenantId, body) {
|
|
4131
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/flatten?";
|
|
4153
4132
|
if (tenantId === null)
|
|
4154
4133
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4155
4134
|
else if (tenantId !== undefined)
|
|
4156
4135
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
4157
4136
|
url_ = url_.replace(/[?&]$/, "");
|
|
4137
|
+
const content_ = JSON.stringify(body);
|
|
4158
4138
|
let options_ = {
|
|
4139
|
+
body: content_,
|
|
4159
4140
|
observe: "response",
|
|
4160
4141
|
responseType: "blob",
|
|
4161
|
-
headers: new HttpHeaders({
|
|
4142
|
+
headers: new HttpHeaders({
|
|
4143
|
+
"Content-Type": "application/json",
|
|
4144
|
+
"Accept": "application/json"
|
|
4145
|
+
})
|
|
4162
4146
|
};
|
|
4163
4147
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
4164
4148
|
return this.http.request("post", url_, transformedOptions_);
|
|
4165
4149
|
})).pipe(mergeMap((response_) => {
|
|
4166
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
4150
|
+
return this.transformResult(url_, response_, (r) => this.processFlattenItems(r));
|
|
4167
4151
|
})).pipe(catchError((response_) => {
|
|
4168
4152
|
if (response_ instanceof HttpResponseBase) {
|
|
4169
4153
|
try {
|
|
4170
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
4154
|
+
return this.transformResult(url_, response_, (r) => this.processFlattenItems(r));
|
|
4171
4155
|
}
|
|
4172
4156
|
catch (e) {
|
|
4173
4157
|
return throwError(e);
|
|
@@ -4177,7 +4161,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4177
4161
|
return throwError(response_);
|
|
4178
4162
|
}));
|
|
4179
4163
|
}
|
|
4180
|
-
|
|
4164
|
+
processFlattenItems(response) {
|
|
4181
4165
|
const status = response.status;
|
|
4182
4166
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
4183
4167
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -4187,9 +4171,11 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4187
4171
|
_headers[key] = response.headers.get(key);
|
|
4188
4172
|
}
|
|
4189
4173
|
}
|
|
4190
|
-
if (status ===
|
|
4174
|
+
if (status === 200) {
|
|
4191
4175
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
4192
|
-
|
|
4176
|
+
let result200 = null;
|
|
4177
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
4178
|
+
return of(result200);
|
|
4193
4179
|
}));
|
|
4194
4180
|
}
|
|
4195
4181
|
else if (status === 401) {
|
|
@@ -4217,39 +4203,39 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4217
4203
|
return of(null);
|
|
4218
4204
|
}
|
|
4219
4205
|
/**
|
|
4220
|
-
*
|
|
4221
|
-
* @param
|
|
4222
|
-
* @param privateDesignId (optional) Private design ID.
|
|
4223
|
-
* @param privateStorageOwner (optional) Private storage owner ID.
|
|
4206
|
+
* Render product proof image with specified parameters.
|
|
4207
|
+
* @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied (default value is 'false').
|
|
4224
4208
|
* @param tenantId (optional) Tenant identifier
|
|
4209
|
+
* @param body (optional) Preview parameters.
|
|
4225
4210
|
* @return Success
|
|
4226
4211
|
*/
|
|
4227
|
-
|
|
4228
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
4229
|
-
if (
|
|
4230
|
-
url_ += "
|
|
4231
|
-
if (privateDesignId !== undefined && privateDesignId !== null)
|
|
4232
|
-
url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
|
|
4233
|
-
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4234
|
-
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
4212
|
+
renderProduct(attachment, tenantId, body) {
|
|
4213
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/model/render-proof?";
|
|
4214
|
+
if (attachment !== undefined && attachment !== null)
|
|
4215
|
+
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
4235
4216
|
if (tenantId === null)
|
|
4236
4217
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4237
4218
|
else if (tenantId !== undefined)
|
|
4238
4219
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
4239
4220
|
url_ = url_.replace(/[?&]$/, "");
|
|
4221
|
+
const content_ = JSON.stringify(body);
|
|
4240
4222
|
let options_ = {
|
|
4223
|
+
body: content_,
|
|
4241
4224
|
observe: "response",
|
|
4242
4225
|
responseType: "blob",
|
|
4243
|
-
headers: new HttpHeaders({
|
|
4226
|
+
headers: new HttpHeaders({
|
|
4227
|
+
"Content-Type": "application/json",
|
|
4228
|
+
"Accept": "application/octet-stream"
|
|
4229
|
+
})
|
|
4244
4230
|
};
|
|
4245
4231
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
4246
4232
|
return this.http.request("post", url_, transformedOptions_);
|
|
4247
4233
|
})).pipe(mergeMap((response_) => {
|
|
4248
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
4234
|
+
return this.transformResult(url_, response_, (r) => this.processRenderProduct(r));
|
|
4249
4235
|
})).pipe(catchError((response_) => {
|
|
4250
4236
|
if (response_ instanceof HttpResponseBase) {
|
|
4251
4237
|
try {
|
|
4252
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
4238
|
+
return this.transformResult(url_, response_, (r) => this.processRenderProduct(r));
|
|
4253
4239
|
}
|
|
4254
4240
|
catch (e) {
|
|
4255
4241
|
return throwError(e);
|
|
@@ -4259,7 +4245,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4259
4245
|
return throwError(response_);
|
|
4260
4246
|
}));
|
|
4261
4247
|
}
|
|
4262
|
-
|
|
4248
|
+
processRenderProduct(response) {
|
|
4263
4249
|
const status = response.status;
|
|
4264
4250
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
4265
4251
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -4269,10 +4255,11 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4269
4255
|
_headers[key] = response.headers.get(key);
|
|
4270
4256
|
}
|
|
4271
4257
|
}
|
|
4272
|
-
if (status ===
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4258
|
+
if (status === 200 || status === 206) {
|
|
4259
|
+
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
4260
|
+
const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
4261
|
+
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
4262
|
+
return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
4276
4263
|
}
|
|
4277
4264
|
else if (status === 401) {
|
|
4278
4265
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
@@ -4307,7 +4294,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4307
4294
|
* @return Success
|
|
4308
4295
|
*/
|
|
4309
4296
|
renderDesignPreview(attachment, tenantId, body) {
|
|
4310
|
-
let url_ = this.baseUrl + "/api/atoms/v1/render-
|
|
4297
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/render-preview?";
|
|
4311
4298
|
if (attachment !== undefined && attachment !== null)
|
|
4312
4299
|
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
4313
4300
|
if (tenantId === null)
|
|
@@ -4389,7 +4376,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4389
4376
|
* @return Success
|
|
4390
4377
|
*/
|
|
4391
4378
|
renderDesignPreviewToResource(tenantId, body) {
|
|
4392
|
-
let url_ = this.baseUrl + "/api/atoms/v1/render-
|
|
4379
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/render-preview/to-resource?";
|
|
4393
4380
|
if (tenantId === null)
|
|
4394
4381
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4395
4382
|
else if (tenantId !== undefined)
|
|
@@ -4472,7 +4459,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4472
4459
|
* @return Success
|
|
4473
4460
|
*/
|
|
4474
4461
|
renderDesignProof(attachment, tenantId, body) {
|
|
4475
|
-
let url_ = this.baseUrl + "/api/atoms/v1/render-
|
|
4462
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/render-proof?";
|
|
4476
4463
|
if (attachment !== undefined && attachment !== null)
|
|
4477
4464
|
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
4478
4465
|
if (tenantId === null)
|
|
@@ -4554,7 +4541,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4554
4541
|
* @return Success
|
|
4555
4542
|
*/
|
|
4556
4543
|
renderDesignProofToResource(tenantId, body) {
|
|
4557
|
-
let url_ = this.baseUrl + "/api/atoms/v1/render-
|
|
4544
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/render-proof/to-resource?";
|
|
4558
4545
|
if (tenantId === null)
|
|
4559
4546
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4560
4547
|
else if (tenantId !== undefined)
|
|
@@ -4629,39 +4616,40 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4629
4616
|
return of(null);
|
|
4630
4617
|
}
|
|
4631
4618
|
/**
|
|
4632
|
-
*
|
|
4633
|
-
* @param
|
|
4619
|
+
* Creates a private design from a public design.
|
|
4620
|
+
* @param designId (optional) Public design ID.
|
|
4621
|
+
* @param privateDesignId (optional) Private design ID.
|
|
4622
|
+
* @param privateStorageOwner (optional) Private storage owner ID.
|
|
4634
4623
|
* @param tenantId (optional) Tenant identifier
|
|
4635
|
-
* @param body (optional) Preview parameters.
|
|
4636
4624
|
* @return Success
|
|
4625
|
+
* @deprecated
|
|
4637
4626
|
*/
|
|
4638
|
-
|
|
4639
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
4640
|
-
if (
|
|
4641
|
-
url_ += "
|
|
4627
|
+
createPrivateDesignFromDesign(designId, privateDesignId, privateStorageOwner, tenantId) {
|
|
4628
|
+
let url_ = this.baseUrl + "/api/atoms/v1/private-designs/from-design?";
|
|
4629
|
+
if (designId !== undefined && designId !== null)
|
|
4630
|
+
url_ += "designId=" + encodeURIComponent("" + designId) + "&";
|
|
4631
|
+
if (privateDesignId !== undefined && privateDesignId !== null)
|
|
4632
|
+
url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
|
|
4633
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4634
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
4642
4635
|
if (tenantId === null)
|
|
4643
4636
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4644
4637
|
else if (tenantId !== undefined)
|
|
4645
4638
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
4646
4639
|
url_ = url_.replace(/[?&]$/, "");
|
|
4647
|
-
const content_ = JSON.stringify(body);
|
|
4648
4640
|
let options_ = {
|
|
4649
|
-
body: content_,
|
|
4650
4641
|
observe: "response",
|
|
4651
4642
|
responseType: "blob",
|
|
4652
|
-
headers: new HttpHeaders({
|
|
4653
|
-
"Content-Type": "application/json",
|
|
4654
|
-
"Accept": "application/octet-stream"
|
|
4655
|
-
})
|
|
4643
|
+
headers: new HttpHeaders({})
|
|
4656
4644
|
};
|
|
4657
4645
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
4658
4646
|
return this.http.request("post", url_, transformedOptions_);
|
|
4659
4647
|
})).pipe(mergeMap((response_) => {
|
|
4660
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
4648
|
+
return this.transformResult(url_, response_, (r) => this.processCreatePrivateDesignFromDesign(r));
|
|
4661
4649
|
})).pipe(catchError((response_) => {
|
|
4662
4650
|
if (response_ instanceof HttpResponseBase) {
|
|
4663
4651
|
try {
|
|
4664
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
4652
|
+
return this.transformResult(url_, response_, (r) => this.processCreatePrivateDesignFromDesign(r));
|
|
4665
4653
|
}
|
|
4666
4654
|
catch (e) {
|
|
4667
4655
|
return throwError(e);
|
|
@@ -4671,7 +4659,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4671
4659
|
return throwError(response_);
|
|
4672
4660
|
}));
|
|
4673
4661
|
}
|
|
4674
|
-
|
|
4662
|
+
processCreatePrivateDesignFromDesign(response) {
|
|
4675
4663
|
const status = response.status;
|
|
4676
4664
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
4677
4665
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -4681,11 +4669,10 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4681
4669
|
_headers[key] = response.headers.get(key);
|
|
4682
4670
|
}
|
|
4683
4671
|
}
|
|
4684
|
-
if (status ===
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
4672
|
+
if (status === 201) {
|
|
4673
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
4674
|
+
return of(null);
|
|
4675
|
+
}));
|
|
4689
4676
|
}
|
|
4690
4677
|
else if (status === 401) {
|
|
4691
4678
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
@@ -4712,20 +4699,20 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4712
4699
|
return of(null);
|
|
4713
4700
|
}
|
|
4714
4701
|
/**
|
|
4715
|
-
*
|
|
4716
|
-
* @param
|
|
4717
|
-
* @param
|
|
4718
|
-
* @param privateStorageOwner (optional) Private storage owner
|
|
4702
|
+
* Creates a private design from a public resource.
|
|
4703
|
+
* @param resourceId (optional) Resource ID.
|
|
4704
|
+
* @param privateDesignId (optional) Private design ID.
|
|
4705
|
+
* @param privateStorageOwner (optional) Private storage owner ID.
|
|
4719
4706
|
* @param tenantId (optional) Tenant identifier
|
|
4720
4707
|
* @return Success
|
|
4708
|
+
* @deprecated
|
|
4721
4709
|
*/
|
|
4722
|
-
|
|
4723
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
4724
|
-
if (
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
4710
|
+
createPrivateDesignFromResource(resourceId, privateDesignId, privateStorageOwner, tenantId) {
|
|
4711
|
+
let url_ = this.baseUrl + "/api/atoms/v1/private-designs/from-resource?";
|
|
4712
|
+
if (resourceId !== undefined && resourceId !== null)
|
|
4713
|
+
url_ += "resourceId=" + encodeURIComponent("" + resourceId) + "&";
|
|
4714
|
+
if (privateDesignId !== undefined && privateDesignId !== null)
|
|
4715
|
+
url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
|
|
4729
4716
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4730
4717
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
4731
4718
|
if (tenantId === null)
|
|
@@ -4736,18 +4723,16 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4736
4723
|
let options_ = {
|
|
4737
4724
|
observe: "response",
|
|
4738
4725
|
responseType: "blob",
|
|
4739
|
-
headers: new HttpHeaders({
|
|
4740
|
-
"Accept": "application/json"
|
|
4741
|
-
})
|
|
4726
|
+
headers: new HttpHeaders({})
|
|
4742
4727
|
};
|
|
4743
4728
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
4744
|
-
return this.http.request("
|
|
4729
|
+
return this.http.request("post", url_, transformedOptions_);
|
|
4745
4730
|
})).pipe(mergeMap((response_) => {
|
|
4746
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
4731
|
+
return this.transformResult(url_, response_, (r) => this.processCreatePrivateDesignFromResource(r));
|
|
4747
4732
|
})).pipe(catchError((response_) => {
|
|
4748
4733
|
if (response_ instanceof HttpResponseBase) {
|
|
4749
4734
|
try {
|
|
4750
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
4735
|
+
return this.transformResult(url_, response_, (r) => this.processCreatePrivateDesignFromResource(r));
|
|
4751
4736
|
}
|
|
4752
4737
|
catch (e) {
|
|
4753
4738
|
return throwError(e);
|
|
@@ -4757,7 +4742,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4757
4742
|
return throwError(response_);
|
|
4758
4743
|
}));
|
|
4759
4744
|
}
|
|
4760
|
-
|
|
4745
|
+
processCreatePrivateDesignFromResource(response) {
|
|
4761
4746
|
const status = response.status;
|
|
4762
4747
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
4763
4748
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -4767,25 +4752,9 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4767
4752
|
_headers[key] = response.headers.get(key);
|
|
4768
4753
|
}
|
|
4769
4754
|
}
|
|
4770
|
-
if (status ===
|
|
4771
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
4772
|
-
let result200 = null;
|
|
4773
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
4774
|
-
return of(result200);
|
|
4775
|
-
}));
|
|
4776
|
-
}
|
|
4777
|
-
else if (status === 404) {
|
|
4778
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
4779
|
-
let result404 = null;
|
|
4780
|
-
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
4781
|
-
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
4782
|
-
}));
|
|
4783
|
-
}
|
|
4784
|
-
else if (status === 422) {
|
|
4755
|
+
if (status === 201) {
|
|
4785
4756
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
4786
|
-
|
|
4787
|
-
result422 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
4788
|
-
return throwException("Client Error", status, _responseText, _headers, result422);
|
|
4757
|
+
return of(null);
|
|
4789
4758
|
}));
|
|
4790
4759
|
}
|
|
4791
4760
|
else if (status === 401) {
|
|
@@ -6861,19 +6830,13 @@ var ItemType;
|
|
|
6861
6830
|
ItemType["Clipart"] = "Clipart";
|
|
6862
6831
|
ItemType["Group"] = "Group";
|
|
6863
6832
|
})(ItemType || (ItemType = {}));
|
|
6864
|
-
/** Item souce types */
|
|
6833
|
+
/** Item souce types. */
|
|
6865
6834
|
var ItemSourceType;
|
|
6866
6835
|
(function (ItemSourceType) {
|
|
6867
6836
|
ItemSourceType["File"] = "File";
|
|
6868
6837
|
ItemSourceType["ImageStorage"] = "ImageStorage";
|
|
6869
6838
|
ItemSourceType["PrivateImageStorage"] = "PrivateImageStorage";
|
|
6870
6839
|
})(ItemSourceType || (ItemSourceType = {}));
|
|
6871
|
-
/** Product preview file format. */
|
|
6872
|
-
var ProductPreviewFormat;
|
|
6873
|
-
(function (ProductPreviewFormat) {
|
|
6874
|
-
ProductPreviewFormat["Jpeg"] = "Jpeg";
|
|
6875
|
-
ProductPreviewFormat["Png"] = "Png";
|
|
6876
|
-
})(ProductPreviewFormat || (ProductPreviewFormat = {}));
|
|
6877
6840
|
var ProductProofFormat;
|
|
6878
6841
|
(function (ProductProofFormat) {
|
|
6879
6842
|
ProductProofFormat["Jpeg"] = "Jpeg";
|
|
@@ -6895,6 +6858,12 @@ var ProductProofInterpolationMode;
|
|
|
6895
6858
|
ProductProofInterpolationMode["Anisotropic9"] = "Anisotropic9";
|
|
6896
6859
|
ProductProofInterpolationMode["Lanczos3"] = "Lanczos3";
|
|
6897
6860
|
})(ProductProofInterpolationMode || (ProductProofInterpolationMode = {}));
|
|
6861
|
+
/** Product preview file format. */
|
|
6862
|
+
var ProductPreviewFormat;
|
|
6863
|
+
(function (ProductPreviewFormat) {
|
|
6864
|
+
ProductPreviewFormat["Jpeg"] = "Jpeg";
|
|
6865
|
+
ProductPreviewFormat["Png"] = "Png";
|
|
6866
|
+
})(ProductPreviewFormat || (ProductPreviewFormat = {}));
|
|
6898
6867
|
class ApiException extends Error {
|
|
6899
6868
|
constructor(message, status, response, headers, result) {
|
|
6900
6869
|
super();
|