@aurigma/ng-design-atoms-api-client 2.62.6 → 2.64.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 +1798 -977
- 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 +1431 -738
- 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 +1430 -737
- package/fesm2015/aurigma-ng-design-atoms-api-client.js.map +1 -1
- package/lib/design-atoms-api-client.d.ts +367 -98
- package/package.json +1 -1
|
@@ -881,9 +881,7 @@
|
|
|
881
881
|
if (tenantId === undefined || tenantId === null)
|
|
882
882
|
throw new Error("The parameter 'tenantId' must be defined.");
|
|
883
883
|
url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
|
|
884
|
-
if (fontKey
|
|
885
|
-
throw new Error("The parameter 'fontKey' cannot be null.");
|
|
886
|
-
else if (fontKey !== undefined)
|
|
884
|
+
if (fontKey !== undefined && fontKey !== null)
|
|
887
885
|
url_ += "fontKey=" + encodeURIComponent("" + fontKey) + "&";
|
|
888
886
|
url_ = url_.replace(/[?&]$/, "");
|
|
889
887
|
var options_ = {
|
|
@@ -1321,77 +1319,41 @@
|
|
|
1321
1319
|
if (tenantId === undefined || tenantId === null)
|
|
1322
1320
|
throw new Error("The parameter 'tenantId' must be defined.");
|
|
1323
1321
|
url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
|
|
1324
|
-
if (f
|
|
1325
|
-
throw new Error("The parameter 'f' cannot be null.");
|
|
1326
|
-
else if (f !== undefined)
|
|
1322
|
+
if (f !== undefined && f !== null)
|
|
1327
1323
|
url_ += "f=" + encodeURIComponent("" + f) + "&";
|
|
1328
|
-
if (w
|
|
1329
|
-
throw new Error("The parameter 'w' cannot be null.");
|
|
1330
|
-
else if (w !== undefined)
|
|
1324
|
+
if (w !== undefined && w !== null)
|
|
1331
1325
|
url_ += "w=" + encodeURIComponent("" + w) + "&";
|
|
1332
|
-
if (h
|
|
1333
|
-
throw new Error("The parameter 'h' cannot be null.");
|
|
1334
|
-
else if (h !== undefined)
|
|
1326
|
+
if (h !== undefined && h !== null)
|
|
1335
1327
|
url_ += "h=" + encodeURIComponent("" + h) + "&";
|
|
1336
|
-
if (cmyk
|
|
1337
|
-
throw new Error("The parameter 'cmyk' cannot be null.");
|
|
1338
|
-
else if (cmyk !== undefined)
|
|
1328
|
+
if (cmyk !== undefined && cmyk !== null)
|
|
1339
1329
|
url_ += "cmyk=" + encodeURIComponent("" + cmyk) + "&";
|
|
1340
|
-
if (rgb
|
|
1341
|
-
throw new Error("The parameter 'rgb' cannot be null.");
|
|
1342
|
-
else if (rgb !== undefined)
|
|
1330
|
+
if (rgb !== undefined && rgb !== null)
|
|
1343
1331
|
url_ += "rgb=" + encodeURIComponent("" + rgb) + "&";
|
|
1344
|
-
if (grayscale
|
|
1345
|
-
throw new Error("The parameter 'grayscale' cannot be null.");
|
|
1346
|
-
else if (grayscale !== undefined)
|
|
1332
|
+
if (grayscale !== undefined && grayscale !== null)
|
|
1347
1333
|
url_ += "grayscale=" + encodeURIComponent("" + grayscale) + "&";
|
|
1348
|
-
if (target
|
|
1349
|
-
throw new Error("The parameter 'target' cannot be null.");
|
|
1350
|
-
else if (target !== undefined)
|
|
1334
|
+
if (target !== undefined && target !== null)
|
|
1351
1335
|
url_ += "target=" + encodeURIComponent("" + target) + "&";
|
|
1352
|
-
if (sq
|
|
1353
|
-
throw new Error("The parameter 'sq' cannot be null.");
|
|
1354
|
-
else if (sq !== undefined)
|
|
1336
|
+
if (sq !== undefined && sq !== null)
|
|
1355
1337
|
url_ += "sq=" + encodeURIComponent("" + sq) + "&";
|
|
1356
|
-
if (effect
|
|
1357
|
-
throw new Error("The parameter 'effect' cannot be null.");
|
|
1358
|
-
else if (effect !== undefined)
|
|
1338
|
+
if (effect !== undefined && effect !== null)
|
|
1359
1339
|
url_ += "effect=" + encodeURIComponent("" + effect) + "&";
|
|
1360
|
-
if (kp
|
|
1361
|
-
throw new Error("The parameter 'kp' cannot be null.");
|
|
1362
|
-
else if (kp !== undefined)
|
|
1340
|
+
if (kp !== undefined && kp !== null)
|
|
1363
1341
|
url_ += "kp=" + encodeURIComponent("" + kp) + "&";
|
|
1364
|
-
if (color
|
|
1365
|
-
throw new Error("The parameter 'color' cannot be null.");
|
|
1366
|
-
else if (color !== undefined)
|
|
1342
|
+
if (color !== undefined && color !== null)
|
|
1367
1343
|
url_ += "color=" + encodeURIComponent("" + color) + "&";
|
|
1368
|
-
if (obm
|
|
1369
|
-
throw new Error("The parameter 'obm' cannot be null.");
|
|
1370
|
-
else if (obm !== undefined)
|
|
1344
|
+
if (obm !== undefined && obm !== null)
|
|
1371
1345
|
url_ += "obm=" + encodeURIComponent("" + obm) + "&";
|
|
1372
|
-
if (oo
|
|
1373
|
-
throw new Error("The parameter 'oo' cannot be null.");
|
|
1374
|
-
else if (oo !== undefined)
|
|
1346
|
+
if (oo !== undefined && oo !== null)
|
|
1375
1347
|
url_ += "oo=" + encodeURIComponent("" + oo) + "&";
|
|
1376
|
-
if (alphaMask
|
|
1377
|
-
throw new Error("The parameter 'alphaMask' cannot be null.");
|
|
1378
|
-
else if (alphaMask !== undefined)
|
|
1348
|
+
if (alphaMask !== undefined && alphaMask !== null)
|
|
1379
1349
|
url_ += "alphaMask=" + encodeURIComponent("" + alphaMask) + "&";
|
|
1380
|
-
if (page
|
|
1381
|
-
throw new Error("The parameter 'page' cannot be null.");
|
|
1382
|
-
else if (page !== undefined)
|
|
1350
|
+
if (page !== undefined && page !== null)
|
|
1383
1351
|
url_ += "page=" + encodeURIComponent("" + page) + "&";
|
|
1384
|
-
if (colorizeColor
|
|
1385
|
-
throw new Error("The parameter 'colorizeColor' cannot be null.");
|
|
1386
|
-
else if (colorizeColor !== undefined)
|
|
1352
|
+
if (colorizeColor !== undefined && colorizeColor !== null)
|
|
1387
1353
|
url_ += "colorizeColor=" + encodeURIComponent("" + colorizeColor) + "&";
|
|
1388
|
-
if (rw
|
|
1389
|
-
throw new Error("The parameter 'rw' cannot be null.");
|
|
1390
|
-
else if (rw !== undefined)
|
|
1354
|
+
if (rw !== undefined && rw !== null)
|
|
1391
1355
|
url_ += "rw=" + encodeURIComponent("" + rw) + "&";
|
|
1392
|
-
if (rh
|
|
1393
|
-
throw new Error("The parameter 'rh' cannot be null.");
|
|
1394
|
-
else if (rh !== undefined)
|
|
1356
|
+
if (rh !== undefined && rh !== null)
|
|
1395
1357
|
url_ += "rh=" + encodeURIComponent("" + rh) + "&";
|
|
1396
1358
|
url_ = url_.replace(/[?&]$/, "");
|
|
1397
1359
|
var options_ = {
|
|
@@ -1565,9 +1527,7 @@
|
|
|
1565
1527
|
if (tenantId === undefined || tenantId === null)
|
|
1566
1528
|
throw new Error("The parameter 'tenantId' must be defined.");
|
|
1567
1529
|
url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
|
|
1568
|
-
if (f
|
|
1569
|
-
throw new Error("The parameter 'f' cannot be null.");
|
|
1570
|
-
else if (f !== undefined)
|
|
1530
|
+
if (f !== undefined && f !== null)
|
|
1571
1531
|
url_ += "f=" + encodeURIComponent("" + f) + "&";
|
|
1572
1532
|
url_ = url_.replace(/[?&]$/, "");
|
|
1573
1533
|
var options_ = {
|
|
@@ -1661,9 +1621,7 @@
|
|
|
1661
1621
|
if (tenantId === undefined || tenantId === null)
|
|
1662
1622
|
throw new Error("The parameter 'tenantId' must be defined.");
|
|
1663
1623
|
url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
|
|
1664
|
-
if (image
|
|
1665
|
-
throw new Error("The parameter 'image' cannot be null.");
|
|
1666
|
-
else if (image !== undefined)
|
|
1624
|
+
if (image !== undefined && image !== null)
|
|
1667
1625
|
url_ += "image=" + encodeURIComponent("" + image) + "&";
|
|
1668
1626
|
url_ = url_.replace(/[?&]$/, "");
|
|
1669
1627
|
var options_ = {
|
|
@@ -1769,77 +1727,41 @@
|
|
|
1769
1727
|
if (tenantId === undefined || tenantId === null)
|
|
1770
1728
|
throw new Error("The parameter 'tenantId' must be defined.");
|
|
1771
1729
|
url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
|
|
1772
|
-
if (f
|
|
1773
|
-
throw new Error("The parameter 'f' cannot be null.");
|
|
1774
|
-
else if (f !== undefined)
|
|
1730
|
+
if (f !== undefined && f !== null)
|
|
1775
1731
|
url_ += "f=" + encodeURIComponent("" + f) + "&";
|
|
1776
|
-
if (w
|
|
1777
|
-
throw new Error("The parameter 'w' cannot be null.");
|
|
1778
|
-
else if (w !== undefined)
|
|
1732
|
+
if (w !== undefined && w !== null)
|
|
1779
1733
|
url_ += "w=" + encodeURIComponent("" + w) + "&";
|
|
1780
|
-
if (h
|
|
1781
|
-
throw new Error("The parameter 'h' cannot be null.");
|
|
1782
|
-
else if (h !== undefined)
|
|
1734
|
+
if (h !== undefined && h !== null)
|
|
1783
1735
|
url_ += "h=" + encodeURIComponent("" + h) + "&";
|
|
1784
|
-
if (cmyk
|
|
1785
|
-
throw new Error("The parameter 'cmyk' cannot be null.");
|
|
1786
|
-
else if (cmyk !== undefined)
|
|
1736
|
+
if (cmyk !== undefined && cmyk !== null)
|
|
1787
1737
|
url_ += "cmyk=" + encodeURIComponent("" + cmyk) + "&";
|
|
1788
|
-
if (rgb
|
|
1789
|
-
throw new Error("The parameter 'rgb' cannot be null.");
|
|
1790
|
-
else if (rgb !== undefined)
|
|
1738
|
+
if (rgb !== undefined && rgb !== null)
|
|
1791
1739
|
url_ += "rgb=" + encodeURIComponent("" + rgb) + "&";
|
|
1792
|
-
if (grayscale
|
|
1793
|
-
throw new Error("The parameter 'grayscale' cannot be null.");
|
|
1794
|
-
else if (grayscale !== undefined)
|
|
1740
|
+
if (grayscale !== undefined && grayscale !== null)
|
|
1795
1741
|
url_ += "grayscale=" + encodeURIComponent("" + grayscale) + "&";
|
|
1796
|
-
if (target
|
|
1797
|
-
throw new Error("The parameter 'target' cannot be null.");
|
|
1798
|
-
else if (target !== undefined)
|
|
1742
|
+
if (target !== undefined && target !== null)
|
|
1799
1743
|
url_ += "target=" + encodeURIComponent("" + target) + "&";
|
|
1800
|
-
if (sq
|
|
1801
|
-
throw new Error("The parameter 'sq' cannot be null.");
|
|
1802
|
-
else if (sq !== undefined)
|
|
1744
|
+
if (sq !== undefined && sq !== null)
|
|
1803
1745
|
url_ += "sq=" + encodeURIComponent("" + sq) + "&";
|
|
1804
|
-
if (effect
|
|
1805
|
-
throw new Error("The parameter 'effect' cannot be null.");
|
|
1806
|
-
else if (effect !== undefined)
|
|
1746
|
+
if (effect !== undefined && effect !== null)
|
|
1807
1747
|
url_ += "effect=" + encodeURIComponent("" + effect) + "&";
|
|
1808
|
-
if (kp
|
|
1809
|
-
throw new Error("The parameter 'kp' cannot be null.");
|
|
1810
|
-
else if (kp !== undefined)
|
|
1748
|
+
if (kp !== undefined && kp !== null)
|
|
1811
1749
|
url_ += "kp=" + encodeURIComponent("" + kp) + "&";
|
|
1812
|
-
if (color
|
|
1813
|
-
throw new Error("The parameter 'color' cannot be null.");
|
|
1814
|
-
else if (color !== undefined)
|
|
1750
|
+
if (color !== undefined && color !== null)
|
|
1815
1751
|
url_ += "color=" + encodeURIComponent("" + color) + "&";
|
|
1816
|
-
if (obm
|
|
1817
|
-
throw new Error("The parameter 'obm' cannot be null.");
|
|
1818
|
-
else if (obm !== undefined)
|
|
1752
|
+
if (obm !== undefined && obm !== null)
|
|
1819
1753
|
url_ += "obm=" + encodeURIComponent("" + obm) + "&";
|
|
1820
|
-
if (oo
|
|
1821
|
-
throw new Error("The parameter 'oo' cannot be null.");
|
|
1822
|
-
else if (oo !== undefined)
|
|
1754
|
+
if (oo !== undefined && oo !== null)
|
|
1823
1755
|
url_ += "oo=" + encodeURIComponent("" + oo) + "&";
|
|
1824
|
-
if (alphaMask
|
|
1825
|
-
throw new Error("The parameter 'alphaMask' cannot be null.");
|
|
1826
|
-
else if (alphaMask !== undefined)
|
|
1756
|
+
if (alphaMask !== undefined && alphaMask !== null)
|
|
1827
1757
|
url_ += "alphaMask=" + encodeURIComponent("" + alphaMask) + "&";
|
|
1828
|
-
if (page
|
|
1829
|
-
throw new Error("The parameter 'page' cannot be null.");
|
|
1830
|
-
else if (page !== undefined)
|
|
1758
|
+
if (page !== undefined && page !== null)
|
|
1831
1759
|
url_ += "page=" + encodeURIComponent("" + page) + "&";
|
|
1832
|
-
if (colorizeColor
|
|
1833
|
-
throw new Error("The parameter 'colorizeColor' cannot be null.");
|
|
1834
|
-
else if (colorizeColor !== undefined)
|
|
1760
|
+
if (colorizeColor !== undefined && colorizeColor !== null)
|
|
1835
1761
|
url_ += "colorizeColor=" + encodeURIComponent("" + colorizeColor) + "&";
|
|
1836
|
-
if (rw
|
|
1837
|
-
throw new Error("The parameter 'rw' cannot be null.");
|
|
1838
|
-
else if (rw !== undefined)
|
|
1762
|
+
if (rw !== undefined && rw !== null)
|
|
1839
1763
|
url_ += "rw=" + encodeURIComponent("" + rw) + "&";
|
|
1840
|
-
if (rh
|
|
1841
|
-
throw new Error("The parameter 'rh' cannot be null.");
|
|
1842
|
-
else if (rh !== undefined)
|
|
1764
|
+
if (rh !== undefined && rh !== null)
|
|
1843
1765
|
url_ += "rh=" + encodeURIComponent("" + rh) + "&";
|
|
1844
1766
|
url_ = url_.replace(/[?&]$/, "");
|
|
1845
1767
|
var options_ = {
|
|
@@ -1933,9 +1855,7 @@
|
|
|
1933
1855
|
if (tenantId === undefined || tenantId === null)
|
|
1934
1856
|
throw new Error("The parameter 'tenantId' must be defined.");
|
|
1935
1857
|
url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
|
|
1936
|
-
if (f
|
|
1937
|
-
throw new Error("The parameter 'f' cannot be null.");
|
|
1938
|
-
else if (f !== undefined)
|
|
1858
|
+
if (f !== undefined && f !== null)
|
|
1939
1859
|
url_ += "f=" + encodeURIComponent("" + f) + "&";
|
|
1940
1860
|
url_ = url_.replace(/[?&]$/, "");
|
|
1941
1861
|
var options_ = {
|
|
@@ -2966,7 +2886,7 @@
|
|
|
2966
2886
|
return _this;
|
|
2967
2887
|
}
|
|
2968
2888
|
/**
|
|
2969
|
-
* Renders a
|
|
2889
|
+
* Renders a preview of an image with the specified parameters.
|
|
2970
2890
|
* @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied
|
|
2971
2891
|
(default value is 'false').
|
|
2972
2892
|
* @param tenantId (optional) Tenant identifier
|
|
@@ -2976,9 +2896,7 @@
|
|
|
2976
2896
|
DesignAtomsImagesApiClient.prototype.renderImagePreview = function (attachment, tenantId, body) {
|
|
2977
2897
|
var _this = this;
|
|
2978
2898
|
var url_ = this.baseUrl + "/api/atoms/v1/images/render-preview?";
|
|
2979
|
-
if (attachment
|
|
2980
|
-
throw new Error("The parameter 'attachment' cannot be null.");
|
|
2981
|
-
else if (attachment !== undefined)
|
|
2899
|
+
if (attachment !== undefined && attachment !== null)
|
|
2982
2900
|
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
2983
2901
|
if (tenantId === null)
|
|
2984
2902
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
@@ -3057,37 +2975,1010 @@
|
|
|
3057
2975
|
return rxjs.of(null);
|
|
3058
2976
|
};
|
|
3059
2977
|
/**
|
|
3060
|
-
* Renders a
|
|
2978
|
+
* Renders a preview of an uploaded image with the specified parameters.
|
|
2979
|
+
* @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied
|
|
2980
|
+
(default value is 'false').
|
|
2981
|
+
* @param tenantId (optional) Tenant identifier
|
|
2982
|
+
* @param sourceFile (optional)
|
|
2983
|
+
* @param mockupOwnerId (optional)
|
|
2984
|
+
* @param mockupId (optional)
|
|
2985
|
+
* @param width (optional)
|
|
2986
|
+
* @param height (optional)
|
|
2987
|
+
* @param fileFormat (optional)
|
|
2988
|
+
* @param fitMode (optional)
|
|
2989
|
+
* @return Success
|
|
2990
|
+
*/
|
|
2991
|
+
DesignAtomsImagesApiClient.prototype.renderImagePreviewFromFile = function (attachment, tenantId, sourceFile, mockupOwnerId, mockupId, width, height, fileFormat, fitMode) {
|
|
2992
|
+
var _this = this;
|
|
2993
|
+
var url_ = this.baseUrl + "/api/atoms/v1/images/render-preview/from-file?";
|
|
2994
|
+
if (attachment !== undefined && attachment !== null)
|
|
2995
|
+
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
2996
|
+
if (tenantId === null)
|
|
2997
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2998
|
+
else if (tenantId !== undefined)
|
|
2999
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3000
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3001
|
+
var content_ = new FormData();
|
|
3002
|
+
if (sourceFile !== null && sourceFile !== undefined)
|
|
3003
|
+
content_.append("sourceFile", sourceFile.data, sourceFile.fileName ? sourceFile.fileName : "sourceFile");
|
|
3004
|
+
if (mockupOwnerId !== null && mockupOwnerId !== undefined)
|
|
3005
|
+
content_.append("mockupOwnerId", mockupOwnerId.toString());
|
|
3006
|
+
if (mockupId !== null && mockupId !== undefined)
|
|
3007
|
+
content_.append("mockupId", mockupId.toString());
|
|
3008
|
+
if (width !== null && width !== undefined)
|
|
3009
|
+
content_.append("width", width.toString());
|
|
3010
|
+
if (height !== null && height !== undefined)
|
|
3011
|
+
content_.append("height", height.toString());
|
|
3012
|
+
if (fileFormat !== null && fileFormat !== undefined)
|
|
3013
|
+
content_.append("fileFormat", fileFormat.toString());
|
|
3014
|
+
if (fitMode !== null && fitMode !== undefined)
|
|
3015
|
+
content_.append("fitMode", fitMode.toString());
|
|
3016
|
+
var options_ = {
|
|
3017
|
+
body: content_,
|
|
3018
|
+
observe: "response",
|
|
3019
|
+
responseType: "blob",
|
|
3020
|
+
headers: new i1.HttpHeaders({
|
|
3021
|
+
"Accept": "application/octet-stream"
|
|
3022
|
+
})
|
|
3023
|
+
};
|
|
3024
|
+
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
3025
|
+
return _this.http.request("post", url_, transformedOptions_);
|
|
3026
|
+
})).pipe(operators.mergeMap(function (response_) {
|
|
3027
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderImagePreviewFromFile(r); });
|
|
3028
|
+
})).pipe(operators.catchError(function (response_) {
|
|
3029
|
+
if (response_ instanceof i1.HttpResponseBase) {
|
|
3030
|
+
try {
|
|
3031
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderImagePreviewFromFile(r); });
|
|
3032
|
+
}
|
|
3033
|
+
catch (e) {
|
|
3034
|
+
return rxjs.throwError(e);
|
|
3035
|
+
}
|
|
3036
|
+
}
|
|
3037
|
+
else
|
|
3038
|
+
return rxjs.throwError(response_);
|
|
3039
|
+
}));
|
|
3040
|
+
};
|
|
3041
|
+
DesignAtomsImagesApiClient.prototype.processRenderImagePreviewFromFile = function (response) {
|
|
3042
|
+
var e_30, _a;
|
|
3043
|
+
var status = response.status;
|
|
3044
|
+
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
3045
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
3046
|
+
var _headers = {};
|
|
3047
|
+
if (response.headers) {
|
|
3048
|
+
try {
|
|
3049
|
+
for (var _b = __values(response.headers.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
3050
|
+
var key = _c.value;
|
|
3051
|
+
_headers[key] = response.headers.get(key);
|
|
3052
|
+
}
|
|
3053
|
+
}
|
|
3054
|
+
catch (e_30_1) { e_30 = { error: e_30_1 }; }
|
|
3055
|
+
finally {
|
|
3056
|
+
try {
|
|
3057
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3058
|
+
}
|
|
3059
|
+
finally { if (e_30) throw e_30.error; }
|
|
3060
|
+
}
|
|
3061
|
+
}
|
|
3062
|
+
if (status === 200 || status === 206) {
|
|
3063
|
+
var contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
3064
|
+
var fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
3065
|
+
var fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
3066
|
+
return rxjs.of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
3067
|
+
}
|
|
3068
|
+
else if (status === 401) {
|
|
3069
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3070
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3071
|
+
}));
|
|
3072
|
+
}
|
|
3073
|
+
else if (status === 403) {
|
|
3074
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3075
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3076
|
+
}));
|
|
3077
|
+
}
|
|
3078
|
+
else if (status !== 200 && status !== 204) {
|
|
3079
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3080
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3081
|
+
}));
|
|
3082
|
+
}
|
|
3083
|
+
return rxjs.of(null);
|
|
3084
|
+
};
|
|
3085
|
+
/**
|
|
3086
|
+
* Renders a preview of an uploaded image with the specified parameters and saves rendering result as resource.
|
|
3087
|
+
* @param tenantId (optional) Tenant identifier
|
|
3088
|
+
* @param resourceOwnerId (optional)
|
|
3089
|
+
* @param resourceNamespace (optional)
|
|
3090
|
+
* @param resourceName (optional)
|
|
3091
|
+
* @param resourceSourceId (optional)
|
|
3092
|
+
* @param resourceType (optional)
|
|
3093
|
+
* @param anonymousAccess (optional)
|
|
3094
|
+
* @param overwriteExistingResource (optional)
|
|
3095
|
+
* @param sourceFile (optional)
|
|
3096
|
+
* @param mockupOwnerId (optional)
|
|
3097
|
+
* @param mockupId (optional)
|
|
3098
|
+
* @param width (optional)
|
|
3099
|
+
* @param height (optional)
|
|
3100
|
+
* @param fileFormat (optional)
|
|
3101
|
+
* @param fitMode (optional)
|
|
3102
|
+
* @return Success
|
|
3103
|
+
*/
|
|
3104
|
+
DesignAtomsImagesApiClient.prototype.renderImagePreviewFromFileToResource = function (tenantId, resourceOwnerId, resourceNamespace, resourceName, resourceSourceId, resourceType, anonymousAccess, overwriteExistingResource, sourceFile, mockupOwnerId, mockupId, width, height, fileFormat, fitMode) {
|
|
3105
|
+
var _this = this;
|
|
3106
|
+
var url_ = this.baseUrl + "/api/atoms/v1/images/render-preview/from-file/to-resource?";
|
|
3107
|
+
if (tenantId === null)
|
|
3108
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3109
|
+
else if (tenantId !== undefined)
|
|
3110
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3111
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3112
|
+
var content_ = new FormData();
|
|
3113
|
+
if (resourceOwnerId !== null && resourceOwnerId !== undefined)
|
|
3114
|
+
content_.append("resourceOwnerId", resourceOwnerId.toString());
|
|
3115
|
+
if (resourceNamespace !== null && resourceNamespace !== undefined)
|
|
3116
|
+
content_.append("resourceNamespace", resourceNamespace.toString());
|
|
3117
|
+
if (resourceName !== null && resourceName !== undefined)
|
|
3118
|
+
content_.append("resourceName", resourceName.toString());
|
|
3119
|
+
if (resourceSourceId !== null && resourceSourceId !== undefined)
|
|
3120
|
+
content_.append("resourceSourceId", resourceSourceId.toString());
|
|
3121
|
+
if (resourceType !== null && resourceType !== undefined)
|
|
3122
|
+
content_.append("resourceType", resourceType.toString());
|
|
3123
|
+
if (anonymousAccess === null || anonymousAccess === undefined)
|
|
3124
|
+
throw new Error("The parameter 'anonymousAccess' cannot be null.");
|
|
3125
|
+
else
|
|
3126
|
+
content_.append("anonymousAccess", anonymousAccess.toString());
|
|
3127
|
+
if (overwriteExistingResource === null || overwriteExistingResource === undefined)
|
|
3128
|
+
throw new Error("The parameter 'overwriteExistingResource' cannot be null.");
|
|
3129
|
+
else
|
|
3130
|
+
content_.append("overwriteExistingResource", overwriteExistingResource.toString());
|
|
3131
|
+
if (sourceFile !== null && sourceFile !== undefined)
|
|
3132
|
+
content_.append("sourceFile", sourceFile.data, sourceFile.fileName ? sourceFile.fileName : "sourceFile");
|
|
3133
|
+
if (mockupOwnerId !== null && mockupOwnerId !== undefined)
|
|
3134
|
+
content_.append("mockupOwnerId", mockupOwnerId.toString());
|
|
3135
|
+
if (mockupId !== null && mockupId !== undefined)
|
|
3136
|
+
content_.append("mockupId", mockupId.toString());
|
|
3137
|
+
if (width !== null && width !== undefined)
|
|
3138
|
+
content_.append("width", width.toString());
|
|
3139
|
+
if (height !== null && height !== undefined)
|
|
3140
|
+
content_.append("height", height.toString());
|
|
3141
|
+
if (fileFormat !== null && fileFormat !== undefined)
|
|
3142
|
+
content_.append("fileFormat", fileFormat.toString());
|
|
3143
|
+
if (fitMode !== null && fitMode !== undefined)
|
|
3144
|
+
content_.append("fitMode", fitMode.toString());
|
|
3145
|
+
var options_ = {
|
|
3146
|
+
body: content_,
|
|
3147
|
+
observe: "response",
|
|
3148
|
+
responseType: "blob",
|
|
3149
|
+
headers: new i1.HttpHeaders({
|
|
3150
|
+
"Accept": "application/json"
|
|
3151
|
+
})
|
|
3152
|
+
};
|
|
3153
|
+
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
3154
|
+
return _this.http.request("post", url_, transformedOptions_);
|
|
3155
|
+
})).pipe(operators.mergeMap(function (response_) {
|
|
3156
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderImagePreviewFromFileToResource(r); });
|
|
3157
|
+
})).pipe(operators.catchError(function (response_) {
|
|
3158
|
+
if (response_ instanceof i1.HttpResponseBase) {
|
|
3159
|
+
try {
|
|
3160
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderImagePreviewFromFileToResource(r); });
|
|
3161
|
+
}
|
|
3162
|
+
catch (e) {
|
|
3163
|
+
return rxjs.throwError(e);
|
|
3164
|
+
}
|
|
3165
|
+
}
|
|
3166
|
+
else
|
|
3167
|
+
return rxjs.throwError(response_);
|
|
3168
|
+
}));
|
|
3169
|
+
};
|
|
3170
|
+
DesignAtomsImagesApiClient.prototype.processRenderImagePreviewFromFileToResource = function (response) {
|
|
3171
|
+
var e_31, _a;
|
|
3172
|
+
var _this = this;
|
|
3173
|
+
var status = response.status;
|
|
3174
|
+
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
3175
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
3176
|
+
var _headers = {};
|
|
3177
|
+
if (response.headers) {
|
|
3178
|
+
try {
|
|
3179
|
+
for (var _b = __values(response.headers.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
3180
|
+
var key = _c.value;
|
|
3181
|
+
_headers[key] = response.headers.get(key);
|
|
3182
|
+
}
|
|
3183
|
+
}
|
|
3184
|
+
catch (e_31_1) { e_31 = { error: e_31_1 }; }
|
|
3185
|
+
finally {
|
|
3186
|
+
try {
|
|
3187
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3188
|
+
}
|
|
3189
|
+
finally { if (e_31) throw e_31.error; }
|
|
3190
|
+
}
|
|
3191
|
+
}
|
|
3192
|
+
if (status === 200) {
|
|
3193
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3194
|
+
var result200 = null;
|
|
3195
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
3196
|
+
return rxjs.of(result200);
|
|
3197
|
+
}));
|
|
3198
|
+
}
|
|
3199
|
+
else if (status === 409) {
|
|
3200
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3201
|
+
var result409 = null;
|
|
3202
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
3203
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3204
|
+
}));
|
|
3205
|
+
}
|
|
3206
|
+
else if (status === 401) {
|
|
3207
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3208
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3209
|
+
}));
|
|
3210
|
+
}
|
|
3211
|
+
else if (status === 403) {
|
|
3212
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3213
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3214
|
+
}));
|
|
3215
|
+
}
|
|
3216
|
+
else if (status !== 200 && status !== 204) {
|
|
3217
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3218
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3219
|
+
}));
|
|
3220
|
+
}
|
|
3221
|
+
return rxjs.of(null);
|
|
3222
|
+
};
|
|
3223
|
+
/**
|
|
3224
|
+
* Renders a preview of a web image with the specified parameters.
|
|
3225
|
+
* @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied
|
|
3226
|
+
(default value is 'false').
|
|
3061
3227
|
* @param tenantId (optional) Tenant identifier
|
|
3062
3228
|
* @param body (optional) Render model with preview parameters.
|
|
3063
3229
|
* @return Success
|
|
3064
3230
|
*/
|
|
3065
|
-
DesignAtomsImagesApiClient.prototype.
|
|
3231
|
+
DesignAtomsImagesApiClient.prototype.renderImagePreviewFromUrl = function (attachment, tenantId, body) {
|
|
3232
|
+
var _this = this;
|
|
3233
|
+
var url_ = this.baseUrl + "/api/atoms/v1/images/render-preview/from-url?";
|
|
3234
|
+
if (attachment !== undefined && attachment !== null)
|
|
3235
|
+
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
3236
|
+
if (tenantId === null)
|
|
3237
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3238
|
+
else if (tenantId !== undefined)
|
|
3239
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3240
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3241
|
+
var content_ = JSON.stringify(body);
|
|
3242
|
+
var options_ = {
|
|
3243
|
+
body: content_,
|
|
3244
|
+
observe: "response",
|
|
3245
|
+
responseType: "blob",
|
|
3246
|
+
headers: new i1.HttpHeaders({
|
|
3247
|
+
"Content-Type": "application/json",
|
|
3248
|
+
"Accept": "application/octet-stream"
|
|
3249
|
+
})
|
|
3250
|
+
};
|
|
3251
|
+
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
3252
|
+
return _this.http.request("post", url_, transformedOptions_);
|
|
3253
|
+
})).pipe(operators.mergeMap(function (response_) {
|
|
3254
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderImagePreviewFromUrl(r); });
|
|
3255
|
+
})).pipe(operators.catchError(function (response_) {
|
|
3256
|
+
if (response_ instanceof i1.HttpResponseBase) {
|
|
3257
|
+
try {
|
|
3258
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderImagePreviewFromUrl(r); });
|
|
3259
|
+
}
|
|
3260
|
+
catch (e) {
|
|
3261
|
+
return rxjs.throwError(e);
|
|
3262
|
+
}
|
|
3263
|
+
}
|
|
3264
|
+
else
|
|
3265
|
+
return rxjs.throwError(response_);
|
|
3266
|
+
}));
|
|
3267
|
+
};
|
|
3268
|
+
DesignAtomsImagesApiClient.prototype.processRenderImagePreviewFromUrl = function (response) {
|
|
3269
|
+
var e_32, _a;
|
|
3270
|
+
var status = response.status;
|
|
3271
|
+
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
3272
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
3273
|
+
var _headers = {};
|
|
3274
|
+
if (response.headers) {
|
|
3275
|
+
try {
|
|
3276
|
+
for (var _b = __values(response.headers.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
3277
|
+
var key = _c.value;
|
|
3278
|
+
_headers[key] = response.headers.get(key);
|
|
3279
|
+
}
|
|
3280
|
+
}
|
|
3281
|
+
catch (e_32_1) { e_32 = { error: e_32_1 }; }
|
|
3282
|
+
finally {
|
|
3283
|
+
try {
|
|
3284
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3285
|
+
}
|
|
3286
|
+
finally { if (e_32) throw e_32.error; }
|
|
3287
|
+
}
|
|
3288
|
+
}
|
|
3289
|
+
if (status === 200 || status === 206) {
|
|
3290
|
+
var contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
3291
|
+
var fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
3292
|
+
var fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
3293
|
+
return rxjs.of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
3294
|
+
}
|
|
3295
|
+
else if (status === 401) {
|
|
3296
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3297
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3298
|
+
}));
|
|
3299
|
+
}
|
|
3300
|
+
else if (status === 403) {
|
|
3301
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3302
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3303
|
+
}));
|
|
3304
|
+
}
|
|
3305
|
+
else if (status !== 200 && status !== 204) {
|
|
3306
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3307
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3308
|
+
}));
|
|
3309
|
+
}
|
|
3310
|
+
return rxjs.of(null);
|
|
3311
|
+
};
|
|
3312
|
+
/**
|
|
3313
|
+
* Renders a preview of a web image with the specified parameters and saves rendering result as resource.
|
|
3314
|
+
* @param tenantId (optional) Tenant identifier
|
|
3315
|
+
* @param body (optional) Render model with preview parameters.
|
|
3316
|
+
* @return Success
|
|
3317
|
+
*/
|
|
3318
|
+
DesignAtomsImagesApiClient.prototype.renderImagePreviewFromUrlToResource = function (tenantId, body) {
|
|
3319
|
+
var _this = this;
|
|
3320
|
+
var url_ = this.baseUrl + "/api/atoms/v1/images/render-preview/from-url/to-resource?";
|
|
3321
|
+
if (tenantId === null)
|
|
3322
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3323
|
+
else if (tenantId !== undefined)
|
|
3324
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3325
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3326
|
+
var content_ = JSON.stringify(body);
|
|
3327
|
+
var options_ = {
|
|
3328
|
+
body: content_,
|
|
3329
|
+
observe: "response",
|
|
3330
|
+
responseType: "blob",
|
|
3331
|
+
headers: new i1.HttpHeaders({
|
|
3332
|
+
"Content-Type": "application/json",
|
|
3333
|
+
"Accept": "application/json"
|
|
3334
|
+
})
|
|
3335
|
+
};
|
|
3336
|
+
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
3337
|
+
return _this.http.request("post", url_, transformedOptions_);
|
|
3338
|
+
})).pipe(operators.mergeMap(function (response_) {
|
|
3339
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderImagePreviewFromUrlToResource(r); });
|
|
3340
|
+
})).pipe(operators.catchError(function (response_) {
|
|
3341
|
+
if (response_ instanceof i1.HttpResponseBase) {
|
|
3342
|
+
try {
|
|
3343
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderImagePreviewFromUrlToResource(r); });
|
|
3344
|
+
}
|
|
3345
|
+
catch (e) {
|
|
3346
|
+
return rxjs.throwError(e);
|
|
3347
|
+
}
|
|
3348
|
+
}
|
|
3349
|
+
else
|
|
3350
|
+
return rxjs.throwError(response_);
|
|
3351
|
+
}));
|
|
3352
|
+
};
|
|
3353
|
+
DesignAtomsImagesApiClient.prototype.processRenderImagePreviewFromUrlToResource = function (response) {
|
|
3354
|
+
var e_33, _a;
|
|
3355
|
+
var _this = this;
|
|
3356
|
+
var status = response.status;
|
|
3357
|
+
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
3358
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
3359
|
+
var _headers = {};
|
|
3360
|
+
if (response.headers) {
|
|
3361
|
+
try {
|
|
3362
|
+
for (var _b = __values(response.headers.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
3363
|
+
var key = _c.value;
|
|
3364
|
+
_headers[key] = response.headers.get(key);
|
|
3365
|
+
}
|
|
3366
|
+
}
|
|
3367
|
+
catch (e_33_1) { e_33 = { error: e_33_1 }; }
|
|
3368
|
+
finally {
|
|
3369
|
+
try {
|
|
3370
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3371
|
+
}
|
|
3372
|
+
finally { if (e_33) throw e_33.error; }
|
|
3373
|
+
}
|
|
3374
|
+
}
|
|
3375
|
+
if (status === 200) {
|
|
3376
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3377
|
+
var result200 = null;
|
|
3378
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
3379
|
+
return rxjs.of(result200);
|
|
3380
|
+
}));
|
|
3381
|
+
}
|
|
3382
|
+
else if (status === 409) {
|
|
3383
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3384
|
+
var result409 = null;
|
|
3385
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
3386
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3387
|
+
}));
|
|
3388
|
+
}
|
|
3389
|
+
else if (status === 401) {
|
|
3390
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3391
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3392
|
+
}));
|
|
3393
|
+
}
|
|
3394
|
+
else if (status === 403) {
|
|
3395
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3396
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3397
|
+
}));
|
|
3398
|
+
}
|
|
3399
|
+
else if (status !== 200 && status !== 204) {
|
|
3400
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3401
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3402
|
+
}));
|
|
3403
|
+
}
|
|
3404
|
+
return rxjs.of(null);
|
|
3405
|
+
};
|
|
3406
|
+
/**
|
|
3407
|
+
* Renders a preview of an image with the specified parameters and saves rendering result as resource.
|
|
3408
|
+
* @param tenantId (optional) Tenant identifier
|
|
3409
|
+
* @param body (optional) Render model with preview parameters.
|
|
3410
|
+
* @return Success
|
|
3411
|
+
*/
|
|
3412
|
+
DesignAtomsImagesApiClient.prototype.renderImagePreviewToResource = function (tenantId, body) {
|
|
3413
|
+
var _this = this;
|
|
3414
|
+
var url_ = this.baseUrl + "/api/atoms/v1/images/render-preview/to-resource?";
|
|
3415
|
+
if (tenantId === null)
|
|
3416
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3417
|
+
else if (tenantId !== undefined)
|
|
3418
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3419
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3420
|
+
var content_ = JSON.stringify(body);
|
|
3421
|
+
var options_ = {
|
|
3422
|
+
body: content_,
|
|
3423
|
+
observe: "response",
|
|
3424
|
+
responseType: "blob",
|
|
3425
|
+
headers: new i1.HttpHeaders({
|
|
3426
|
+
"Content-Type": "application/json",
|
|
3427
|
+
"Accept": "application/json"
|
|
3428
|
+
})
|
|
3429
|
+
};
|
|
3430
|
+
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
3431
|
+
return _this.http.request("post", url_, transformedOptions_);
|
|
3432
|
+
})).pipe(operators.mergeMap(function (response_) {
|
|
3433
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderImagePreviewToResource(r); });
|
|
3434
|
+
})).pipe(operators.catchError(function (response_) {
|
|
3435
|
+
if (response_ instanceof i1.HttpResponseBase) {
|
|
3436
|
+
try {
|
|
3437
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderImagePreviewToResource(r); });
|
|
3438
|
+
}
|
|
3439
|
+
catch (e) {
|
|
3440
|
+
return rxjs.throwError(e);
|
|
3441
|
+
}
|
|
3442
|
+
}
|
|
3443
|
+
else
|
|
3444
|
+
return rxjs.throwError(response_);
|
|
3445
|
+
}));
|
|
3446
|
+
};
|
|
3447
|
+
DesignAtomsImagesApiClient.prototype.processRenderImagePreviewToResource = function (response) {
|
|
3448
|
+
var e_34, _a;
|
|
3449
|
+
var _this = this;
|
|
3450
|
+
var status = response.status;
|
|
3451
|
+
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
3452
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
3453
|
+
var _headers = {};
|
|
3454
|
+
if (response.headers) {
|
|
3455
|
+
try {
|
|
3456
|
+
for (var _b = __values(response.headers.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
3457
|
+
var key = _c.value;
|
|
3458
|
+
_headers[key] = response.headers.get(key);
|
|
3459
|
+
}
|
|
3460
|
+
}
|
|
3461
|
+
catch (e_34_1) { e_34 = { error: e_34_1 }; }
|
|
3462
|
+
finally {
|
|
3463
|
+
try {
|
|
3464
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3465
|
+
}
|
|
3466
|
+
finally { if (e_34) throw e_34.error; }
|
|
3467
|
+
}
|
|
3468
|
+
}
|
|
3469
|
+
if (status === 200) {
|
|
3470
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3471
|
+
var result200 = null;
|
|
3472
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
3473
|
+
return rxjs.of(result200);
|
|
3474
|
+
}));
|
|
3475
|
+
}
|
|
3476
|
+
else if (status === 409) {
|
|
3477
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3478
|
+
var result409 = null;
|
|
3479
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
3480
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3481
|
+
}));
|
|
3482
|
+
}
|
|
3483
|
+
else if (status === 401) {
|
|
3484
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3485
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3486
|
+
}));
|
|
3487
|
+
}
|
|
3488
|
+
else if (status === 403) {
|
|
3489
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3490
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3491
|
+
}));
|
|
3492
|
+
}
|
|
3493
|
+
else if (status !== 200 && status !== 204) {
|
|
3494
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3495
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3496
|
+
}));
|
|
3497
|
+
}
|
|
3498
|
+
return rxjs.of(null);
|
|
3499
|
+
};
|
|
3500
|
+
return DesignAtomsImagesApiClient;
|
|
3501
|
+
}(ApiClientBase));
|
|
3502
|
+
DesignAtomsImagesApiClient.ɵprov = i0.ɵɵdefineInjectable({ factory: function DesignAtomsImagesApiClient_Factory() { return new DesignAtomsImagesApiClient(i0.ɵɵinject(ApiClientConfiguration), i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(API_BASE_URL, 8)); }, token: DesignAtomsImagesApiClient, providedIn: "root" });
|
|
3503
|
+
DesignAtomsImagesApiClient.decorators = [
|
|
3504
|
+
{ type: i0.Injectable, args: [{
|
|
3505
|
+
providedIn: 'root'
|
|
3506
|
+
},] }
|
|
3507
|
+
];
|
|
3508
|
+
DesignAtomsImagesApiClient.ctorParameters = function () { return [
|
|
3509
|
+
{ type: ApiClientConfiguration, decorators: [{ type: i0.Inject, args: [ApiClientConfiguration,] }] },
|
|
3510
|
+
{ type: i1.HttpClient, decorators: [{ type: i0.Inject, args: [i1.HttpClient,] }] },
|
|
3511
|
+
{ type: String, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [API_BASE_URL,] }] }
|
|
3512
|
+
]; };
|
|
3513
|
+
var DesignAtomsMockups3dApiClient = /** @class */ (function (_super) {
|
|
3514
|
+
__extends(DesignAtomsMockups3dApiClient, _super);
|
|
3515
|
+
function DesignAtomsMockups3dApiClient(configuration, http, baseUrl) {
|
|
3516
|
+
var _this = _super.call(this, configuration) || this;
|
|
3517
|
+
_this.jsonParseReviver = undefined;
|
|
3518
|
+
_this.http = http;
|
|
3519
|
+
_this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : _this.getBaseUrl("");
|
|
3520
|
+
return _this;
|
|
3521
|
+
}
|
|
3522
|
+
/**
|
|
3523
|
+
* Returns a 3D-Mockup attributes.
|
|
3524
|
+
* @param id 3D-Mockup identifier.
|
|
3525
|
+
* @param ownerId (optional) Private mockup owner identifier.
|
|
3526
|
+
* @param tenantId (optional) Tenant identifier
|
|
3527
|
+
* @return Success
|
|
3528
|
+
*/
|
|
3529
|
+
DesignAtomsMockups3dApiClient.prototype.getAttributes = function (id, ownerId, tenantId) {
|
|
3530
|
+
var _this = this;
|
|
3531
|
+
var url_ = this.baseUrl + "/api/atoms/v1/mockups-3d/{id}/attributes?";
|
|
3532
|
+
if (id === undefined || id === null)
|
|
3533
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3534
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3535
|
+
if (ownerId !== undefined && ownerId !== null)
|
|
3536
|
+
url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
|
|
3537
|
+
if (tenantId === null)
|
|
3538
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3539
|
+
else if (tenantId !== undefined)
|
|
3540
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3541
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3542
|
+
var options_ = {
|
|
3543
|
+
observe: "response",
|
|
3544
|
+
responseType: "blob",
|
|
3545
|
+
headers: new i1.HttpHeaders({
|
|
3546
|
+
"Accept": "application/json"
|
|
3547
|
+
})
|
|
3548
|
+
};
|
|
3549
|
+
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
3550
|
+
return _this.http.request("get", url_, transformedOptions_);
|
|
3551
|
+
})).pipe(operators.mergeMap(function (response_) {
|
|
3552
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processGetAttributes(r); });
|
|
3553
|
+
})).pipe(operators.catchError(function (response_) {
|
|
3554
|
+
if (response_ instanceof i1.HttpResponseBase) {
|
|
3555
|
+
try {
|
|
3556
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processGetAttributes(r); });
|
|
3557
|
+
}
|
|
3558
|
+
catch (e) {
|
|
3559
|
+
return rxjs.throwError(e);
|
|
3560
|
+
}
|
|
3561
|
+
}
|
|
3562
|
+
else
|
|
3563
|
+
return rxjs.throwError(response_);
|
|
3564
|
+
}));
|
|
3565
|
+
};
|
|
3566
|
+
DesignAtomsMockups3dApiClient.prototype.processGetAttributes = function (response) {
|
|
3567
|
+
var e_35, _a;
|
|
3568
|
+
var _this = this;
|
|
3569
|
+
var status = response.status;
|
|
3570
|
+
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
3571
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
3572
|
+
var _headers = {};
|
|
3573
|
+
if (response.headers) {
|
|
3574
|
+
try {
|
|
3575
|
+
for (var _b = __values(response.headers.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
3576
|
+
var key = _c.value;
|
|
3577
|
+
_headers[key] = response.headers.get(key);
|
|
3578
|
+
}
|
|
3579
|
+
}
|
|
3580
|
+
catch (e_35_1) { e_35 = { error: e_35_1 }; }
|
|
3581
|
+
finally {
|
|
3582
|
+
try {
|
|
3583
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3584
|
+
}
|
|
3585
|
+
finally { if (e_35) throw e_35.error; }
|
|
3586
|
+
}
|
|
3587
|
+
}
|
|
3588
|
+
if (status === 200) {
|
|
3589
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3590
|
+
var result200 = null;
|
|
3591
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
3592
|
+
return rxjs.of(result200);
|
|
3593
|
+
}));
|
|
3594
|
+
}
|
|
3595
|
+
else if (status === 404) {
|
|
3596
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3597
|
+
var result404 = null;
|
|
3598
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
3599
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3600
|
+
}));
|
|
3601
|
+
}
|
|
3602
|
+
else if (status === 422) {
|
|
3603
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3604
|
+
var result422 = null;
|
|
3605
|
+
result422 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
3606
|
+
return throwException("Client Error", status, _responseText, _headers, result422);
|
|
3607
|
+
}));
|
|
3608
|
+
}
|
|
3609
|
+
else if (status === 401) {
|
|
3610
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3611
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3612
|
+
}));
|
|
3613
|
+
}
|
|
3614
|
+
else if (status === 403) {
|
|
3615
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3616
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3617
|
+
}));
|
|
3618
|
+
}
|
|
3619
|
+
else if (status !== 200 && status !== 204) {
|
|
3620
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3621
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3622
|
+
}));
|
|
3623
|
+
}
|
|
3624
|
+
return rxjs.of(null);
|
|
3625
|
+
};
|
|
3626
|
+
/**
|
|
3627
|
+
* Returns a 3D-Mockup content as protobuf binary stream.
|
|
3628
|
+
* @param id 3D-Mockup identifier.
|
|
3629
|
+
* @param ownerId (optional) Private mockup owner identifier.
|
|
3630
|
+
* @param tenantId (optional) Tenant identifier
|
|
3631
|
+
* @return Success
|
|
3632
|
+
*/
|
|
3633
|
+
DesignAtomsMockups3dApiClient.prototype.getContentAsProtobuf = function (id, ownerId, tenantId) {
|
|
3634
|
+
var _this = this;
|
|
3635
|
+
var url_ = this.baseUrl + "/api/atoms/v1/mockups-3d/{id}/content/as-protobuf?";
|
|
3636
|
+
if (id === undefined || id === null)
|
|
3637
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3638
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3639
|
+
if (ownerId !== undefined && ownerId !== null)
|
|
3640
|
+
url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
|
|
3641
|
+
if (tenantId === null)
|
|
3642
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3643
|
+
else if (tenantId !== undefined)
|
|
3644
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3645
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3646
|
+
var options_ = {
|
|
3647
|
+
observe: "response",
|
|
3648
|
+
responseType: "blob",
|
|
3649
|
+
headers: new i1.HttpHeaders({
|
|
3650
|
+
"Accept": "application/json"
|
|
3651
|
+
})
|
|
3652
|
+
};
|
|
3653
|
+
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
3654
|
+
return _this.http.request("get", url_, transformedOptions_);
|
|
3655
|
+
})).pipe(operators.mergeMap(function (response_) {
|
|
3656
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processGetContentAsProtobuf(r); });
|
|
3657
|
+
})).pipe(operators.catchError(function (response_) {
|
|
3658
|
+
if (response_ instanceof i1.HttpResponseBase) {
|
|
3659
|
+
try {
|
|
3660
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processGetContentAsProtobuf(r); });
|
|
3661
|
+
}
|
|
3662
|
+
catch (e) {
|
|
3663
|
+
return rxjs.throwError(e);
|
|
3664
|
+
}
|
|
3665
|
+
}
|
|
3666
|
+
else
|
|
3667
|
+
return rxjs.throwError(response_);
|
|
3668
|
+
}));
|
|
3669
|
+
};
|
|
3670
|
+
DesignAtomsMockups3dApiClient.prototype.processGetContentAsProtobuf = function (response) {
|
|
3671
|
+
var e_36, _a;
|
|
3672
|
+
var _this = this;
|
|
3673
|
+
var status = response.status;
|
|
3674
|
+
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
3675
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
3676
|
+
var _headers = {};
|
|
3677
|
+
if (response.headers) {
|
|
3678
|
+
try {
|
|
3679
|
+
for (var _b = __values(response.headers.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
3680
|
+
var key = _c.value;
|
|
3681
|
+
_headers[key] = response.headers.get(key);
|
|
3682
|
+
}
|
|
3683
|
+
}
|
|
3684
|
+
catch (e_36_1) { e_36 = { error: e_36_1 }; }
|
|
3685
|
+
finally {
|
|
3686
|
+
try {
|
|
3687
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3688
|
+
}
|
|
3689
|
+
finally { if (e_36) throw e_36.error; }
|
|
3690
|
+
}
|
|
3691
|
+
}
|
|
3692
|
+
if (status === 200 || status === 206) {
|
|
3693
|
+
var contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
3694
|
+
var fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
3695
|
+
var fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
3696
|
+
return rxjs.of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
3697
|
+
}
|
|
3698
|
+
else if (status === 404) {
|
|
3699
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3700
|
+
var result404 = null;
|
|
3701
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
3702
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3703
|
+
}));
|
|
3704
|
+
}
|
|
3705
|
+
else if (status === 422) {
|
|
3706
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3707
|
+
var result422 = null;
|
|
3708
|
+
result422 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
3709
|
+
return throwException("Client Error", status, _responseText, _headers, result422);
|
|
3710
|
+
}));
|
|
3711
|
+
}
|
|
3712
|
+
else if (status === 401) {
|
|
3713
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3714
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3715
|
+
}));
|
|
3716
|
+
}
|
|
3717
|
+
else if (status === 403) {
|
|
3718
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3719
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3720
|
+
}));
|
|
3721
|
+
}
|
|
3722
|
+
else if (status !== 200 && status !== 204) {
|
|
3723
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3724
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3725
|
+
}));
|
|
3726
|
+
}
|
|
3727
|
+
return rxjs.of(null);
|
|
3728
|
+
};
|
|
3729
|
+
/**
|
|
3730
|
+
* Returns a 3D-Mockup geometry as binary stream.
|
|
3731
|
+
* @param id 3D-Mockup identifier.
|
|
3732
|
+
* @param ownerId (optional) Private mockup owner identifier.
|
|
3733
|
+
* @param tenantId (optional) Tenant identifier
|
|
3734
|
+
* @return Success
|
|
3735
|
+
*/
|
|
3736
|
+
DesignAtomsMockups3dApiClient.prototype.getGeometryFile = function (id, ownerId, tenantId) {
|
|
3737
|
+
var _this = this;
|
|
3738
|
+
var url_ = this.baseUrl + "/api/atoms/v1/mockups-3d/{id}/geometry/file?";
|
|
3739
|
+
if (id === undefined || id === null)
|
|
3740
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3741
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3742
|
+
if (ownerId !== undefined && ownerId !== null)
|
|
3743
|
+
url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
|
|
3744
|
+
if (tenantId === null)
|
|
3745
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3746
|
+
else if (tenantId !== undefined)
|
|
3747
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3748
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3749
|
+
var options_ = {
|
|
3750
|
+
observe: "response",
|
|
3751
|
+
responseType: "blob",
|
|
3752
|
+
headers: new i1.HttpHeaders({
|
|
3753
|
+
"Accept": "application/json"
|
|
3754
|
+
})
|
|
3755
|
+
};
|
|
3756
|
+
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
3757
|
+
return _this.http.request("get", url_, transformedOptions_);
|
|
3758
|
+
})).pipe(operators.mergeMap(function (response_) {
|
|
3759
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processGetGeometryFile(r); });
|
|
3760
|
+
})).pipe(operators.catchError(function (response_) {
|
|
3761
|
+
if (response_ instanceof i1.HttpResponseBase) {
|
|
3762
|
+
try {
|
|
3763
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processGetGeometryFile(r); });
|
|
3764
|
+
}
|
|
3765
|
+
catch (e) {
|
|
3766
|
+
return rxjs.throwError(e);
|
|
3767
|
+
}
|
|
3768
|
+
}
|
|
3769
|
+
else
|
|
3770
|
+
return rxjs.throwError(response_);
|
|
3771
|
+
}));
|
|
3772
|
+
};
|
|
3773
|
+
DesignAtomsMockups3dApiClient.prototype.processGetGeometryFile = function (response) {
|
|
3774
|
+
var e_37, _a;
|
|
3775
|
+
var _this = this;
|
|
3776
|
+
var status = response.status;
|
|
3777
|
+
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
3778
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
3779
|
+
var _headers = {};
|
|
3780
|
+
if (response.headers) {
|
|
3781
|
+
try {
|
|
3782
|
+
for (var _b = __values(response.headers.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
3783
|
+
var key = _c.value;
|
|
3784
|
+
_headers[key] = response.headers.get(key);
|
|
3785
|
+
}
|
|
3786
|
+
}
|
|
3787
|
+
catch (e_37_1) { e_37 = { error: e_37_1 }; }
|
|
3788
|
+
finally {
|
|
3789
|
+
try {
|
|
3790
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3791
|
+
}
|
|
3792
|
+
finally { if (e_37) throw e_37.error; }
|
|
3793
|
+
}
|
|
3794
|
+
}
|
|
3795
|
+
if (status === 200 || status === 206) {
|
|
3796
|
+
var contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
3797
|
+
var fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
3798
|
+
var fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
3799
|
+
return rxjs.of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
3800
|
+
}
|
|
3801
|
+
else if (status === 404) {
|
|
3802
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3803
|
+
var result404 = null;
|
|
3804
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
3805
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3806
|
+
}));
|
|
3807
|
+
}
|
|
3808
|
+
else if (status === 422) {
|
|
3809
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3810
|
+
var result422 = null;
|
|
3811
|
+
result422 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
3812
|
+
return throwException("Client Error", status, _responseText, _headers, result422);
|
|
3813
|
+
}));
|
|
3814
|
+
}
|
|
3815
|
+
else if (status === 401) {
|
|
3816
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3817
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3818
|
+
}));
|
|
3819
|
+
}
|
|
3820
|
+
else if (status === 403) {
|
|
3821
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3822
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3823
|
+
}));
|
|
3824
|
+
}
|
|
3825
|
+
else if (status !== 200 && status !== 204) {
|
|
3826
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3827
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3828
|
+
}));
|
|
3829
|
+
}
|
|
3830
|
+
return rxjs.of(null);
|
|
3831
|
+
};
|
|
3832
|
+
return DesignAtomsMockups3dApiClient;
|
|
3833
|
+
}(ApiClientBase));
|
|
3834
|
+
DesignAtomsMockups3dApiClient.ɵprov = i0.ɵɵdefineInjectable({ factory: function DesignAtomsMockups3dApiClient_Factory() { return new DesignAtomsMockups3dApiClient(i0.ɵɵinject(ApiClientConfiguration), i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(API_BASE_URL, 8)); }, token: DesignAtomsMockups3dApiClient, providedIn: "root" });
|
|
3835
|
+
DesignAtomsMockups3dApiClient.decorators = [
|
|
3836
|
+
{ type: i0.Injectable, args: [{
|
|
3837
|
+
providedIn: 'root'
|
|
3838
|
+
},] }
|
|
3839
|
+
];
|
|
3840
|
+
DesignAtomsMockups3dApiClient.ctorParameters = function () { return [
|
|
3841
|
+
{ type: ApiClientConfiguration, decorators: [{ type: i0.Inject, args: [ApiClientConfiguration,] }] },
|
|
3842
|
+
{ type: i1.HttpClient, decorators: [{ type: i0.Inject, args: [i1.HttpClient,] }] },
|
|
3843
|
+
{ type: String, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [API_BASE_URL,] }] }
|
|
3844
|
+
]; };
|
|
3845
|
+
var DesignAtomsServiceApiClient = /** @class */ (function (_super) {
|
|
3846
|
+
__extends(DesignAtomsServiceApiClient, _super);
|
|
3847
|
+
function DesignAtomsServiceApiClient(configuration, http, baseUrl) {
|
|
3848
|
+
var _this = _super.call(this, configuration) || this;
|
|
3849
|
+
_this.jsonParseReviver = undefined;
|
|
3850
|
+
_this.http = http;
|
|
3851
|
+
_this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : _this.getBaseUrl("");
|
|
3852
|
+
return _this;
|
|
3853
|
+
}
|
|
3854
|
+
/**
|
|
3855
|
+
* Creates new design file with specified parameters and saves it in storage.
|
|
3856
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3857
|
+
* @param tenantId (optional) Tenant identifier
|
|
3858
|
+
* @param body (optional) Design creation parameters.
|
|
3859
|
+
* @return Created
|
|
3860
|
+
*/
|
|
3861
|
+
DesignAtomsServiceApiClient.prototype.createDesign = function (privateStorageOwner, tenantId, body) {
|
|
3862
|
+
var _this = this;
|
|
3863
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs?";
|
|
3864
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3865
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3866
|
+
if (tenantId === null)
|
|
3867
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3868
|
+
else if (tenantId !== undefined)
|
|
3869
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3870
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3871
|
+
var content_ = JSON.stringify(body);
|
|
3872
|
+
var options_ = {
|
|
3873
|
+
body: content_,
|
|
3874
|
+
observe: "response",
|
|
3875
|
+
responseType: "blob",
|
|
3876
|
+
headers: new i1.HttpHeaders({
|
|
3877
|
+
"Content-Type": "application/json",
|
|
3878
|
+
"Accept": "application/json"
|
|
3879
|
+
})
|
|
3880
|
+
};
|
|
3881
|
+
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
3882
|
+
return _this.http.request("post", url_, transformedOptions_);
|
|
3883
|
+
})).pipe(operators.mergeMap(function (response_) {
|
|
3884
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processCreateDesign(r); });
|
|
3885
|
+
})).pipe(operators.catchError(function (response_) {
|
|
3886
|
+
if (response_ instanceof i1.HttpResponseBase) {
|
|
3887
|
+
try {
|
|
3888
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processCreateDesign(r); });
|
|
3889
|
+
}
|
|
3890
|
+
catch (e) {
|
|
3891
|
+
return rxjs.throwError(e);
|
|
3892
|
+
}
|
|
3893
|
+
}
|
|
3894
|
+
else
|
|
3895
|
+
return rxjs.throwError(response_);
|
|
3896
|
+
}));
|
|
3897
|
+
};
|
|
3898
|
+
DesignAtomsServiceApiClient.prototype.processCreateDesign = function (response) {
|
|
3899
|
+
var e_38, _a;
|
|
3900
|
+
var _this = this;
|
|
3901
|
+
var status = response.status;
|
|
3902
|
+
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
3903
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
3904
|
+
var _headers = {};
|
|
3905
|
+
if (response.headers) {
|
|
3906
|
+
try {
|
|
3907
|
+
for (var _b = __values(response.headers.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
3908
|
+
var key = _c.value;
|
|
3909
|
+
_headers[key] = response.headers.get(key);
|
|
3910
|
+
}
|
|
3911
|
+
}
|
|
3912
|
+
catch (e_38_1) { e_38 = { error: e_38_1 }; }
|
|
3913
|
+
finally {
|
|
3914
|
+
try {
|
|
3915
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3916
|
+
}
|
|
3917
|
+
finally { if (e_38) throw e_38.error; }
|
|
3918
|
+
}
|
|
3919
|
+
}
|
|
3920
|
+
if (status === 201) {
|
|
3921
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3922
|
+
var result201 = null;
|
|
3923
|
+
result201 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
3924
|
+
return rxjs.of(result201);
|
|
3925
|
+
}));
|
|
3926
|
+
}
|
|
3927
|
+
else if (status === 401) {
|
|
3928
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3929
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3930
|
+
}));
|
|
3931
|
+
}
|
|
3932
|
+
else if (status === 403) {
|
|
3933
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3934
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3935
|
+
}));
|
|
3936
|
+
}
|
|
3937
|
+
else if (status !== 200 && status !== 204) {
|
|
3938
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3939
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3940
|
+
}));
|
|
3941
|
+
}
|
|
3942
|
+
return rxjs.of(null);
|
|
3943
|
+
};
|
|
3944
|
+
/**
|
|
3945
|
+
* Returns content of the background.
|
|
3946
|
+
* @param id Design identifier.
|
|
3947
|
+
* @param surfaceIndex (optional) Surface index.
|
|
3948
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3949
|
+
* @param tenantId (optional) Tenant identifier
|
|
3950
|
+
* @return Success
|
|
3951
|
+
*/
|
|
3952
|
+
DesignAtomsServiceApiClient.prototype.extractBackground = function (id, surfaceIndex, privateStorageOwner, tenantId) {
|
|
3066
3953
|
var _this = this;
|
|
3067
|
-
var url_ = this.baseUrl + "/api/atoms/v1/
|
|
3954
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/background?";
|
|
3955
|
+
if (id === undefined || id === null)
|
|
3956
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3957
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3958
|
+
if (surfaceIndex !== undefined && surfaceIndex !== null)
|
|
3959
|
+
url_ += "surfaceIndex=" + encodeURIComponent("" + surfaceIndex) + "&";
|
|
3960
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3961
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3068
3962
|
if (tenantId === null)
|
|
3069
3963
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3070
3964
|
else if (tenantId !== undefined)
|
|
3071
3965
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3072
3966
|
url_ = url_.replace(/[?&]$/, "");
|
|
3073
|
-
var content_ = JSON.stringify(body);
|
|
3074
3967
|
var options_ = {
|
|
3075
|
-
body: content_,
|
|
3076
3968
|
observe: "response",
|
|
3077
3969
|
responseType: "blob",
|
|
3078
3970
|
headers: new i1.HttpHeaders({
|
|
3079
|
-
"
|
|
3080
|
-
"Accept": "application/json"
|
|
3971
|
+
"Accept": "application/octet-stream"
|
|
3081
3972
|
})
|
|
3082
3973
|
};
|
|
3083
3974
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
3084
|
-
return _this.http.request("
|
|
3975
|
+
return _this.http.request("get", url_, transformedOptions_);
|
|
3085
3976
|
})).pipe(operators.mergeMap(function (response_) {
|
|
3086
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
3977
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processExtractBackground(r); });
|
|
3087
3978
|
})).pipe(operators.catchError(function (response_) {
|
|
3088
3979
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
3089
3980
|
try {
|
|
3090
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
3981
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processExtractBackground(r); });
|
|
3091
3982
|
}
|
|
3092
3983
|
catch (e) {
|
|
3093
3984
|
return rxjs.throwError(e);
|
|
@@ -3097,8 +3988,8 @@
|
|
|
3097
3988
|
return rxjs.throwError(response_);
|
|
3098
3989
|
}));
|
|
3099
3990
|
};
|
|
3100
|
-
|
|
3101
|
-
var
|
|
3991
|
+
DesignAtomsServiceApiClient.prototype.processExtractBackground = function (response) {
|
|
3992
|
+
var e_39, _a;
|
|
3102
3993
|
var _this = this;
|
|
3103
3994
|
var status = response.status;
|
|
3104
3995
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -3111,19 +4002,32 @@
|
|
|
3111
4002
|
_headers[key] = response.headers.get(key);
|
|
3112
4003
|
}
|
|
3113
4004
|
}
|
|
3114
|
-
catch (
|
|
4005
|
+
catch (e_39_1) { e_39 = { error: e_39_1 }; }
|
|
3115
4006
|
finally {
|
|
3116
4007
|
try {
|
|
3117
4008
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3118
4009
|
}
|
|
3119
|
-
finally { if (
|
|
4010
|
+
finally { if (e_39) throw e_39.error; }
|
|
3120
4011
|
}
|
|
3121
4012
|
}
|
|
3122
|
-
if (status === 200) {
|
|
4013
|
+
if (status === 200 || status === 206) {
|
|
4014
|
+
var contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
4015
|
+
var fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
4016
|
+
var fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
4017
|
+
return rxjs.of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
4018
|
+
}
|
|
4019
|
+
else if (status === 404) {
|
|
3123
4020
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3124
|
-
var
|
|
3125
|
-
|
|
3126
|
-
return
|
|
4021
|
+
var result404 = null;
|
|
4022
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
4023
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
4024
|
+
}));
|
|
4025
|
+
}
|
|
4026
|
+
else if (status === 422) {
|
|
4027
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4028
|
+
var result422 = null;
|
|
4029
|
+
result422 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
4030
|
+
return throwException("Client Error", status, _responseText, _headers, result422);
|
|
3127
4031
|
}));
|
|
3128
4032
|
}
|
|
3129
4033
|
else if (status === 401) {
|
|
@@ -3143,45 +4047,21 @@
|
|
|
3143
4047
|
}
|
|
3144
4048
|
return rxjs.of(null);
|
|
3145
4049
|
};
|
|
3146
|
-
return DesignAtomsImagesApiClient;
|
|
3147
|
-
}(ApiClientBase));
|
|
3148
|
-
DesignAtomsImagesApiClient.ɵprov = i0.ɵɵdefineInjectable({ factory: function DesignAtomsImagesApiClient_Factory() { return new DesignAtomsImagesApiClient(i0.ɵɵinject(ApiClientConfiguration), i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(API_BASE_URL, 8)); }, token: DesignAtomsImagesApiClient, providedIn: "root" });
|
|
3149
|
-
DesignAtomsImagesApiClient.decorators = [
|
|
3150
|
-
{ type: i0.Injectable, args: [{
|
|
3151
|
-
providedIn: 'root'
|
|
3152
|
-
},] }
|
|
3153
|
-
];
|
|
3154
|
-
DesignAtomsImagesApiClient.ctorParameters = function () { return [
|
|
3155
|
-
{ type: ApiClientConfiguration, decorators: [{ type: i0.Inject, args: [ApiClientConfiguration,] }] },
|
|
3156
|
-
{ type: i1.HttpClient, decorators: [{ type: i0.Inject, args: [i1.HttpClient,] }] },
|
|
3157
|
-
{ type: String, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [API_BASE_URL,] }] }
|
|
3158
|
-
]; };
|
|
3159
|
-
var DesignAtomsMockups3dApiClient = /** @class */ (function (_super) {
|
|
3160
|
-
__extends(DesignAtomsMockups3dApiClient, _super);
|
|
3161
|
-
function DesignAtomsMockups3dApiClient(configuration, http, baseUrl) {
|
|
3162
|
-
var _this = _super.call(this, configuration) || this;
|
|
3163
|
-
_this.jsonParseReviver = undefined;
|
|
3164
|
-
_this.http = http;
|
|
3165
|
-
_this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : _this.getBaseUrl("");
|
|
3166
|
-
return _this;
|
|
3167
|
-
}
|
|
3168
4050
|
/**
|
|
3169
|
-
*
|
|
3170
|
-
* @param id
|
|
3171
|
-
* @param
|
|
4051
|
+
* Loads product (design model) from design file taken from storage.
|
|
4052
|
+
* @param id Design identifier.
|
|
4053
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3172
4054
|
* @param tenantId (optional) Tenant identifier
|
|
3173
4055
|
* @return Success
|
|
3174
4056
|
*/
|
|
3175
|
-
|
|
4057
|
+
DesignAtomsServiceApiClient.prototype.loadProduct = function (id, privateStorageOwner, tenantId) {
|
|
3176
4058
|
var _this = this;
|
|
3177
|
-
var url_ = this.baseUrl + "/api/atoms/v1/
|
|
4059
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/model?";
|
|
3178
4060
|
if (id === undefined || id === null)
|
|
3179
4061
|
throw new Error("The parameter 'id' must be defined.");
|
|
3180
4062
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3181
|
-
if (
|
|
3182
|
-
|
|
3183
|
-
else if (ownerId !== undefined)
|
|
3184
|
-
url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
|
|
4063
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4064
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3185
4065
|
if (tenantId === null)
|
|
3186
4066
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3187
4067
|
else if (tenantId !== undefined)
|
|
@@ -3197,11 +4077,11 @@
|
|
|
3197
4077
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
3198
4078
|
return _this.http.request("get", url_, transformedOptions_);
|
|
3199
4079
|
})).pipe(operators.mergeMap(function (response_) {
|
|
3200
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
4080
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processLoadProduct(r); });
|
|
3201
4081
|
})).pipe(operators.catchError(function (response_) {
|
|
3202
4082
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
3203
4083
|
try {
|
|
3204
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
4084
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processLoadProduct(r); });
|
|
3205
4085
|
}
|
|
3206
4086
|
catch (e) {
|
|
3207
4087
|
return rxjs.throwError(e);
|
|
@@ -3211,8 +4091,8 @@
|
|
|
3211
4091
|
return rxjs.throwError(response_);
|
|
3212
4092
|
}));
|
|
3213
4093
|
};
|
|
3214
|
-
|
|
3215
|
-
var
|
|
4094
|
+
DesignAtomsServiceApiClient.prototype.processLoadProduct = function (response) {
|
|
4095
|
+
var e_40, _a;
|
|
3216
4096
|
var _this = this;
|
|
3217
4097
|
var status = response.status;
|
|
3218
4098
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -3225,12 +4105,12 @@
|
|
|
3225
4105
|
_headers[key] = response.headers.get(key);
|
|
3226
4106
|
}
|
|
3227
4107
|
}
|
|
3228
|
-
catch (
|
|
4108
|
+
catch (e_40_1) { e_40 = { error: e_40_1 }; }
|
|
3229
4109
|
finally {
|
|
3230
4110
|
try {
|
|
3231
4111
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3232
4112
|
}
|
|
3233
|
-
finally { if (
|
|
4113
|
+
finally { if (e_40) throw e_40.error; }
|
|
3234
4114
|
}
|
|
3235
4115
|
}
|
|
3236
4116
|
if (status === 200) {
|
|
@@ -3247,13 +4127,6 @@
|
|
|
3247
4127
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3248
4128
|
}));
|
|
3249
4129
|
}
|
|
3250
|
-
else if (status === 422) {
|
|
3251
|
-
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3252
|
-
var result422 = null;
|
|
3253
|
-
result422 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
3254
|
-
return throwException("Client Error", status, _responseText, _headers, result422);
|
|
3255
|
-
}));
|
|
3256
|
-
}
|
|
3257
4130
|
else if (status === 401) {
|
|
3258
4131
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3259
4132
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -3272,42 +4145,43 @@
|
|
|
3272
4145
|
return rxjs.of(null);
|
|
3273
4146
|
};
|
|
3274
4147
|
/**
|
|
3275
|
-
*
|
|
3276
|
-
* @param id
|
|
3277
|
-
* @param
|
|
4148
|
+
* Saves product (design model) to design file and updates design in storage.
|
|
4149
|
+
* @param id Design identifier.
|
|
4150
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3278
4151
|
* @param tenantId (optional) Tenant identifier
|
|
4152
|
+
* @param body (optional) Serialized product description.
|
|
3279
4153
|
* @return Success
|
|
3280
4154
|
*/
|
|
3281
|
-
|
|
4155
|
+
DesignAtomsServiceApiClient.prototype.saveProduct = function (id, privateStorageOwner, tenantId, body) {
|
|
3282
4156
|
var _this = this;
|
|
3283
|
-
var url_ = this.baseUrl + "/api/atoms/v1/
|
|
4157
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/model?";
|
|
3284
4158
|
if (id === undefined || id === null)
|
|
3285
4159
|
throw new Error("The parameter 'id' must be defined.");
|
|
3286
4160
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3287
|
-
if (
|
|
3288
|
-
|
|
3289
|
-
else if (ownerId !== undefined)
|
|
3290
|
-
url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
|
|
4161
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4162
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3291
4163
|
if (tenantId === null)
|
|
3292
4164
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3293
4165
|
else if (tenantId !== undefined)
|
|
3294
4166
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3295
4167
|
url_ = url_.replace(/[?&]$/, "");
|
|
4168
|
+
var content_ = JSON.stringify(body);
|
|
3296
4169
|
var options_ = {
|
|
4170
|
+
body: content_,
|
|
3297
4171
|
observe: "response",
|
|
3298
4172
|
responseType: "blob",
|
|
3299
4173
|
headers: new i1.HttpHeaders({
|
|
3300
|
-
"
|
|
4174
|
+
"Content-Type": "application/json",
|
|
3301
4175
|
})
|
|
3302
4176
|
};
|
|
3303
4177
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
3304
|
-
return _this.http.request("
|
|
4178
|
+
return _this.http.request("put", url_, transformedOptions_);
|
|
3305
4179
|
})).pipe(operators.mergeMap(function (response_) {
|
|
3306
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
4180
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processSaveProduct(r); });
|
|
3307
4181
|
})).pipe(operators.catchError(function (response_) {
|
|
3308
4182
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
3309
4183
|
try {
|
|
3310
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
4184
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processSaveProduct(r); });
|
|
3311
4185
|
}
|
|
3312
4186
|
catch (e) {
|
|
3313
4187
|
return rxjs.throwError(e);
|
|
@@ -3317,8 +4191,8 @@
|
|
|
3317
4191
|
return rxjs.throwError(response_);
|
|
3318
4192
|
}));
|
|
3319
4193
|
};
|
|
3320
|
-
|
|
3321
|
-
var
|
|
4194
|
+
DesignAtomsServiceApiClient.prototype.processSaveProduct = function (response) {
|
|
4195
|
+
var e_41, _a;
|
|
3322
4196
|
var _this = this;
|
|
3323
4197
|
var status = response.status;
|
|
3324
4198
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -3331,19 +4205,18 @@
|
|
|
3331
4205
|
_headers[key] = response.headers.get(key);
|
|
3332
4206
|
}
|
|
3333
4207
|
}
|
|
3334
|
-
catch (
|
|
4208
|
+
catch (e_41_1) { e_41 = { error: e_41_1 }; }
|
|
3335
4209
|
finally {
|
|
3336
4210
|
try {
|
|
3337
4211
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3338
4212
|
}
|
|
3339
|
-
finally { if (
|
|
4213
|
+
finally { if (e_41) throw e_41.error; }
|
|
3340
4214
|
}
|
|
3341
4215
|
}
|
|
3342
|
-
if (status === 200
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
return rxjs.of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
4216
|
+
if (status === 200) {
|
|
4217
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4218
|
+
return rxjs.of(null);
|
|
4219
|
+
}));
|
|
3347
4220
|
}
|
|
3348
4221
|
else if (status === 404) {
|
|
3349
4222
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
@@ -3352,11 +4225,121 @@
|
|
|
3352
4225
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3353
4226
|
}));
|
|
3354
4227
|
}
|
|
3355
|
-
else if (status ===
|
|
4228
|
+
else if (status === 401) {
|
|
3356
4229
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
4230
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
4231
|
+
}));
|
|
4232
|
+
}
|
|
4233
|
+
else if (status === 403) {
|
|
4234
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4235
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
4236
|
+
}));
|
|
4237
|
+
}
|
|
4238
|
+
else if (status !== 200 && status !== 204) {
|
|
4239
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4240
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4241
|
+
}));
|
|
4242
|
+
}
|
|
4243
|
+
return rxjs.of(null);
|
|
4244
|
+
};
|
|
4245
|
+
/**
|
|
4246
|
+
* Patches product (design model) in design file.
|
|
4247
|
+
* @param id Design identifier.
|
|
4248
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
4249
|
+
* @param tenantId (optional) Tenant identifier
|
|
4250
|
+
* @param patchType (optional)
|
|
4251
|
+
* @param replaceImageItemFileInfo_itemName (optional)
|
|
4252
|
+
* @param replaceImageItemFileInfo_sourceFile (optional)
|
|
4253
|
+
* @param replacePlaceholderItemContentInfo_placeholderItemName (optional)
|
|
4254
|
+
* @param replacePlaceholderItemContentInfo_newContentType (optional)
|
|
4255
|
+
* @param replacePlaceholderItemContentInfo_sourceFile (optional)
|
|
4256
|
+
* @return Success
|
|
4257
|
+
*/
|
|
4258
|
+
DesignAtomsServiceApiClient.prototype.patchProduct = function (id, privateStorageOwner, tenantId, patchType, replaceImageItemFileInfo_itemName, replaceImageItemFileInfo_sourceFile, replacePlaceholderItemContentInfo_placeholderItemName, replacePlaceholderItemContentInfo_newContentType, replacePlaceholderItemContentInfo_sourceFile) {
|
|
4259
|
+
var _this = this;
|
|
4260
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/model?";
|
|
4261
|
+
if (id === undefined || id === null)
|
|
4262
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
4263
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4264
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4265
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
4266
|
+
if (tenantId === null)
|
|
4267
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4268
|
+
else if (tenantId !== undefined)
|
|
4269
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
4270
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4271
|
+
var content_ = new FormData();
|
|
4272
|
+
if (patchType === null || patchType === undefined)
|
|
4273
|
+
throw new Error("The parameter 'patchType' cannot be null.");
|
|
4274
|
+
else
|
|
4275
|
+
content_.append("patchType", patchType.toString());
|
|
4276
|
+
if (replaceImageItemFileInfo_itemName !== null && replaceImageItemFileInfo_itemName !== undefined)
|
|
4277
|
+
content_.append("replaceImageItemFileInfo.itemName", replaceImageItemFileInfo_itemName.toString());
|
|
4278
|
+
if (replaceImageItemFileInfo_sourceFile !== null && replaceImageItemFileInfo_sourceFile !== undefined)
|
|
4279
|
+
content_.append("replaceImageItemFileInfo.sourceFile", replaceImageItemFileInfo_sourceFile.data, replaceImageItemFileInfo_sourceFile.fileName ? replaceImageItemFileInfo_sourceFile.fileName : "replaceImageItemFileInfo.sourceFile");
|
|
4280
|
+
if (replacePlaceholderItemContentInfo_placeholderItemName !== null && replacePlaceholderItemContentInfo_placeholderItemName !== undefined)
|
|
4281
|
+
content_.append("replacePlaceholderItemContentInfo.placeholderItemName", replacePlaceholderItemContentInfo_placeholderItemName.toString());
|
|
4282
|
+
if (replacePlaceholderItemContentInfo_newContentType === null || replacePlaceholderItemContentInfo_newContentType === undefined)
|
|
4283
|
+
throw new Error("The parameter 'replacePlaceholderItemContentInfo_newContentType' cannot be null.");
|
|
4284
|
+
else
|
|
4285
|
+
content_.append("replacePlaceholderItemContentInfo.newContentType", replacePlaceholderItemContentInfo_newContentType.toString());
|
|
4286
|
+
if (replacePlaceholderItemContentInfo_sourceFile !== null && replacePlaceholderItemContentInfo_sourceFile !== undefined)
|
|
4287
|
+
content_.append("replacePlaceholderItemContentInfo.sourceFile", replacePlaceholderItemContentInfo_sourceFile.data, replacePlaceholderItemContentInfo_sourceFile.fileName ? replacePlaceholderItemContentInfo_sourceFile.fileName : "replacePlaceholderItemContentInfo.sourceFile");
|
|
4288
|
+
var options_ = {
|
|
4289
|
+
body: content_,
|
|
4290
|
+
observe: "response",
|
|
4291
|
+
responseType: "blob",
|
|
4292
|
+
headers: new i1.HttpHeaders({})
|
|
4293
|
+
};
|
|
4294
|
+
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
4295
|
+
return _this.http.request("patch", url_, transformedOptions_);
|
|
4296
|
+
})).pipe(operators.mergeMap(function (response_) {
|
|
4297
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processPatchProduct(r); });
|
|
4298
|
+
})).pipe(operators.catchError(function (response_) {
|
|
4299
|
+
if (response_ instanceof i1.HttpResponseBase) {
|
|
4300
|
+
try {
|
|
4301
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processPatchProduct(r); });
|
|
4302
|
+
}
|
|
4303
|
+
catch (e) {
|
|
4304
|
+
return rxjs.throwError(e);
|
|
4305
|
+
}
|
|
4306
|
+
}
|
|
4307
|
+
else
|
|
4308
|
+
return rxjs.throwError(response_);
|
|
4309
|
+
}));
|
|
4310
|
+
};
|
|
4311
|
+
DesignAtomsServiceApiClient.prototype.processPatchProduct = function (response) {
|
|
4312
|
+
var e_42, _a;
|
|
4313
|
+
var _this = this;
|
|
4314
|
+
var status = response.status;
|
|
4315
|
+
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
4316
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
4317
|
+
var _headers = {};
|
|
4318
|
+
if (response.headers) {
|
|
4319
|
+
try {
|
|
4320
|
+
for (var _b = __values(response.headers.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
4321
|
+
var key = _c.value;
|
|
4322
|
+
_headers[key] = response.headers.get(key);
|
|
4323
|
+
}
|
|
4324
|
+
}
|
|
4325
|
+
catch (e_42_1) { e_42 = { error: e_42_1 }; }
|
|
4326
|
+
finally {
|
|
4327
|
+
try {
|
|
4328
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
4329
|
+
}
|
|
4330
|
+
finally { if (e_42) throw e_42.error; }
|
|
4331
|
+
}
|
|
4332
|
+
}
|
|
4333
|
+
if (status === 200) {
|
|
4334
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4335
|
+
return rxjs.of(null);
|
|
4336
|
+
}));
|
|
4337
|
+
}
|
|
4338
|
+
else if (status === 404) {
|
|
4339
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4340
|
+
var result404 = null;
|
|
4341
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
4342
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3360
4343
|
}));
|
|
3361
4344
|
}
|
|
3362
4345
|
else if (status === 401) {
|
|
@@ -3377,22 +4360,20 @@
|
|
|
3377
4360
|
return rxjs.of(null);
|
|
3378
4361
|
};
|
|
3379
4362
|
/**
|
|
3380
|
-
* Returns
|
|
3381
|
-
* @param id
|
|
3382
|
-
* @param
|
|
4363
|
+
* Returns design parameters stored in product model.
|
|
4364
|
+
* @param id Design identifier.
|
|
4365
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3383
4366
|
* @param tenantId (optional) Tenant identifier
|
|
3384
4367
|
* @return Success
|
|
3385
4368
|
*/
|
|
3386
|
-
|
|
4369
|
+
DesignAtomsServiceApiClient.prototype.getDesignParameters = function (id, privateStorageOwner, tenantId) {
|
|
3387
4370
|
var _this = this;
|
|
3388
|
-
var url_ = this.baseUrl + "/api/atoms/v1/
|
|
4371
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/parameters?";
|
|
3389
4372
|
if (id === undefined || id === null)
|
|
3390
4373
|
throw new Error("The parameter 'id' must be defined.");
|
|
3391
4374
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3392
|
-
if (
|
|
3393
|
-
|
|
3394
|
-
else if (ownerId !== undefined)
|
|
3395
|
-
url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
|
|
4375
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4376
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3396
4377
|
if (tenantId === null)
|
|
3397
4378
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3398
4379
|
else if (tenantId !== undefined)
|
|
@@ -3408,11 +4389,11 @@
|
|
|
3408
4389
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
3409
4390
|
return _this.http.request("get", url_, transformedOptions_);
|
|
3410
4391
|
})).pipe(operators.mergeMap(function (response_) {
|
|
3411
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
4392
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processGetDesignParameters(r); });
|
|
3412
4393
|
})).pipe(operators.catchError(function (response_) {
|
|
3413
4394
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
3414
4395
|
try {
|
|
3415
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
4396
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processGetDesignParameters(r); });
|
|
3416
4397
|
}
|
|
3417
4398
|
catch (e) {
|
|
3418
4399
|
return rxjs.throwError(e);
|
|
@@ -3422,8 +4403,8 @@
|
|
|
3422
4403
|
return rxjs.throwError(response_);
|
|
3423
4404
|
}));
|
|
3424
4405
|
};
|
|
3425
|
-
|
|
3426
|
-
var
|
|
4406
|
+
DesignAtomsServiceApiClient.prototype.processGetDesignParameters = function (response) {
|
|
4407
|
+
var e_43, _a;
|
|
3427
4408
|
var _this = this;
|
|
3428
4409
|
var status = response.status;
|
|
3429
4410
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -3436,19 +4417,20 @@
|
|
|
3436
4417
|
_headers[key] = response.headers.get(key);
|
|
3437
4418
|
}
|
|
3438
4419
|
}
|
|
3439
|
-
catch (
|
|
4420
|
+
catch (e_43_1) { e_43 = { error: e_43_1 }; }
|
|
3440
4421
|
finally {
|
|
3441
4422
|
try {
|
|
3442
4423
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3443
4424
|
}
|
|
3444
|
-
finally { if (
|
|
4425
|
+
finally { if (e_43) throw e_43.error; }
|
|
3445
4426
|
}
|
|
3446
4427
|
}
|
|
3447
|
-
if (status === 200
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
4428
|
+
if (status === 200) {
|
|
4429
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4430
|
+
var result200 = null;
|
|
4431
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
4432
|
+
return rxjs.of(result200);
|
|
4433
|
+
}));
|
|
3452
4434
|
}
|
|
3453
4435
|
else if (status === 404) {
|
|
3454
4436
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
@@ -3457,13 +4439,6 @@
|
|
|
3457
4439
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3458
4440
|
}));
|
|
3459
4441
|
}
|
|
3460
|
-
else if (status === 422) {
|
|
3461
|
-
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3462
|
-
var result422 = null;
|
|
3463
|
-
result422 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
3464
|
-
return throwException("Client Error", status, _responseText, _headers, result422);
|
|
3465
|
-
}));
|
|
3466
|
-
}
|
|
3467
4442
|
else if (status === 401) {
|
|
3468
4443
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3469
4444
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -3481,65 +4456,41 @@
|
|
|
3481
4456
|
}
|
|
3482
4457
|
return rxjs.of(null);
|
|
3483
4458
|
};
|
|
3484
|
-
return DesignAtomsMockups3dApiClient;
|
|
3485
|
-
}(ApiClientBase));
|
|
3486
|
-
DesignAtomsMockups3dApiClient.ɵprov = i0.ɵɵdefineInjectable({ factory: function DesignAtomsMockups3dApiClient_Factory() { return new DesignAtomsMockups3dApiClient(i0.ɵɵinject(ApiClientConfiguration), i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(API_BASE_URL, 8)); }, token: DesignAtomsMockups3dApiClient, providedIn: "root" });
|
|
3487
|
-
DesignAtomsMockups3dApiClient.decorators = [
|
|
3488
|
-
{ type: i0.Injectable, args: [{
|
|
3489
|
-
providedIn: 'root'
|
|
3490
|
-
},] }
|
|
3491
|
-
];
|
|
3492
|
-
DesignAtomsMockups3dApiClient.ctorParameters = function () { return [
|
|
3493
|
-
{ type: ApiClientConfiguration, decorators: [{ type: i0.Inject, args: [ApiClientConfiguration,] }] },
|
|
3494
|
-
{ type: i1.HttpClient, decorators: [{ type: i0.Inject, args: [i1.HttpClient,] }] },
|
|
3495
|
-
{ type: String, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [API_BASE_URL,] }] }
|
|
3496
|
-
]; };
|
|
3497
|
-
var DesignAtomsServiceApiClient = /** @class */ (function (_super) {
|
|
3498
|
-
__extends(DesignAtomsServiceApiClient, _super);
|
|
3499
|
-
function DesignAtomsServiceApiClient(configuration, http, baseUrl) {
|
|
3500
|
-
var _this = _super.call(this, configuration) || this;
|
|
3501
|
-
_this.jsonParseReviver = undefined;
|
|
3502
|
-
_this.http = http;
|
|
3503
|
-
_this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : _this.getBaseUrl("");
|
|
3504
|
-
return _this;
|
|
3505
|
-
}
|
|
3506
4459
|
/**
|
|
3507
|
-
*
|
|
4460
|
+
* Loads data schema from design file taken from storage.
|
|
4461
|
+
* @param id Design identifier.
|
|
3508
4462
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3509
4463
|
* @param tenantId (optional) Tenant identifier
|
|
3510
|
-
* @
|
|
3511
|
-
* @return Created
|
|
4464
|
+
* @return Success
|
|
3512
4465
|
*/
|
|
3513
|
-
DesignAtomsServiceApiClient.prototype.
|
|
4466
|
+
DesignAtomsServiceApiClient.prototype.loadDataSchema = function (id, privateStorageOwner, tenantId) {
|
|
3514
4467
|
var _this = this;
|
|
3515
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs?";
|
|
3516
|
-
if (
|
|
3517
|
-
throw new Error("The parameter '
|
|
3518
|
-
|
|
4468
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/schema?";
|
|
4469
|
+
if (id === undefined || id === null)
|
|
4470
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
4471
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4472
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3519
4473
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3520
4474
|
if (tenantId === null)
|
|
3521
4475
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3522
4476
|
else if (tenantId !== undefined)
|
|
3523
4477
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3524
4478
|
url_ = url_.replace(/[?&]$/, "");
|
|
3525
|
-
var content_ = JSON.stringify(body);
|
|
3526
4479
|
var options_ = {
|
|
3527
|
-
body: content_,
|
|
3528
4480
|
observe: "response",
|
|
3529
4481
|
responseType: "blob",
|
|
3530
4482
|
headers: new i1.HttpHeaders({
|
|
3531
|
-
"
|
|
3532
|
-
"Accept": "application/json"
|
|
4483
|
+
"Accept": "application/octet-stream"
|
|
3533
4484
|
})
|
|
3534
4485
|
};
|
|
3535
4486
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
3536
|
-
return _this.http.request("
|
|
4487
|
+
return _this.http.request("get", url_, transformedOptions_);
|
|
3537
4488
|
})).pipe(operators.mergeMap(function (response_) {
|
|
3538
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
4489
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processLoadDataSchema(r); });
|
|
3539
4490
|
})).pipe(operators.catchError(function (response_) {
|
|
3540
4491
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
3541
4492
|
try {
|
|
3542
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
4493
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processLoadDataSchema(r); });
|
|
3543
4494
|
}
|
|
3544
4495
|
catch (e) {
|
|
3545
4496
|
return rxjs.throwError(e);
|
|
@@ -3549,8 +4500,8 @@
|
|
|
3549
4500
|
return rxjs.throwError(response_);
|
|
3550
4501
|
}));
|
|
3551
4502
|
};
|
|
3552
|
-
DesignAtomsServiceApiClient.prototype.
|
|
3553
|
-
var
|
|
4503
|
+
DesignAtomsServiceApiClient.prototype.processLoadDataSchema = function (response) {
|
|
4504
|
+
var e_44, _a;
|
|
3554
4505
|
var _this = this;
|
|
3555
4506
|
var status = response.status;
|
|
3556
4507
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -3563,19 +4514,32 @@
|
|
|
3563
4514
|
_headers[key] = response.headers.get(key);
|
|
3564
4515
|
}
|
|
3565
4516
|
}
|
|
3566
|
-
catch (
|
|
4517
|
+
catch (e_44_1) { e_44 = { error: e_44_1 }; }
|
|
3567
4518
|
finally {
|
|
3568
4519
|
try {
|
|
3569
4520
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3570
4521
|
}
|
|
3571
|
-
finally { if (
|
|
4522
|
+
finally { if (e_44) throw e_44.error; }
|
|
3572
4523
|
}
|
|
3573
4524
|
}
|
|
3574
|
-
if (status ===
|
|
4525
|
+
if (status === 200 || status === 206) {
|
|
4526
|
+
var contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
4527
|
+
var fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
4528
|
+
var fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
4529
|
+
return rxjs.of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
4530
|
+
}
|
|
4531
|
+
else if (status === 404) {
|
|
3575
4532
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3576
|
-
var
|
|
3577
|
-
|
|
3578
|
-
return
|
|
4533
|
+
var result404 = null;
|
|
4534
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
4535
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
4536
|
+
}));
|
|
4537
|
+
}
|
|
4538
|
+
else if (status === 409) {
|
|
4539
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4540
|
+
var result409 = null;
|
|
4541
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
4542
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3579
4543
|
}));
|
|
3580
4544
|
}
|
|
3581
4545
|
else if (status === 401) {
|
|
@@ -3596,26 +4560,19 @@
|
|
|
3596
4560
|
return rxjs.of(null);
|
|
3597
4561
|
};
|
|
3598
4562
|
/**
|
|
3599
|
-
*
|
|
4563
|
+
* Loads a toggle set from design file taken from storage.
|
|
3600
4564
|
* @param id Design identifier.
|
|
3601
|
-
* @param surfaceIndex (optional) Surface index.
|
|
3602
4565
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3603
4566
|
* @param tenantId (optional) Tenant identifier
|
|
3604
4567
|
* @return Success
|
|
3605
4568
|
*/
|
|
3606
|
-
DesignAtomsServiceApiClient.prototype.
|
|
4569
|
+
DesignAtomsServiceApiClient.prototype.loadToggleSet = function (id, privateStorageOwner, tenantId) {
|
|
3607
4570
|
var _this = this;
|
|
3608
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/
|
|
4571
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/toggle-set?";
|
|
3609
4572
|
if (id === undefined || id === null)
|
|
3610
4573
|
throw new Error("The parameter 'id' must be defined.");
|
|
3611
4574
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3612
|
-
if (
|
|
3613
|
-
throw new Error("The parameter 'surfaceIndex' cannot be null.");
|
|
3614
|
-
else if (surfaceIndex !== undefined)
|
|
3615
|
-
url_ += "surfaceIndex=" + encodeURIComponent("" + surfaceIndex) + "&";
|
|
3616
|
-
if (privateStorageOwner === null)
|
|
3617
|
-
throw new Error("The parameter 'privateStorageOwner' cannot be null.");
|
|
3618
|
-
else if (privateStorageOwner !== undefined)
|
|
4575
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3619
4576
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3620
4577
|
if (tenantId === null)
|
|
3621
4578
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
@@ -3632,11 +4589,11 @@
|
|
|
3632
4589
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
3633
4590
|
return _this.http.request("get", url_, transformedOptions_);
|
|
3634
4591
|
})).pipe(operators.mergeMap(function (response_) {
|
|
3635
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
4592
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processLoadToggleSet(r); });
|
|
3636
4593
|
})).pipe(operators.catchError(function (response_) {
|
|
3637
4594
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
3638
4595
|
try {
|
|
3639
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
4596
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processLoadToggleSet(r); });
|
|
3640
4597
|
}
|
|
3641
4598
|
catch (e) {
|
|
3642
4599
|
return rxjs.throwError(e);
|
|
@@ -3646,8 +4603,8 @@
|
|
|
3646
4603
|
return rxjs.throwError(response_);
|
|
3647
4604
|
}));
|
|
3648
4605
|
};
|
|
3649
|
-
DesignAtomsServiceApiClient.prototype.
|
|
3650
|
-
var
|
|
4606
|
+
DesignAtomsServiceApiClient.prototype.processLoadToggleSet = function (response) {
|
|
4607
|
+
var e_45, _a;
|
|
3651
4608
|
var _this = this;
|
|
3652
4609
|
var status = response.status;
|
|
3653
4610
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -3660,12 +4617,12 @@
|
|
|
3660
4617
|
_headers[key] = response.headers.get(key);
|
|
3661
4618
|
}
|
|
3662
4619
|
}
|
|
3663
|
-
catch (
|
|
4620
|
+
catch (e_45_1) { e_45 = { error: e_45_1 }; }
|
|
3664
4621
|
finally {
|
|
3665
4622
|
try {
|
|
3666
4623
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3667
4624
|
}
|
|
3668
|
-
finally { if (
|
|
4625
|
+
finally { if (e_45) throw e_45.error; }
|
|
3669
4626
|
}
|
|
3670
4627
|
}
|
|
3671
4628
|
if (status === 200 || status === 206) {
|
|
@@ -3681,11 +4638,11 @@
|
|
|
3681
4638
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3682
4639
|
}));
|
|
3683
4640
|
}
|
|
3684
|
-
else if (status ===
|
|
4641
|
+
else if (status === 409) {
|
|
3685
4642
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3686
|
-
var
|
|
3687
|
-
|
|
3688
|
-
return throwException("
|
|
4643
|
+
var result409 = null;
|
|
4644
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
4645
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3689
4646
|
}));
|
|
3690
4647
|
}
|
|
3691
4648
|
else if (status === 401) {
|
|
@@ -3706,21 +4663,19 @@
|
|
|
3706
4663
|
return rxjs.of(null);
|
|
3707
4664
|
};
|
|
3708
4665
|
/**
|
|
3709
|
-
*
|
|
4666
|
+
* Gets variable items information for design file taken from storage.
|
|
3710
4667
|
* @param id Design identifier.
|
|
3711
4668
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3712
4669
|
* @param tenantId (optional) Tenant identifier
|
|
3713
4670
|
* @return Success
|
|
3714
4671
|
*/
|
|
3715
|
-
DesignAtomsServiceApiClient.prototype.
|
|
4672
|
+
DesignAtomsServiceApiClient.prototype.getVariables = function (id, privateStorageOwner, tenantId) {
|
|
3716
4673
|
var _this = this;
|
|
3717
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/
|
|
4674
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/variables?";
|
|
3718
4675
|
if (id === undefined || id === null)
|
|
3719
4676
|
throw new Error("The parameter 'id' must be defined.");
|
|
3720
4677
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3721
|
-
if (privateStorageOwner
|
|
3722
|
-
throw new Error("The parameter 'privateStorageOwner' cannot be null.");
|
|
3723
|
-
else if (privateStorageOwner !== undefined)
|
|
4678
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3724
4679
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3725
4680
|
if (tenantId === null)
|
|
3726
4681
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
@@ -3737,11 +4692,11 @@
|
|
|
3737
4692
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
3738
4693
|
return _this.http.request("get", url_, transformedOptions_);
|
|
3739
4694
|
})).pipe(operators.mergeMap(function (response_) {
|
|
3740
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
4695
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processGetVariables(r); });
|
|
3741
4696
|
})).pipe(operators.catchError(function (response_) {
|
|
3742
4697
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
3743
4698
|
try {
|
|
3744
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
4699
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processGetVariables(r); });
|
|
3745
4700
|
}
|
|
3746
4701
|
catch (e) {
|
|
3747
4702
|
return rxjs.throwError(e);
|
|
@@ -3751,8 +4706,8 @@
|
|
|
3751
4706
|
return rxjs.throwError(response_);
|
|
3752
4707
|
}));
|
|
3753
4708
|
};
|
|
3754
|
-
DesignAtomsServiceApiClient.prototype.
|
|
3755
|
-
var
|
|
4709
|
+
DesignAtomsServiceApiClient.prototype.processGetVariables = function (response) {
|
|
4710
|
+
var e_46, _a;
|
|
3756
4711
|
var _this = this;
|
|
3757
4712
|
var status = response.status;
|
|
3758
4713
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -3765,12 +4720,12 @@
|
|
|
3765
4720
|
_headers[key] = response.headers.get(key);
|
|
3766
4721
|
}
|
|
3767
4722
|
}
|
|
3768
|
-
catch (
|
|
4723
|
+
catch (e_46_1) { e_46 = { error: e_46_1 }; }
|
|
3769
4724
|
finally {
|
|
3770
4725
|
try {
|
|
3771
4726
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3772
4727
|
}
|
|
3773
|
-
finally { if (
|
|
4728
|
+
finally { if (e_46) throw e_46.error; }
|
|
3774
4729
|
}
|
|
3775
4730
|
}
|
|
3776
4731
|
if (status === 200) {
|
|
@@ -3805,22 +4760,20 @@
|
|
|
3805
4760
|
return rxjs.of(null);
|
|
3806
4761
|
};
|
|
3807
4762
|
/**
|
|
3808
|
-
*
|
|
4763
|
+
* Sets variable items values for design file taken from storage.
|
|
3809
4764
|
* @param id Design identifier.
|
|
3810
4765
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3811
4766
|
* @param tenantId (optional) Tenant identifier
|
|
3812
|
-
* @param body (optional)
|
|
4767
|
+
* @param body (optional) Design variable values.
|
|
3813
4768
|
* @return Success
|
|
3814
4769
|
*/
|
|
3815
|
-
DesignAtomsServiceApiClient.prototype.
|
|
4770
|
+
DesignAtomsServiceApiClient.prototype.setVariables = function (id, privateStorageOwner, tenantId, body) {
|
|
3816
4771
|
var _this = this;
|
|
3817
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/
|
|
4772
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/variables?";
|
|
3818
4773
|
if (id === undefined || id === null)
|
|
3819
4774
|
throw new Error("The parameter 'id' must be defined.");
|
|
3820
4775
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3821
|
-
if (privateStorageOwner
|
|
3822
|
-
throw new Error("The parameter 'privateStorageOwner' cannot be null.");
|
|
3823
|
-
else if (privateStorageOwner !== undefined)
|
|
4776
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3824
4777
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3825
4778
|
if (tenantId === null)
|
|
3826
4779
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
@@ -3839,11 +4792,11 @@
|
|
|
3839
4792
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
3840
4793
|
return _this.http.request("put", url_, transformedOptions_);
|
|
3841
4794
|
})).pipe(operators.mergeMap(function (response_) {
|
|
3842
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
4795
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processSetVariables(r); });
|
|
3843
4796
|
})).pipe(operators.catchError(function (response_) {
|
|
3844
4797
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
3845
4798
|
try {
|
|
3846
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
4799
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processSetVariables(r); });
|
|
3847
4800
|
}
|
|
3848
4801
|
catch (e) {
|
|
3849
4802
|
return rxjs.throwError(e);
|
|
@@ -3853,8 +4806,8 @@
|
|
|
3853
4806
|
return rxjs.throwError(response_);
|
|
3854
4807
|
}));
|
|
3855
4808
|
};
|
|
3856
|
-
DesignAtomsServiceApiClient.prototype.
|
|
3857
|
-
var
|
|
4809
|
+
DesignAtomsServiceApiClient.prototype.processSetVariables = function (response) {
|
|
4810
|
+
var e_47, _a;
|
|
3858
4811
|
var _this = this;
|
|
3859
4812
|
var status = response.status;
|
|
3860
4813
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -3867,12 +4820,12 @@
|
|
|
3867
4820
|
_headers[key] = response.headers.get(key);
|
|
3868
4821
|
}
|
|
3869
4822
|
}
|
|
3870
|
-
catch (
|
|
4823
|
+
catch (e_47_1) { e_47 = { error: e_47_1 }; }
|
|
3871
4824
|
finally {
|
|
3872
4825
|
try {
|
|
3873
4826
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3874
4827
|
}
|
|
3875
|
-
finally { if (
|
|
4828
|
+
finally { if (e_47) throw e_47.error; }
|
|
3876
4829
|
}
|
|
3877
4830
|
}
|
|
3878
4831
|
if (status === 200) {
|
|
@@ -3887,6 +4840,13 @@
|
|
|
3887
4840
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3888
4841
|
}));
|
|
3889
4842
|
}
|
|
4843
|
+
else if (status === 409) {
|
|
4844
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4845
|
+
var result409 = null;
|
|
4846
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
4847
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
4848
|
+
}));
|
|
4849
|
+
}
|
|
3890
4850
|
else if (status === 401) {
|
|
3891
4851
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3892
4852
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -3905,64 +4865,40 @@
|
|
|
3905
4865
|
return rxjs.of(null);
|
|
3906
4866
|
};
|
|
3907
4867
|
/**
|
|
3908
|
-
*
|
|
4868
|
+
* Loads variable data printing information from design file taken from storage.
|
|
3909
4869
|
* @param id Design identifier.
|
|
3910
4870
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3911
4871
|
* @param tenantId (optional) Tenant identifier
|
|
3912
|
-
* @param patchType (optional)
|
|
3913
|
-
* @param replaceImageItemFileInfo_itemName (optional)
|
|
3914
|
-
* @param replaceImageItemFileInfo_sourceFile (optional)
|
|
3915
|
-
* @param replacePlaceholderItemContentInfo_placeholderItemName (optional)
|
|
3916
|
-
* @param replacePlaceholderItemContentInfo_newContentType (optional)
|
|
3917
|
-
* @param replacePlaceholderItemContentInfo_sourceFile (optional)
|
|
3918
4872
|
* @return Success
|
|
3919
4873
|
*/
|
|
3920
|
-
DesignAtomsServiceApiClient.prototype.
|
|
4874
|
+
DesignAtomsServiceApiClient.prototype.loadVdpData = function (id, privateStorageOwner, tenantId) {
|
|
3921
4875
|
var _this = this;
|
|
3922
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/
|
|
4876
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/vdp-data?";
|
|
3923
4877
|
if (id === undefined || id === null)
|
|
3924
4878
|
throw new Error("The parameter 'id' must be defined.");
|
|
3925
4879
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3926
|
-
if (privateStorageOwner
|
|
3927
|
-
throw new Error("The parameter 'privateStorageOwner' cannot be null.");
|
|
3928
|
-
else if (privateStorageOwner !== undefined)
|
|
4880
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3929
4881
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3930
4882
|
if (tenantId === null)
|
|
3931
4883
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3932
4884
|
else if (tenantId !== undefined)
|
|
3933
4885
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3934
4886
|
url_ = url_.replace(/[?&]$/, "");
|
|
3935
|
-
var content_ = new FormData();
|
|
3936
|
-
if (patchType === null || patchType === undefined)
|
|
3937
|
-
throw new Error("The parameter 'patchType' cannot be null.");
|
|
3938
|
-
else
|
|
3939
|
-
content_.append("patchType", patchType.toString());
|
|
3940
|
-
if (replaceImageItemFileInfo_itemName !== null && replaceImageItemFileInfo_itemName !== undefined)
|
|
3941
|
-
content_.append("replaceImageItemFileInfo.itemName", replaceImageItemFileInfo_itemName.toString());
|
|
3942
|
-
if (replaceImageItemFileInfo_sourceFile !== null && replaceImageItemFileInfo_sourceFile !== undefined)
|
|
3943
|
-
content_.append("replaceImageItemFileInfo.sourceFile", replaceImageItemFileInfo_sourceFile.data, replaceImageItemFileInfo_sourceFile.fileName ? replaceImageItemFileInfo_sourceFile.fileName : "replaceImageItemFileInfo.sourceFile");
|
|
3944
|
-
if (replacePlaceholderItemContentInfo_placeholderItemName !== null && replacePlaceholderItemContentInfo_placeholderItemName !== undefined)
|
|
3945
|
-
content_.append("replacePlaceholderItemContentInfo.placeholderItemName", replacePlaceholderItemContentInfo_placeholderItemName.toString());
|
|
3946
|
-
if (replacePlaceholderItemContentInfo_newContentType === null || replacePlaceholderItemContentInfo_newContentType === undefined)
|
|
3947
|
-
throw new Error("The parameter 'replacePlaceholderItemContentInfo_newContentType' cannot be null.");
|
|
3948
|
-
else
|
|
3949
|
-
content_.append("replacePlaceholderItemContentInfo.newContentType", replacePlaceholderItemContentInfo_newContentType.toString());
|
|
3950
|
-
if (replacePlaceholderItemContentInfo_sourceFile !== null && replacePlaceholderItemContentInfo_sourceFile !== undefined)
|
|
3951
|
-
content_.append("replacePlaceholderItemContentInfo.sourceFile", replacePlaceholderItemContentInfo_sourceFile.data, replacePlaceholderItemContentInfo_sourceFile.fileName ? replacePlaceholderItemContentInfo_sourceFile.fileName : "replacePlaceholderItemContentInfo.sourceFile");
|
|
3952
4887
|
var options_ = {
|
|
3953
|
-
body: content_,
|
|
3954
4888
|
observe: "response",
|
|
3955
4889
|
responseType: "blob",
|
|
3956
|
-
headers: new i1.HttpHeaders({
|
|
4890
|
+
headers: new i1.HttpHeaders({
|
|
4891
|
+
"Accept": "application/json"
|
|
4892
|
+
})
|
|
3957
4893
|
};
|
|
3958
4894
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
3959
|
-
return _this.http.request("
|
|
4895
|
+
return _this.http.request("get", url_, transformedOptions_);
|
|
3960
4896
|
})).pipe(operators.mergeMap(function (response_) {
|
|
3961
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
4897
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processLoadVdpData(r); });
|
|
3962
4898
|
})).pipe(operators.catchError(function (response_) {
|
|
3963
4899
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
3964
4900
|
try {
|
|
3965
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
4901
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processLoadVdpData(r); });
|
|
3966
4902
|
}
|
|
3967
4903
|
catch (e) {
|
|
3968
4904
|
return rxjs.throwError(e);
|
|
@@ -3972,8 +4908,8 @@
|
|
|
3972
4908
|
return rxjs.throwError(response_);
|
|
3973
4909
|
}));
|
|
3974
4910
|
};
|
|
3975
|
-
DesignAtomsServiceApiClient.prototype.
|
|
3976
|
-
var
|
|
4911
|
+
DesignAtomsServiceApiClient.prototype.processLoadVdpData = function (response) {
|
|
4912
|
+
var e_48, _a;
|
|
3977
4913
|
var _this = this;
|
|
3978
4914
|
var status = response.status;
|
|
3979
4915
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -3986,17 +4922,19 @@
|
|
|
3986
4922
|
_headers[key] = response.headers.get(key);
|
|
3987
4923
|
}
|
|
3988
4924
|
}
|
|
3989
|
-
catch (
|
|
4925
|
+
catch (e_48_1) { e_48 = { error: e_48_1 }; }
|
|
3990
4926
|
finally {
|
|
3991
4927
|
try {
|
|
3992
4928
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3993
4929
|
}
|
|
3994
|
-
finally { if (
|
|
4930
|
+
finally { if (e_48) throw e_48.error; }
|
|
3995
4931
|
}
|
|
3996
4932
|
}
|
|
3997
4933
|
if (status === 200) {
|
|
3998
4934
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
3999
|
-
|
|
4935
|
+
var result200 = null;
|
|
4936
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
4937
|
+
return rxjs.of(result200);
|
|
4000
4938
|
}));
|
|
4001
4939
|
}
|
|
4002
4940
|
else if (status === 404) {
|
|
@@ -4006,6 +4944,13 @@
|
|
|
4006
4944
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
4007
4945
|
}));
|
|
4008
4946
|
}
|
|
4947
|
+
else if (status === 409) {
|
|
4948
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4949
|
+
var result409 = null;
|
|
4950
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
4951
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
4952
|
+
}));
|
|
4953
|
+
}
|
|
4009
4954
|
else if (status === 401) {
|
|
4010
4955
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4011
4956
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -4024,42 +4969,43 @@
|
|
|
4024
4969
|
return rxjs.of(null);
|
|
4025
4970
|
};
|
|
4026
4971
|
/**
|
|
4027
|
-
*
|
|
4972
|
+
* Saves variable data printing information to design file and updates design in storage.
|
|
4028
4973
|
* @param id Design identifier.
|
|
4029
4974
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
4030
4975
|
* @param tenantId (optional) Tenant identifier
|
|
4976
|
+
* @param body (optional) Serialized vdp data.
|
|
4031
4977
|
* @return Success
|
|
4032
4978
|
*/
|
|
4033
|
-
DesignAtomsServiceApiClient.prototype.
|
|
4979
|
+
DesignAtomsServiceApiClient.prototype.saveVdpData = function (id, privateStorageOwner, tenantId, body) {
|
|
4034
4980
|
var _this = this;
|
|
4035
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/
|
|
4981
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/vdp-data?";
|
|
4036
4982
|
if (id === undefined || id === null)
|
|
4037
4983
|
throw new Error("The parameter 'id' must be defined.");
|
|
4038
4984
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4039
|
-
if (privateStorageOwner
|
|
4040
|
-
throw new Error("The parameter 'privateStorageOwner' cannot be null.");
|
|
4041
|
-
else if (privateStorageOwner !== undefined)
|
|
4985
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4042
4986
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
4043
4987
|
if (tenantId === null)
|
|
4044
4988
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4045
4989
|
else if (tenantId !== undefined)
|
|
4046
4990
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
4047
4991
|
url_ = url_.replace(/[?&]$/, "");
|
|
4992
|
+
var content_ = JSON.stringify(body);
|
|
4048
4993
|
var options_ = {
|
|
4994
|
+
body: content_,
|
|
4049
4995
|
observe: "response",
|
|
4050
4996
|
responseType: "blob",
|
|
4051
4997
|
headers: new i1.HttpHeaders({
|
|
4052
|
-
"
|
|
4998
|
+
"Content-Type": "application/json",
|
|
4053
4999
|
})
|
|
4054
5000
|
};
|
|
4055
5001
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
4056
|
-
return _this.http.request("
|
|
5002
|
+
return _this.http.request("put", url_, transformedOptions_);
|
|
4057
5003
|
})).pipe(operators.mergeMap(function (response_) {
|
|
4058
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5004
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processSaveVdpData(r); });
|
|
4059
5005
|
})).pipe(operators.catchError(function (response_) {
|
|
4060
5006
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
4061
5007
|
try {
|
|
4062
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5008
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processSaveVdpData(r); });
|
|
4063
5009
|
}
|
|
4064
5010
|
catch (e) {
|
|
4065
5011
|
return rxjs.throwError(e);
|
|
@@ -4069,8 +5015,8 @@
|
|
|
4069
5015
|
return rxjs.throwError(response_);
|
|
4070
5016
|
}));
|
|
4071
5017
|
};
|
|
4072
|
-
DesignAtomsServiceApiClient.prototype.
|
|
4073
|
-
var
|
|
5018
|
+
DesignAtomsServiceApiClient.prototype.processSaveVdpData = function (response) {
|
|
5019
|
+
var e_49, _a;
|
|
4074
5020
|
var _this = this;
|
|
4075
5021
|
var status = response.status;
|
|
4076
5022
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -4083,19 +5029,17 @@
|
|
|
4083
5029
|
_headers[key] = response.headers.get(key);
|
|
4084
5030
|
}
|
|
4085
5031
|
}
|
|
4086
|
-
catch (
|
|
5032
|
+
catch (e_49_1) { e_49 = { error: e_49_1 }; }
|
|
4087
5033
|
finally {
|
|
4088
5034
|
try {
|
|
4089
5035
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
4090
5036
|
}
|
|
4091
|
-
finally { if (
|
|
5037
|
+
finally { if (e_49) throw e_49.error; }
|
|
4092
5038
|
}
|
|
4093
5039
|
}
|
|
4094
5040
|
if (status === 200) {
|
|
4095
5041
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4096
|
-
|
|
4097
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
4098
|
-
return rxjs.of(result200);
|
|
5042
|
+
return rxjs.of(null);
|
|
4099
5043
|
}));
|
|
4100
5044
|
}
|
|
4101
5045
|
else if (status === 404) {
|
|
@@ -4123,21 +5067,19 @@
|
|
|
4123
5067
|
return rxjs.of(null);
|
|
4124
5068
|
};
|
|
4125
5069
|
/**
|
|
4126
|
-
*
|
|
5070
|
+
* Deletes variable data printing information from design file and updates design in storage.
|
|
4127
5071
|
* @param id Design identifier.
|
|
4128
5072
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
4129
5073
|
* @param tenantId (optional) Tenant identifier
|
|
4130
5074
|
* @return Success
|
|
4131
5075
|
*/
|
|
4132
|
-
DesignAtomsServiceApiClient.prototype.
|
|
5076
|
+
DesignAtomsServiceApiClient.prototype.deleteVdpData = function (id, privateStorageOwner, tenantId) {
|
|
4133
5077
|
var _this = this;
|
|
4134
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/
|
|
5078
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/vdp-data?";
|
|
4135
5079
|
if (id === undefined || id === null)
|
|
4136
5080
|
throw new Error("The parameter 'id' must be defined.");
|
|
4137
5081
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4138
|
-
if (privateStorageOwner
|
|
4139
|
-
throw new Error("The parameter 'privateStorageOwner' cannot be null.");
|
|
4140
|
-
else if (privateStorageOwner !== undefined)
|
|
5082
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4141
5083
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
4142
5084
|
if (tenantId === null)
|
|
4143
5085
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
@@ -4147,18 +5089,16 @@
|
|
|
4147
5089
|
var options_ = {
|
|
4148
5090
|
observe: "response",
|
|
4149
5091
|
responseType: "blob",
|
|
4150
|
-
headers: new i1.HttpHeaders({
|
|
4151
|
-
"Accept": "application/octet-stream"
|
|
4152
|
-
})
|
|
5092
|
+
headers: new i1.HttpHeaders({})
|
|
4153
5093
|
};
|
|
4154
5094
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
4155
|
-
return _this.http.request("
|
|
5095
|
+
return _this.http.request("delete", url_, transformedOptions_);
|
|
4156
5096
|
})).pipe(operators.mergeMap(function (response_) {
|
|
4157
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5097
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processDeleteVdpData(r); });
|
|
4158
5098
|
})).pipe(operators.catchError(function (response_) {
|
|
4159
5099
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
4160
5100
|
try {
|
|
4161
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5101
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processDeleteVdpData(r); });
|
|
4162
5102
|
}
|
|
4163
5103
|
catch (e) {
|
|
4164
5104
|
return rxjs.throwError(e);
|
|
@@ -4168,8 +5108,8 @@
|
|
|
4168
5108
|
return rxjs.throwError(response_);
|
|
4169
5109
|
}));
|
|
4170
5110
|
};
|
|
4171
|
-
DesignAtomsServiceApiClient.prototype.
|
|
4172
|
-
var
|
|
5111
|
+
DesignAtomsServiceApiClient.prototype.processDeleteVdpData = function (response) {
|
|
5112
|
+
var e_50, _a;
|
|
4173
5113
|
var _this = this;
|
|
4174
5114
|
var status = response.status;
|
|
4175
5115
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -4182,25 +5122,17 @@
|
|
|
4182
5122
|
_headers[key] = response.headers.get(key);
|
|
4183
5123
|
}
|
|
4184
5124
|
}
|
|
4185
|
-
catch (
|
|
5125
|
+
catch (e_50_1) { e_50 = { error: e_50_1 }; }
|
|
4186
5126
|
finally {
|
|
4187
5127
|
try {
|
|
4188
5128
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
4189
5129
|
}
|
|
4190
|
-
finally { if (
|
|
5130
|
+
finally { if (e_50) throw e_50.error; }
|
|
4191
5131
|
}
|
|
4192
5132
|
}
|
|
4193
|
-
if (status === 200
|
|
4194
|
-
var contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
4195
|
-
var fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
4196
|
-
var fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
4197
|
-
return rxjs.of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
4198
|
-
}
|
|
4199
|
-
else if (status === 404) {
|
|
5133
|
+
if (status === 200) {
|
|
4200
5134
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4201
|
-
|
|
4202
|
-
result404 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
4203
|
-
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
5135
|
+
return rxjs.of(null);
|
|
4204
5136
|
}));
|
|
4205
5137
|
}
|
|
4206
5138
|
else if (status === 409) {
|
|
@@ -4228,21 +5160,19 @@
|
|
|
4228
5160
|
return rxjs.of(null);
|
|
4229
5161
|
};
|
|
4230
5162
|
/**
|
|
4231
|
-
* Loads
|
|
4232
|
-
* @param id
|
|
5163
|
+
* Loads product (design model) from resource file taken from storage.
|
|
5164
|
+
* @param id Resource identifier.
|
|
4233
5165
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
4234
5166
|
* @param tenantId (optional) Tenant identifier
|
|
4235
5167
|
* @return Success
|
|
4236
5168
|
*/
|
|
4237
|
-
DesignAtomsServiceApiClient.prototype.
|
|
5169
|
+
DesignAtomsServiceApiClient.prototype.loadProductFromResource = function (id, privateStorageOwner, tenantId) {
|
|
4238
5170
|
var _this = this;
|
|
4239
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/
|
|
5171
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/from-resource/{id}/model?";
|
|
4240
5172
|
if (id === undefined || id === null)
|
|
4241
5173
|
throw new Error("The parameter 'id' must be defined.");
|
|
4242
5174
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4243
|
-
if (privateStorageOwner
|
|
4244
|
-
throw new Error("The parameter 'privateStorageOwner' cannot be null.");
|
|
4245
|
-
else if (privateStorageOwner !== undefined)
|
|
5175
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4246
5176
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
4247
5177
|
if (tenantId === null)
|
|
4248
5178
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
@@ -4253,17 +5183,17 @@
|
|
|
4253
5183
|
observe: "response",
|
|
4254
5184
|
responseType: "blob",
|
|
4255
5185
|
headers: new i1.HttpHeaders({
|
|
4256
|
-
"Accept": "application/
|
|
5186
|
+
"Accept": "application/json"
|
|
4257
5187
|
})
|
|
4258
5188
|
};
|
|
4259
5189
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
4260
5190
|
return _this.http.request("get", url_, transformedOptions_);
|
|
4261
5191
|
})).pipe(operators.mergeMap(function (response_) {
|
|
4262
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5192
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processLoadProductFromResource(r); });
|
|
4263
5193
|
})).pipe(operators.catchError(function (response_) {
|
|
4264
5194
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
4265
5195
|
try {
|
|
4266
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5196
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processLoadProductFromResource(r); });
|
|
4267
5197
|
}
|
|
4268
5198
|
catch (e) {
|
|
4269
5199
|
return rxjs.throwError(e);
|
|
@@ -4273,8 +5203,8 @@
|
|
|
4273
5203
|
return rxjs.throwError(response_);
|
|
4274
5204
|
}));
|
|
4275
5205
|
};
|
|
4276
|
-
DesignAtomsServiceApiClient.prototype.
|
|
4277
|
-
var
|
|
5206
|
+
DesignAtomsServiceApiClient.prototype.processLoadProductFromResource = function (response) {
|
|
5207
|
+
var e_51, _a;
|
|
4278
5208
|
var _this = this;
|
|
4279
5209
|
var status = response.status;
|
|
4280
5210
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -4287,19 +5217,20 @@
|
|
|
4287
5217
|
_headers[key] = response.headers.get(key);
|
|
4288
5218
|
}
|
|
4289
5219
|
}
|
|
4290
|
-
catch (
|
|
5220
|
+
catch (e_51_1) { e_51 = { error: e_51_1 }; }
|
|
4291
5221
|
finally {
|
|
4292
5222
|
try {
|
|
4293
5223
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
4294
5224
|
}
|
|
4295
|
-
finally { if (
|
|
5225
|
+
finally { if (e_51) throw e_51.error; }
|
|
4296
5226
|
}
|
|
4297
5227
|
}
|
|
4298
|
-
if (status === 200
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
5228
|
+
if (status === 200) {
|
|
5229
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
5230
|
+
var result200 = null;
|
|
5231
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
5232
|
+
return rxjs.of(result200);
|
|
5233
|
+
}));
|
|
4303
5234
|
}
|
|
4304
5235
|
else if (status === 404) {
|
|
4305
5236
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
@@ -4308,11 +5239,11 @@
|
|
|
4308
5239
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
4309
5240
|
}));
|
|
4310
5241
|
}
|
|
4311
|
-
else if (status ===
|
|
5242
|
+
else if (status === 422) {
|
|
4312
5243
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4313
|
-
var
|
|
4314
|
-
|
|
4315
|
-
return throwException("
|
|
5244
|
+
var result422 = null;
|
|
5245
|
+
result422 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
5246
|
+
return throwException("Client Error", status, _responseText, _headers, result422);
|
|
4316
5247
|
}));
|
|
4317
5248
|
}
|
|
4318
5249
|
else if (status === 401) {
|
|
@@ -4333,42 +5264,37 @@
|
|
|
4333
5264
|
return rxjs.of(null);
|
|
4334
5265
|
};
|
|
4335
5266
|
/**
|
|
4336
|
-
*
|
|
4337
|
-
* @param id Design identifier.
|
|
4338
|
-
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
5267
|
+
* Converts colors.
|
|
4339
5268
|
* @param tenantId (optional) Tenant identifier
|
|
5269
|
+
* @param body (optional) Convert colors operation parameters.
|
|
4340
5270
|
* @return Success
|
|
4341
5271
|
*/
|
|
4342
|
-
DesignAtomsServiceApiClient.prototype.
|
|
5272
|
+
DesignAtomsServiceApiClient.prototype.convertColors = function (tenantId, body) {
|
|
4343
5273
|
var _this = this;
|
|
4344
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/
|
|
4345
|
-
if (id === undefined || id === null)
|
|
4346
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
4347
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4348
|
-
if (privateStorageOwner === null)
|
|
4349
|
-
throw new Error("The parameter 'privateStorageOwner' cannot be null.");
|
|
4350
|
-
else if (privateStorageOwner !== undefined)
|
|
4351
|
-
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
5274
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/model/convert-colors?";
|
|
4352
5275
|
if (tenantId === null)
|
|
4353
5276
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4354
5277
|
else if (tenantId !== undefined)
|
|
4355
5278
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
4356
5279
|
url_ = url_.replace(/[?&]$/, "");
|
|
5280
|
+
var content_ = JSON.stringify(body);
|
|
4357
5281
|
var options_ = {
|
|
5282
|
+
body: content_,
|
|
4358
5283
|
observe: "response",
|
|
4359
5284
|
responseType: "blob",
|
|
4360
5285
|
headers: new i1.HttpHeaders({
|
|
5286
|
+
"Content-Type": "application/json",
|
|
4361
5287
|
"Accept": "application/json"
|
|
4362
5288
|
})
|
|
4363
5289
|
};
|
|
4364
5290
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
4365
|
-
return _this.http.request("
|
|
5291
|
+
return _this.http.request("post", url_, transformedOptions_);
|
|
4366
5292
|
})).pipe(operators.mergeMap(function (response_) {
|
|
4367
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5293
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processConvertColors(r); });
|
|
4368
5294
|
})).pipe(operators.catchError(function (response_) {
|
|
4369
5295
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
4370
5296
|
try {
|
|
4371
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5297
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processConvertColors(r); });
|
|
4372
5298
|
}
|
|
4373
5299
|
catch (e) {
|
|
4374
5300
|
return rxjs.throwError(e);
|
|
@@ -4378,8 +5304,8 @@
|
|
|
4378
5304
|
return rxjs.throwError(response_);
|
|
4379
5305
|
}));
|
|
4380
5306
|
};
|
|
4381
|
-
DesignAtomsServiceApiClient.prototype.
|
|
4382
|
-
var
|
|
5307
|
+
DesignAtomsServiceApiClient.prototype.processConvertColors = function (response) {
|
|
5308
|
+
var e_52, _a;
|
|
4383
5309
|
var _this = this;
|
|
4384
5310
|
var status = response.status;
|
|
4385
5311
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -4392,12 +5318,12 @@
|
|
|
4392
5318
|
_headers[key] = response.headers.get(key);
|
|
4393
5319
|
}
|
|
4394
5320
|
}
|
|
4395
|
-
catch (
|
|
5321
|
+
catch (e_52_1) { e_52 = { error: e_52_1 }; }
|
|
4396
5322
|
finally {
|
|
4397
5323
|
try {
|
|
4398
5324
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
4399
5325
|
}
|
|
4400
|
-
finally { if (
|
|
5326
|
+
finally { if (e_52) throw e_52.error; }
|
|
4401
5327
|
}
|
|
4402
5328
|
}
|
|
4403
5329
|
if (status === 200) {
|
|
@@ -4432,23 +5358,14 @@
|
|
|
4432
5358
|
return rxjs.of(null);
|
|
4433
5359
|
};
|
|
4434
5360
|
/**
|
|
4435
|
-
*
|
|
4436
|
-
* @param id Design identifier.
|
|
4437
|
-
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
5361
|
+
* Extracts product item image.
|
|
4438
5362
|
* @param tenantId (optional) Tenant identifier
|
|
4439
|
-
* @param body (optional)
|
|
5363
|
+
* @param body (optional) Extraction parameters.
|
|
4440
5364
|
* @return Success
|
|
4441
5365
|
*/
|
|
4442
|
-
DesignAtomsServiceApiClient.prototype.
|
|
5366
|
+
DesignAtomsServiceApiClient.prototype.extractItemImage = function (tenantId, body) {
|
|
4443
5367
|
var _this = this;
|
|
4444
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/
|
|
4445
|
-
if (id === undefined || id === null)
|
|
4446
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
4447
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4448
|
-
if (privateStorageOwner === null)
|
|
4449
|
-
throw new Error("The parameter 'privateStorageOwner' cannot be null.");
|
|
4450
|
-
else if (privateStorageOwner !== undefined)
|
|
4451
|
-
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
5368
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/extract-image?";
|
|
4452
5369
|
if (tenantId === null)
|
|
4453
5370
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4454
5371
|
else if (tenantId !== undefined)
|
|
@@ -4461,16 +5378,17 @@
|
|
|
4461
5378
|
responseType: "blob",
|
|
4462
5379
|
headers: new i1.HttpHeaders({
|
|
4463
5380
|
"Content-Type": "application/json",
|
|
5381
|
+
"Accept": "application/octet-stream"
|
|
4464
5382
|
})
|
|
4465
5383
|
};
|
|
4466
5384
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
4467
|
-
return _this.http.request("
|
|
5385
|
+
return _this.http.request("post", url_, transformedOptions_);
|
|
4468
5386
|
})).pipe(operators.mergeMap(function (response_) {
|
|
4469
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5387
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processExtractItemImage(r); });
|
|
4470
5388
|
})).pipe(operators.catchError(function (response_) {
|
|
4471
5389
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
4472
5390
|
try {
|
|
4473
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5391
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processExtractItemImage(r); });
|
|
4474
5392
|
}
|
|
4475
5393
|
catch (e) {
|
|
4476
5394
|
return rxjs.throwError(e);
|
|
@@ -4480,9 +5398,8 @@
|
|
|
4480
5398
|
return rxjs.throwError(response_);
|
|
4481
5399
|
}));
|
|
4482
5400
|
};
|
|
4483
|
-
DesignAtomsServiceApiClient.prototype.
|
|
4484
|
-
var
|
|
4485
|
-
var _this = this;
|
|
5401
|
+
DesignAtomsServiceApiClient.prototype.processExtractItemImage = function (response) {
|
|
5402
|
+
var e_53, _a;
|
|
4486
5403
|
var status = response.status;
|
|
4487
5404
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
4488
5405
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -4494,32 +5411,19 @@
|
|
|
4494
5411
|
_headers[key] = response.headers.get(key);
|
|
4495
5412
|
}
|
|
4496
5413
|
}
|
|
4497
|
-
catch (
|
|
5414
|
+
catch (e_53_1) { e_53 = { error: e_53_1 }; }
|
|
4498
5415
|
finally {
|
|
4499
5416
|
try {
|
|
4500
5417
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
4501
5418
|
}
|
|
4502
|
-
finally { if (
|
|
5419
|
+
finally { if (e_53) throw e_53.error; }
|
|
4503
5420
|
}
|
|
4504
5421
|
}
|
|
4505
|
-
if (status === 200) {
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
else if (status === 404) {
|
|
4511
|
-
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4512
|
-
var result404 = null;
|
|
4513
|
-
result404 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
4514
|
-
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
4515
|
-
}));
|
|
4516
|
-
}
|
|
4517
|
-
else if (status === 409) {
|
|
4518
|
-
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4519
|
-
var result409 = null;
|
|
4520
|
-
result409 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
4521
|
-
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
4522
|
-
}));
|
|
5422
|
+
if (status === 200 || status === 206) {
|
|
5423
|
+
var contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
5424
|
+
var fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
5425
|
+
var fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
5426
|
+
return rxjs.of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
4523
5427
|
}
|
|
4524
5428
|
else if (status === 401) {
|
|
4525
5429
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
@@ -4539,42 +5443,37 @@
|
|
|
4539
5443
|
return rxjs.of(null);
|
|
4540
5444
|
};
|
|
4541
5445
|
/**
|
|
4542
|
-
*
|
|
4543
|
-
* @param id Design identifier.
|
|
4544
|
-
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
5446
|
+
* Flatten items.
|
|
4545
5447
|
* @param tenantId (optional) Tenant identifier
|
|
5448
|
+
* @param body (optional) Items to flatten.
|
|
4546
5449
|
* @return Success
|
|
4547
5450
|
*/
|
|
4548
|
-
DesignAtomsServiceApiClient.prototype.
|
|
5451
|
+
DesignAtomsServiceApiClient.prototype.flattenItems = function (tenantId, body) {
|
|
4549
5452
|
var _this = this;
|
|
4550
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/
|
|
4551
|
-
if (id === undefined || id === null)
|
|
4552
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
4553
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4554
|
-
if (privateStorageOwner === null)
|
|
4555
|
-
throw new Error("The parameter 'privateStorageOwner' cannot be null.");
|
|
4556
|
-
else if (privateStorageOwner !== undefined)
|
|
4557
|
-
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
5453
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/flatten?";
|
|
4558
5454
|
if (tenantId === null)
|
|
4559
5455
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4560
5456
|
else if (tenantId !== undefined)
|
|
4561
5457
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
4562
5458
|
url_ = url_.replace(/[?&]$/, "");
|
|
5459
|
+
var content_ = JSON.stringify(body);
|
|
4563
5460
|
var options_ = {
|
|
5461
|
+
body: content_,
|
|
4564
5462
|
observe: "response",
|
|
4565
5463
|
responseType: "blob",
|
|
4566
5464
|
headers: new i1.HttpHeaders({
|
|
5465
|
+
"Content-Type": "application/json",
|
|
4567
5466
|
"Accept": "application/json"
|
|
4568
5467
|
})
|
|
4569
5468
|
};
|
|
4570
5469
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
4571
|
-
return _this.http.request("
|
|
5470
|
+
return _this.http.request("post", url_, transformedOptions_);
|
|
4572
5471
|
})).pipe(operators.mergeMap(function (response_) {
|
|
4573
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5472
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processFlattenItems(r); });
|
|
4574
5473
|
})).pipe(operators.catchError(function (response_) {
|
|
4575
5474
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
4576
5475
|
try {
|
|
4577
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5476
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processFlattenItems(r); });
|
|
4578
5477
|
}
|
|
4579
5478
|
catch (e) {
|
|
4580
5479
|
return rxjs.throwError(e);
|
|
@@ -4584,8 +5483,8 @@
|
|
|
4584
5483
|
return rxjs.throwError(response_);
|
|
4585
5484
|
}));
|
|
4586
5485
|
};
|
|
4587
|
-
DesignAtomsServiceApiClient.prototype.
|
|
4588
|
-
var
|
|
5486
|
+
DesignAtomsServiceApiClient.prototype.processFlattenItems = function (response) {
|
|
5487
|
+
var e_54, _a;
|
|
4589
5488
|
var _this = this;
|
|
4590
5489
|
var status = response.status;
|
|
4591
5490
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -4598,12 +5497,12 @@
|
|
|
4598
5497
|
_headers[key] = response.headers.get(key);
|
|
4599
5498
|
}
|
|
4600
5499
|
}
|
|
4601
|
-
catch (
|
|
5500
|
+
catch (e_54_1) { e_54 = { error: e_54_1 }; }
|
|
4602
5501
|
finally {
|
|
4603
5502
|
try {
|
|
4604
5503
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
4605
5504
|
}
|
|
4606
|
-
finally { if (
|
|
5505
|
+
finally { if (e_54) throw e_54.error; }
|
|
4607
5506
|
}
|
|
4608
5507
|
}
|
|
4609
5508
|
if (status === 200) {
|
|
@@ -4613,20 +5512,6 @@
|
|
|
4613
5512
|
return rxjs.of(result200);
|
|
4614
5513
|
}));
|
|
4615
5514
|
}
|
|
4616
|
-
else if (status === 404) {
|
|
4617
|
-
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4618
|
-
var result404 = null;
|
|
4619
|
-
result404 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
4620
|
-
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
4621
|
-
}));
|
|
4622
|
-
}
|
|
4623
|
-
else if (status === 409) {
|
|
4624
|
-
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4625
|
-
var result409 = null;
|
|
4626
|
-
result409 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
4627
|
-
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
4628
|
-
}));
|
|
4629
|
-
}
|
|
4630
5515
|
else if (status === 401) {
|
|
4631
5516
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4632
5517
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -4645,45 +5530,41 @@
|
|
|
4645
5530
|
return rxjs.of(null);
|
|
4646
5531
|
};
|
|
4647
5532
|
/**
|
|
4648
|
-
*
|
|
4649
|
-
* @param
|
|
4650
|
-
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
5533
|
+
* Creates product item from input image file.
|
|
5534
|
+
* @param itemType (optional) Desired item type.
|
|
4651
5535
|
* @param tenantId (optional) Tenant identifier
|
|
4652
|
-
* @param
|
|
5536
|
+
* @param sourceFile (optional)
|
|
4653
5537
|
* @return Success
|
|
4654
5538
|
*/
|
|
4655
|
-
DesignAtomsServiceApiClient.prototype.
|
|
5539
|
+
DesignAtomsServiceApiClient.prototype.createItemFromFile = function (itemType, tenantId, sourceFile) {
|
|
4656
5540
|
var _this = this;
|
|
4657
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/
|
|
4658
|
-
if (
|
|
4659
|
-
|
|
4660
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4661
|
-
if (privateStorageOwner === null)
|
|
4662
|
-
throw new Error("The parameter 'privateStorageOwner' cannot be null.");
|
|
4663
|
-
else if (privateStorageOwner !== undefined)
|
|
4664
|
-
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
5541
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/from-file?";
|
|
5542
|
+
if (itemType !== undefined && itemType !== null)
|
|
5543
|
+
url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
|
|
4665
5544
|
if (tenantId === null)
|
|
4666
5545
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4667
5546
|
else if (tenantId !== undefined)
|
|
4668
5547
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
4669
5548
|
url_ = url_.replace(/[?&]$/, "");
|
|
4670
|
-
var content_ =
|
|
5549
|
+
var content_ = new FormData();
|
|
5550
|
+
if (sourceFile !== null && sourceFile !== undefined)
|
|
5551
|
+
content_.append("sourceFile", sourceFile.data, sourceFile.fileName ? sourceFile.fileName : "sourceFile");
|
|
4671
5552
|
var options_ = {
|
|
4672
5553
|
body: content_,
|
|
4673
5554
|
observe: "response",
|
|
4674
5555
|
responseType: "blob",
|
|
4675
5556
|
headers: new i1.HttpHeaders({
|
|
4676
|
-
"
|
|
5557
|
+
"Accept": "application/json"
|
|
4677
5558
|
})
|
|
4678
5559
|
};
|
|
4679
5560
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
4680
|
-
return _this.http.request("
|
|
5561
|
+
return _this.http.request("post", url_, transformedOptions_);
|
|
4681
5562
|
})).pipe(operators.mergeMap(function (response_) {
|
|
4682
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5563
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processCreateItemFromFile(r); });
|
|
4683
5564
|
})).pipe(operators.catchError(function (response_) {
|
|
4684
5565
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
4685
5566
|
try {
|
|
4686
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5567
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processCreateItemFromFile(r); });
|
|
4687
5568
|
}
|
|
4688
5569
|
catch (e) {
|
|
4689
5570
|
return rxjs.throwError(e);
|
|
@@ -4693,8 +5574,8 @@
|
|
|
4693
5574
|
return rxjs.throwError(response_);
|
|
4694
5575
|
}));
|
|
4695
5576
|
};
|
|
4696
|
-
DesignAtomsServiceApiClient.prototype.
|
|
4697
|
-
var
|
|
5577
|
+
DesignAtomsServiceApiClient.prototype.processCreateItemFromFile = function (response) {
|
|
5578
|
+
var e_55, _a;
|
|
4698
5579
|
var _this = this;
|
|
4699
5580
|
var status = response.status;
|
|
4700
5581
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -4707,17 +5588,19 @@
|
|
|
4707
5588
|
_headers[key] = response.headers.get(key);
|
|
4708
5589
|
}
|
|
4709
5590
|
}
|
|
4710
|
-
catch (
|
|
5591
|
+
catch (e_55_1) { e_55 = { error: e_55_1 }; }
|
|
4711
5592
|
finally {
|
|
4712
5593
|
try {
|
|
4713
5594
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
4714
5595
|
}
|
|
4715
|
-
finally { if (
|
|
5596
|
+
finally { if (e_55) throw e_55.error; }
|
|
4716
5597
|
}
|
|
4717
5598
|
}
|
|
4718
5599
|
if (status === 200) {
|
|
4719
5600
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4720
|
-
|
|
5601
|
+
var result200 = null;
|
|
5602
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
5603
|
+
return rxjs.of(result200);
|
|
4721
5604
|
}));
|
|
4722
5605
|
}
|
|
4723
5606
|
else if (status === 404) {
|
|
@@ -4745,40 +5628,41 @@
|
|
|
4745
5628
|
return rxjs.of(null);
|
|
4746
5629
|
};
|
|
4747
5630
|
/**
|
|
4748
|
-
*
|
|
4749
|
-
* @param
|
|
4750
|
-
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
5631
|
+
* Creates multiple product items from input image files.
|
|
5632
|
+
* @param itemType (optional) Desired items type.
|
|
4751
5633
|
* @param tenantId (optional) Tenant identifier
|
|
5634
|
+
* @param sourceFiles (optional)
|
|
4752
5635
|
* @return Success
|
|
4753
5636
|
*/
|
|
4754
|
-
DesignAtomsServiceApiClient.prototype.
|
|
5637
|
+
DesignAtomsServiceApiClient.prototype.batchCreateItemsFromFile = function (itemType, tenantId, sourceFiles) {
|
|
4755
5638
|
var _this = this;
|
|
4756
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/
|
|
4757
|
-
if (
|
|
4758
|
-
|
|
4759
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4760
|
-
if (privateStorageOwner === null)
|
|
4761
|
-
throw new Error("The parameter 'privateStorageOwner' cannot be null.");
|
|
4762
|
-
else if (privateStorageOwner !== undefined)
|
|
4763
|
-
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
5639
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/from-file/batch-create?";
|
|
5640
|
+
if (itemType !== undefined && itemType !== null)
|
|
5641
|
+
url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
|
|
4764
5642
|
if (tenantId === null)
|
|
4765
5643
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4766
5644
|
else if (tenantId !== undefined)
|
|
4767
5645
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
4768
5646
|
url_ = url_.replace(/[?&]$/, "");
|
|
5647
|
+
var content_ = new FormData();
|
|
5648
|
+
if (sourceFiles !== null && sourceFiles !== undefined)
|
|
5649
|
+
sourceFiles.forEach(function (item_) { return content_.append("sourceFiles", item_.data, item_.fileName ? item_.fileName : "sourceFiles"); });
|
|
4769
5650
|
var options_ = {
|
|
5651
|
+
body: content_,
|
|
4770
5652
|
observe: "response",
|
|
4771
5653
|
responseType: "blob",
|
|
4772
|
-
headers: new i1.HttpHeaders({
|
|
5654
|
+
headers: new i1.HttpHeaders({
|
|
5655
|
+
"Accept": "application/json"
|
|
5656
|
+
})
|
|
4773
5657
|
};
|
|
4774
5658
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
4775
|
-
return _this.http.request("
|
|
5659
|
+
return _this.http.request("post", url_, transformedOptions_);
|
|
4776
5660
|
})).pipe(operators.mergeMap(function (response_) {
|
|
4777
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5661
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processBatchCreateItemsFromFile(r); });
|
|
4778
5662
|
})).pipe(operators.catchError(function (response_) {
|
|
4779
5663
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
4780
5664
|
try {
|
|
4781
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5665
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processBatchCreateItemsFromFile(r); });
|
|
4782
5666
|
}
|
|
4783
5667
|
catch (e) {
|
|
4784
5668
|
return rxjs.throwError(e);
|
|
@@ -4788,8 +5672,8 @@
|
|
|
4788
5672
|
return rxjs.throwError(response_);
|
|
4789
5673
|
}));
|
|
4790
5674
|
};
|
|
4791
|
-
DesignAtomsServiceApiClient.prototype.
|
|
4792
|
-
var
|
|
5675
|
+
DesignAtomsServiceApiClient.prototype.processBatchCreateItemsFromFile = function (response) {
|
|
5676
|
+
var e_56, _a;
|
|
4793
5677
|
var _this = this;
|
|
4794
5678
|
var status = response.status;
|
|
4795
5679
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -4802,24 +5686,26 @@
|
|
|
4802
5686
|
_headers[key] = response.headers.get(key);
|
|
4803
5687
|
}
|
|
4804
5688
|
}
|
|
4805
|
-
catch (
|
|
5689
|
+
catch (e_56_1) { e_56 = { error: e_56_1 }; }
|
|
4806
5690
|
finally {
|
|
4807
5691
|
try {
|
|
4808
5692
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
4809
5693
|
}
|
|
4810
|
-
finally { if (
|
|
5694
|
+
finally { if (e_56) throw e_56.error; }
|
|
4811
5695
|
}
|
|
4812
5696
|
}
|
|
4813
5697
|
if (status === 200) {
|
|
4814
5698
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4815
|
-
|
|
5699
|
+
var result200 = null;
|
|
5700
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
5701
|
+
return rxjs.of(result200);
|
|
4816
5702
|
}));
|
|
4817
5703
|
}
|
|
4818
|
-
else if (status ===
|
|
5704
|
+
else if (status === 404) {
|
|
4819
5705
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4820
|
-
var
|
|
4821
|
-
|
|
4822
|
-
return throwException("
|
|
5706
|
+
var result404 = null;
|
|
5707
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
5708
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
4823
5709
|
}));
|
|
4824
5710
|
}
|
|
4825
5711
|
else if (status === 401) {
|
|
@@ -4840,42 +5726,40 @@
|
|
|
4840
5726
|
return rxjs.of(null);
|
|
4841
5727
|
};
|
|
4842
5728
|
/**
|
|
4843
|
-
*
|
|
4844
|
-
* @param
|
|
4845
|
-
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
5729
|
+
* Creates product item from image in storage.
|
|
5730
|
+
* @param itemType (optional) Desired item type.
|
|
4846
5731
|
* @param tenantId (optional) Tenant identifier
|
|
5732
|
+
* @param body (optional) Operation parameters.
|
|
4847
5733
|
* @return Success
|
|
4848
5734
|
*/
|
|
4849
|
-
DesignAtomsServiceApiClient.prototype.
|
|
5735
|
+
DesignAtomsServiceApiClient.prototype.createItemFromStorage = function (itemType, tenantId, body) {
|
|
4850
5736
|
var _this = this;
|
|
4851
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/from-
|
|
4852
|
-
if (
|
|
4853
|
-
|
|
4854
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4855
|
-
if (privateStorageOwner === null)
|
|
4856
|
-
throw new Error("The parameter 'privateStorageOwner' cannot be null.");
|
|
4857
|
-
else if (privateStorageOwner !== undefined)
|
|
4858
|
-
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
5737
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/from-storage?";
|
|
5738
|
+
if (itemType !== undefined && itemType !== null)
|
|
5739
|
+
url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
|
|
4859
5740
|
if (tenantId === null)
|
|
4860
5741
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4861
5742
|
else if (tenantId !== undefined)
|
|
4862
5743
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
4863
5744
|
url_ = url_.replace(/[?&]$/, "");
|
|
5745
|
+
var content_ = JSON.stringify(body);
|
|
4864
5746
|
var options_ = {
|
|
5747
|
+
body: content_,
|
|
4865
5748
|
observe: "response",
|
|
4866
5749
|
responseType: "blob",
|
|
4867
5750
|
headers: new i1.HttpHeaders({
|
|
5751
|
+
"Content-Type": "application/json",
|
|
4868
5752
|
"Accept": "application/json"
|
|
4869
5753
|
})
|
|
4870
5754
|
};
|
|
4871
5755
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
4872
|
-
return _this.http.request("
|
|
5756
|
+
return _this.http.request("post", url_, transformedOptions_);
|
|
4873
5757
|
})).pipe(operators.mergeMap(function (response_) {
|
|
4874
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5758
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processCreateItemFromStorage(r); });
|
|
4875
5759
|
})).pipe(operators.catchError(function (response_) {
|
|
4876
5760
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
4877
5761
|
try {
|
|
4878
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5762
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processCreateItemFromStorage(r); });
|
|
4879
5763
|
}
|
|
4880
5764
|
catch (e) {
|
|
4881
5765
|
return rxjs.throwError(e);
|
|
@@ -4885,8 +5769,8 @@
|
|
|
4885
5769
|
return rxjs.throwError(response_);
|
|
4886
5770
|
}));
|
|
4887
5771
|
};
|
|
4888
|
-
DesignAtomsServiceApiClient.prototype.
|
|
4889
|
-
var
|
|
5772
|
+
DesignAtomsServiceApiClient.prototype.processCreateItemFromStorage = function (response) {
|
|
5773
|
+
var e_57, _a;
|
|
4890
5774
|
var _this = this;
|
|
4891
5775
|
var status = response.status;
|
|
4892
5776
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -4899,12 +5783,12 @@
|
|
|
4899
5783
|
_headers[key] = response.headers.get(key);
|
|
4900
5784
|
}
|
|
4901
5785
|
}
|
|
4902
|
-
catch (
|
|
5786
|
+
catch (e_57_1) { e_57 = { error: e_57_1 }; }
|
|
4903
5787
|
finally {
|
|
4904
5788
|
try {
|
|
4905
5789
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
4906
5790
|
}
|
|
4907
|
-
finally { if (
|
|
5791
|
+
finally { if (e_57) throw e_57.error; }
|
|
4908
5792
|
}
|
|
4909
5793
|
}
|
|
4910
5794
|
if (status === 200) {
|
|
@@ -4921,13 +5805,6 @@
|
|
|
4921
5805
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
4922
5806
|
}));
|
|
4923
5807
|
}
|
|
4924
|
-
else if (status === 422) {
|
|
4925
|
-
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4926
|
-
var result422 = null;
|
|
4927
|
-
result422 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
4928
|
-
return throwException("Client Error", status, _responseText, _headers, result422);
|
|
4929
|
-
}));
|
|
4930
|
-
}
|
|
4931
5808
|
else if (status === 401) {
|
|
4932
5809
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
4933
5810
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -4946,14 +5823,17 @@
|
|
|
4946
5823
|
return rxjs.of(null);
|
|
4947
5824
|
};
|
|
4948
5825
|
/**
|
|
4949
|
-
*
|
|
5826
|
+
* Creates multiple product items from images in storage.
|
|
5827
|
+
* @param itemType (optional) Desired items type.
|
|
4950
5828
|
* @param tenantId (optional) Tenant identifier
|
|
4951
|
-
* @param body (optional)
|
|
5829
|
+
* @param body (optional) Create items operation parameters.
|
|
4952
5830
|
* @return Success
|
|
4953
5831
|
*/
|
|
4954
|
-
DesignAtomsServiceApiClient.prototype.
|
|
5832
|
+
DesignAtomsServiceApiClient.prototype.batchCreateItemsFromStorage = function (itemType, tenantId, body) {
|
|
4955
5833
|
var _this = this;
|
|
4956
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/model/
|
|
5834
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/from-storage/batch-create?";
|
|
5835
|
+
if (itemType !== undefined && itemType !== null)
|
|
5836
|
+
url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
|
|
4957
5837
|
if (tenantId === null)
|
|
4958
5838
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4959
5839
|
else if (tenantId !== undefined)
|
|
@@ -4972,11 +5852,11 @@
|
|
|
4972
5852
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
4973
5853
|
return _this.http.request("post", url_, transformedOptions_);
|
|
4974
5854
|
})).pipe(operators.mergeMap(function (response_) {
|
|
4975
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5855
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processBatchCreateItemsFromStorage(r); });
|
|
4976
5856
|
})).pipe(operators.catchError(function (response_) {
|
|
4977
5857
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
4978
5858
|
try {
|
|
4979
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5859
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processBatchCreateItemsFromStorage(r); });
|
|
4980
5860
|
}
|
|
4981
5861
|
catch (e) {
|
|
4982
5862
|
return rxjs.throwError(e);
|
|
@@ -4986,8 +5866,8 @@
|
|
|
4986
5866
|
return rxjs.throwError(response_);
|
|
4987
5867
|
}));
|
|
4988
5868
|
};
|
|
4989
|
-
DesignAtomsServiceApiClient.prototype.
|
|
4990
|
-
var
|
|
5869
|
+
DesignAtomsServiceApiClient.prototype.processBatchCreateItemsFromStorage = function (response) {
|
|
5870
|
+
var e_58, _a;
|
|
4991
5871
|
var _this = this;
|
|
4992
5872
|
var status = response.status;
|
|
4993
5873
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -5000,12 +5880,12 @@
|
|
|
5000
5880
|
_headers[key] = response.headers.get(key);
|
|
5001
5881
|
}
|
|
5002
5882
|
}
|
|
5003
|
-
catch (
|
|
5883
|
+
catch (e_58_1) { e_58 = { error: e_58_1 }; }
|
|
5004
5884
|
finally {
|
|
5005
5885
|
try {
|
|
5006
5886
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
5007
5887
|
}
|
|
5008
|
-
finally { if (
|
|
5888
|
+
finally { if (e_58) throw e_58.error; }
|
|
5009
5889
|
}
|
|
5010
5890
|
}
|
|
5011
5891
|
if (status === 200) {
|
|
@@ -5040,52 +5920,40 @@
|
|
|
5040
5920
|
return rxjs.of(null);
|
|
5041
5921
|
};
|
|
5042
5922
|
/**
|
|
5043
|
-
* Creates product item.
|
|
5923
|
+
* Creates product item from remote web image provided by URL.
|
|
5044
5924
|
* @param itemType (optional) Desired item type.
|
|
5045
5925
|
* @param tenantId (optional) Tenant identifier
|
|
5046
|
-
* @param
|
|
5047
|
-
* @param sourceId (optional)
|
|
5048
|
-
* @param sourceOwnerId (optional)
|
|
5049
|
-
* @param sourceFile (optional)
|
|
5926
|
+
* @param body (optional) Operation parameters.
|
|
5050
5927
|
* @return Success
|
|
5051
5928
|
*/
|
|
5052
|
-
DesignAtomsServiceApiClient.prototype.
|
|
5929
|
+
DesignAtomsServiceApiClient.prototype.createItemFromUrl = function (itemType, tenantId, body) {
|
|
5053
5930
|
var _this = this;
|
|
5054
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/model/items?";
|
|
5055
|
-
if (itemType
|
|
5056
|
-
throw new Error("The parameter 'itemType' cannot be null.");
|
|
5057
|
-
else if (itemType !== undefined)
|
|
5931
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/from-url?";
|
|
5932
|
+
if (itemType !== undefined && itemType !== null)
|
|
5058
5933
|
url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
|
|
5059
5934
|
if (tenantId === null)
|
|
5060
5935
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
5061
5936
|
else if (tenantId !== undefined)
|
|
5062
5937
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
5063
5938
|
url_ = url_.replace(/[?&]$/, "");
|
|
5064
|
-
var content_ =
|
|
5065
|
-
if (sourceType !== null && sourceType !== undefined)
|
|
5066
|
-
content_.append("sourceType", sourceType.toString());
|
|
5067
|
-
if (sourceId !== null && sourceId !== undefined)
|
|
5068
|
-
content_.append("sourceId", sourceId.toString());
|
|
5069
|
-
if (sourceOwnerId !== null && sourceOwnerId !== undefined)
|
|
5070
|
-
content_.append("sourceOwnerId", sourceOwnerId.toString());
|
|
5071
|
-
if (sourceFile !== null && sourceFile !== undefined)
|
|
5072
|
-
content_.append("sourceFile", sourceFile.data, sourceFile.fileName ? sourceFile.fileName : "sourceFile");
|
|
5939
|
+
var content_ = JSON.stringify(body);
|
|
5073
5940
|
var options_ = {
|
|
5074
5941
|
body: content_,
|
|
5075
5942
|
observe: "response",
|
|
5076
5943
|
responseType: "blob",
|
|
5077
5944
|
headers: new i1.HttpHeaders({
|
|
5945
|
+
"Content-Type": "application/json",
|
|
5078
5946
|
"Accept": "application/json"
|
|
5079
5947
|
})
|
|
5080
5948
|
};
|
|
5081
5949
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
5082
5950
|
return _this.http.request("post", url_, transformedOptions_);
|
|
5083
5951
|
})).pipe(operators.mergeMap(function (response_) {
|
|
5084
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5952
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processCreateItemFromUrl(r); });
|
|
5085
5953
|
})).pipe(operators.catchError(function (response_) {
|
|
5086
5954
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
5087
5955
|
try {
|
|
5088
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
5956
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processCreateItemFromUrl(r); });
|
|
5089
5957
|
}
|
|
5090
5958
|
catch (e) {
|
|
5091
5959
|
return rxjs.throwError(e);
|
|
@@ -5095,8 +5963,8 @@
|
|
|
5095
5963
|
return rxjs.throwError(response_);
|
|
5096
5964
|
}));
|
|
5097
5965
|
};
|
|
5098
|
-
DesignAtomsServiceApiClient.prototype.
|
|
5099
|
-
var
|
|
5966
|
+
DesignAtomsServiceApiClient.prototype.processCreateItemFromUrl = function (response) {
|
|
5967
|
+
var e_59, _a;
|
|
5100
5968
|
var _this = this;
|
|
5101
5969
|
var status = response.status;
|
|
5102
5970
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -5109,12 +5977,12 @@
|
|
|
5109
5977
|
_headers[key] = response.headers.get(key);
|
|
5110
5978
|
}
|
|
5111
5979
|
}
|
|
5112
|
-
catch (
|
|
5980
|
+
catch (e_59_1) { e_59 = { error: e_59_1 }; }
|
|
5113
5981
|
finally {
|
|
5114
5982
|
try {
|
|
5115
5983
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
5116
5984
|
}
|
|
5117
|
-
finally { if (
|
|
5985
|
+
finally { if (e_59) throw e_59.error; }
|
|
5118
5986
|
}
|
|
5119
5987
|
}
|
|
5120
5988
|
if (status === 200) {
|
|
@@ -5149,14 +6017,17 @@
|
|
|
5149
6017
|
return rxjs.of(null);
|
|
5150
6018
|
};
|
|
5151
6019
|
/**
|
|
5152
|
-
*
|
|
6020
|
+
* Creates multiple product items from remote web images provided by URLs list.
|
|
6021
|
+
* @param itemType (optional) Desired items type.
|
|
5153
6022
|
* @param tenantId (optional) Tenant identifier
|
|
5154
|
-
* @param body (optional)
|
|
6023
|
+
* @param body (optional) Operation parameters.
|
|
5155
6024
|
* @return Success
|
|
5156
6025
|
*/
|
|
5157
|
-
DesignAtomsServiceApiClient.prototype.
|
|
6026
|
+
DesignAtomsServiceApiClient.prototype.batchCreateItemsFromUrl = function (itemType, tenantId, body) {
|
|
5158
6027
|
var _this = this;
|
|
5159
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/
|
|
6028
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/from-url/batch-create?";
|
|
6029
|
+
if (itemType !== undefined && itemType !== null)
|
|
6030
|
+
url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
|
|
5160
6031
|
if (tenantId === null)
|
|
5161
6032
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
5162
6033
|
else if (tenantId !== undefined)
|
|
@@ -5169,17 +6040,17 @@
|
|
|
5169
6040
|
responseType: "blob",
|
|
5170
6041
|
headers: new i1.HttpHeaders({
|
|
5171
6042
|
"Content-Type": "application/json",
|
|
5172
|
-
"Accept": "application/
|
|
6043
|
+
"Accept": "application/json"
|
|
5173
6044
|
})
|
|
5174
6045
|
};
|
|
5175
6046
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
5176
6047
|
return _this.http.request("post", url_, transformedOptions_);
|
|
5177
6048
|
})).pipe(operators.mergeMap(function (response_) {
|
|
5178
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
6049
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processBatchCreateItemsFromUrl(r); });
|
|
5179
6050
|
})).pipe(operators.catchError(function (response_) {
|
|
5180
6051
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
5181
6052
|
try {
|
|
5182
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
6053
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processBatchCreateItemsFromUrl(r); });
|
|
5183
6054
|
}
|
|
5184
6055
|
catch (e) {
|
|
5185
6056
|
return rxjs.throwError(e);
|
|
@@ -5189,8 +6060,9 @@
|
|
|
5189
6060
|
return rxjs.throwError(response_);
|
|
5190
6061
|
}));
|
|
5191
6062
|
};
|
|
5192
|
-
DesignAtomsServiceApiClient.prototype.
|
|
5193
|
-
var
|
|
6063
|
+
DesignAtomsServiceApiClient.prototype.processBatchCreateItemsFromUrl = function (response) {
|
|
6064
|
+
var e_60, _a;
|
|
6065
|
+
var _this = this;
|
|
5194
6066
|
var status = response.status;
|
|
5195
6067
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
5196
6068
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -5202,19 +6074,27 @@
|
|
|
5202
6074
|
_headers[key] = response.headers.get(key);
|
|
5203
6075
|
}
|
|
5204
6076
|
}
|
|
5205
|
-
catch (
|
|
6077
|
+
catch (e_60_1) { e_60 = { error: e_60_1 }; }
|
|
5206
6078
|
finally {
|
|
5207
6079
|
try {
|
|
5208
6080
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
5209
6081
|
}
|
|
5210
|
-
finally { if (
|
|
6082
|
+
finally { if (e_60) throw e_60.error; }
|
|
5211
6083
|
}
|
|
5212
6084
|
}
|
|
5213
|
-
if (status === 200
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
6085
|
+
if (status === 200) {
|
|
6086
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
6087
|
+
var result200 = null;
|
|
6088
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
6089
|
+
return rxjs.of(result200);
|
|
6090
|
+
}));
|
|
6091
|
+
}
|
|
6092
|
+
else if (status === 404) {
|
|
6093
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
6094
|
+
var result404 = null;
|
|
6095
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
6096
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
6097
|
+
}));
|
|
5218
6098
|
}
|
|
5219
6099
|
else if (status === 401) {
|
|
5220
6100
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
@@ -5234,14 +6114,18 @@
|
|
|
5234
6114
|
return rxjs.of(null);
|
|
5235
6115
|
};
|
|
5236
6116
|
/**
|
|
5237
|
-
*
|
|
6117
|
+
* Render product proof image with specified parameters.
|
|
6118
|
+
* @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied
|
|
6119
|
+
(default value is 'false').
|
|
5238
6120
|
* @param tenantId (optional) Tenant identifier
|
|
5239
|
-
* @param body (optional)
|
|
6121
|
+
* @param body (optional) Preview parameters.
|
|
5240
6122
|
* @return Success
|
|
5241
6123
|
*/
|
|
5242
|
-
DesignAtomsServiceApiClient.prototype.
|
|
6124
|
+
DesignAtomsServiceApiClient.prototype.renderProduct = function (attachment, tenantId, body) {
|
|
5243
6125
|
var _this = this;
|
|
5244
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/model/
|
|
6126
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/model/render-proof?";
|
|
6127
|
+
if (attachment !== undefined && attachment !== null)
|
|
6128
|
+
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
5245
6129
|
if (tenantId === null)
|
|
5246
6130
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
5247
6131
|
else if (tenantId !== undefined)
|
|
@@ -5254,17 +6138,17 @@
|
|
|
5254
6138
|
responseType: "blob",
|
|
5255
6139
|
headers: new i1.HttpHeaders({
|
|
5256
6140
|
"Content-Type": "application/json",
|
|
5257
|
-
"Accept": "application/
|
|
6141
|
+
"Accept": "application/octet-stream"
|
|
5258
6142
|
})
|
|
5259
6143
|
};
|
|
5260
6144
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
5261
6145
|
return _this.http.request("post", url_, transformedOptions_);
|
|
5262
6146
|
})).pipe(operators.mergeMap(function (response_) {
|
|
5263
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
6147
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderProduct(r); });
|
|
5264
6148
|
})).pipe(operators.catchError(function (response_) {
|
|
5265
6149
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
5266
6150
|
try {
|
|
5267
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
6151
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderProduct(r); });
|
|
5268
6152
|
}
|
|
5269
6153
|
catch (e) {
|
|
5270
6154
|
return rxjs.throwError(e);
|
|
@@ -5274,9 +6158,8 @@
|
|
|
5274
6158
|
return rxjs.throwError(response_);
|
|
5275
6159
|
}));
|
|
5276
6160
|
};
|
|
5277
|
-
DesignAtomsServiceApiClient.prototype.
|
|
5278
|
-
var
|
|
5279
|
-
var _this = this;
|
|
6161
|
+
DesignAtomsServiceApiClient.prototype.processRenderProduct = function (response) {
|
|
6162
|
+
var e_61, _a;
|
|
5280
6163
|
var status = response.status;
|
|
5281
6164
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
5282
6165
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -5288,20 +6171,19 @@
|
|
|
5288
6171
|
_headers[key] = response.headers.get(key);
|
|
5289
6172
|
}
|
|
5290
6173
|
}
|
|
5291
|
-
catch (
|
|
6174
|
+
catch (e_61_1) { e_61 = { error: e_61_1 }; }
|
|
5292
6175
|
finally {
|
|
5293
6176
|
try {
|
|
5294
6177
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
5295
6178
|
}
|
|
5296
|
-
finally { if (
|
|
6179
|
+
finally { if (e_61) throw e_61.error; }
|
|
5297
6180
|
}
|
|
5298
6181
|
}
|
|
5299
|
-
if (status === 200) {
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
}));
|
|
6182
|
+
if (status === 200 || status === 206) {
|
|
6183
|
+
var contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
6184
|
+
var fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
6185
|
+
var fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
6186
|
+
return rxjs.of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
5305
6187
|
}
|
|
5306
6188
|
else if (status === 401) {
|
|
5307
6189
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
@@ -5321,19 +6203,17 @@
|
|
|
5321
6203
|
return rxjs.of(null);
|
|
5322
6204
|
};
|
|
5323
6205
|
/**
|
|
5324
|
-
*
|
|
6206
|
+
* Renders a design preview with the specified parameters.
|
|
5325
6207
|
* @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied
|
|
5326
6208
|
(default value is 'false').
|
|
5327
6209
|
* @param tenantId (optional) Tenant identifier
|
|
5328
|
-
* @param body (optional)
|
|
6210
|
+
* @param body (optional) Render model with preview parameters.
|
|
5329
6211
|
* @return Success
|
|
5330
6212
|
*/
|
|
5331
|
-
DesignAtomsServiceApiClient.prototype.
|
|
6213
|
+
DesignAtomsServiceApiClient.prototype.renderDesignPreview = function (attachment, tenantId, body) {
|
|
5332
6214
|
var _this = this;
|
|
5333
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/
|
|
5334
|
-
if (attachment
|
|
5335
|
-
throw new Error("The parameter 'attachment' cannot be null.");
|
|
5336
|
-
else if (attachment !== undefined)
|
|
6215
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/render-preview?";
|
|
6216
|
+
if (attachment !== undefined && attachment !== null)
|
|
5337
6217
|
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
5338
6218
|
if (tenantId === null)
|
|
5339
6219
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
@@ -5353,11 +6233,11 @@
|
|
|
5353
6233
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
5354
6234
|
return _this.http.request("post", url_, transformedOptions_);
|
|
5355
6235
|
})).pipe(operators.mergeMap(function (response_) {
|
|
5356
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
6236
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderDesignPreview(r); });
|
|
5357
6237
|
})).pipe(operators.catchError(function (response_) {
|
|
5358
6238
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
5359
6239
|
try {
|
|
5360
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
6240
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderDesignPreview(r); });
|
|
5361
6241
|
}
|
|
5362
6242
|
catch (e) {
|
|
5363
6243
|
return rxjs.throwError(e);
|
|
@@ -5367,8 +6247,8 @@
|
|
|
5367
6247
|
return rxjs.throwError(response_);
|
|
5368
6248
|
}));
|
|
5369
6249
|
};
|
|
5370
|
-
DesignAtomsServiceApiClient.prototype.
|
|
5371
|
-
var
|
|
6250
|
+
DesignAtomsServiceApiClient.prototype.processRenderDesignPreview = function (response) {
|
|
6251
|
+
var e_62, _a;
|
|
5372
6252
|
var status = response.status;
|
|
5373
6253
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
5374
6254
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -5380,12 +6260,12 @@
|
|
|
5380
6260
|
_headers[key] = response.headers.get(key);
|
|
5381
6261
|
}
|
|
5382
6262
|
}
|
|
5383
|
-
catch (
|
|
6263
|
+
catch (e_62_1) { e_62 = { error: e_62_1 }; }
|
|
5384
6264
|
finally {
|
|
5385
6265
|
try {
|
|
5386
6266
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
5387
6267
|
}
|
|
5388
|
-
finally { if (
|
|
6268
|
+
finally { if (e_62) throw e_62.error; }
|
|
5389
6269
|
}
|
|
5390
6270
|
}
|
|
5391
6271
|
if (status === 200 || status === 206) {
|
|
@@ -5412,20 +6292,14 @@
|
|
|
5412
6292
|
return rxjs.of(null);
|
|
5413
6293
|
};
|
|
5414
6294
|
/**
|
|
5415
|
-
* Renders a design preview with the specified parameters.
|
|
5416
|
-
* @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied
|
|
5417
|
-
(default value is 'false').
|
|
6295
|
+
* Renders a design preview with the specified parameters and saves rendering result as resource.
|
|
5418
6296
|
* @param tenantId (optional) Tenant identifier
|
|
5419
6297
|
* @param body (optional) Render model with preview parameters.
|
|
5420
6298
|
* @return Success
|
|
5421
6299
|
*/
|
|
5422
|
-
DesignAtomsServiceApiClient.prototype.
|
|
6300
|
+
DesignAtomsServiceApiClient.prototype.renderDesignPreviewToResource = function (tenantId, body) {
|
|
5423
6301
|
var _this = this;
|
|
5424
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/render-preview?";
|
|
5425
|
-
if (attachment === null)
|
|
5426
|
-
throw new Error("The parameter 'attachment' cannot be null.");
|
|
5427
|
-
else if (attachment !== undefined)
|
|
5428
|
-
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
6302
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/render-preview/to-resource?";
|
|
5429
6303
|
if (tenantId === null)
|
|
5430
6304
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
5431
6305
|
else if (tenantId !== undefined)
|
|
@@ -5438,17 +6312,17 @@
|
|
|
5438
6312
|
responseType: "blob",
|
|
5439
6313
|
headers: new i1.HttpHeaders({
|
|
5440
6314
|
"Content-Type": "application/json",
|
|
5441
|
-
"Accept": "application/
|
|
6315
|
+
"Accept": "application/json"
|
|
5442
6316
|
})
|
|
5443
6317
|
};
|
|
5444
6318
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
5445
6319
|
return _this.http.request("post", url_, transformedOptions_);
|
|
5446
6320
|
})).pipe(operators.mergeMap(function (response_) {
|
|
5447
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
6321
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderDesignPreviewToResource(r); });
|
|
5448
6322
|
})).pipe(operators.catchError(function (response_) {
|
|
5449
6323
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
5450
6324
|
try {
|
|
5451
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
6325
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderDesignPreviewToResource(r); });
|
|
5452
6326
|
}
|
|
5453
6327
|
catch (e) {
|
|
5454
6328
|
return rxjs.throwError(e);
|
|
@@ -5458,8 +6332,9 @@
|
|
|
5458
6332
|
return rxjs.throwError(response_);
|
|
5459
6333
|
}));
|
|
5460
6334
|
};
|
|
5461
|
-
DesignAtomsServiceApiClient.prototype.
|
|
5462
|
-
var
|
|
6335
|
+
DesignAtomsServiceApiClient.prototype.processRenderDesignPreviewToResource = function (response) {
|
|
6336
|
+
var e_63, _a;
|
|
6337
|
+
var _this = this;
|
|
5463
6338
|
var status = response.status;
|
|
5464
6339
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
5465
6340
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -5471,19 +6346,27 @@
|
|
|
5471
6346
|
_headers[key] = response.headers.get(key);
|
|
5472
6347
|
}
|
|
5473
6348
|
}
|
|
5474
|
-
catch (
|
|
6349
|
+
catch (e_63_1) { e_63 = { error: e_63_1 }; }
|
|
5475
6350
|
finally {
|
|
5476
6351
|
try {
|
|
5477
6352
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
5478
6353
|
}
|
|
5479
|
-
finally { if (
|
|
6354
|
+
finally { if (e_63) throw e_63.error; }
|
|
5480
6355
|
}
|
|
5481
6356
|
}
|
|
5482
|
-
if (status === 200
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
6357
|
+
if (status === 200) {
|
|
6358
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
6359
|
+
var result200 = null;
|
|
6360
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
6361
|
+
return rxjs.of(result200);
|
|
6362
|
+
}));
|
|
6363
|
+
}
|
|
6364
|
+
else if (status === 409) {
|
|
6365
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
6366
|
+
var result409 = null;
|
|
6367
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
6368
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
6369
|
+
}));
|
|
5487
6370
|
}
|
|
5488
6371
|
else if (status === 401) {
|
|
5489
6372
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
@@ -5503,14 +6386,18 @@
|
|
|
5503
6386
|
return rxjs.of(null);
|
|
5504
6387
|
};
|
|
5505
6388
|
/**
|
|
5506
|
-
* Renders a design
|
|
6389
|
+
* Renders a design proof with the specified parameters.
|
|
6390
|
+
* @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied
|
|
6391
|
+
(default value is 'false').
|
|
5507
6392
|
* @param tenantId (optional) Tenant identifier
|
|
5508
|
-
* @param body (optional) Render model with
|
|
6393
|
+
* @param body (optional) Render model with proof parameters.
|
|
5509
6394
|
* @return Success
|
|
5510
6395
|
*/
|
|
5511
|
-
DesignAtomsServiceApiClient.prototype.
|
|
6396
|
+
DesignAtomsServiceApiClient.prototype.renderDesignProof = function (attachment, tenantId, body) {
|
|
5512
6397
|
var _this = this;
|
|
5513
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/render-
|
|
6398
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/render-proof?";
|
|
6399
|
+
if (attachment !== undefined && attachment !== null)
|
|
6400
|
+
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
5514
6401
|
if (tenantId === null)
|
|
5515
6402
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
5516
6403
|
else if (tenantId !== undefined)
|
|
@@ -5523,17 +6410,17 @@
|
|
|
5523
6410
|
responseType: "blob",
|
|
5524
6411
|
headers: new i1.HttpHeaders({
|
|
5525
6412
|
"Content-Type": "application/json",
|
|
5526
|
-
"Accept": "application/
|
|
6413
|
+
"Accept": "application/octet-stream"
|
|
5527
6414
|
})
|
|
5528
6415
|
};
|
|
5529
6416
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
5530
6417
|
return _this.http.request("post", url_, transformedOptions_);
|
|
5531
6418
|
})).pipe(operators.mergeMap(function (response_) {
|
|
5532
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
6419
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderDesignProof(r); });
|
|
5533
6420
|
})).pipe(operators.catchError(function (response_) {
|
|
5534
6421
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
5535
6422
|
try {
|
|
5536
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
6423
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderDesignProof(r); });
|
|
5537
6424
|
}
|
|
5538
6425
|
catch (e) {
|
|
5539
6426
|
return rxjs.throwError(e);
|
|
@@ -5543,9 +6430,8 @@
|
|
|
5543
6430
|
return rxjs.throwError(response_);
|
|
5544
6431
|
}));
|
|
5545
6432
|
};
|
|
5546
|
-
DesignAtomsServiceApiClient.prototype.
|
|
5547
|
-
var
|
|
5548
|
-
var _this = this;
|
|
6433
|
+
DesignAtomsServiceApiClient.prototype.processRenderDesignProof = function (response) {
|
|
6434
|
+
var e_64, _a;
|
|
5549
6435
|
var status = response.status;
|
|
5550
6436
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
5551
6437
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -5557,20 +6443,19 @@
|
|
|
5557
6443
|
_headers[key] = response.headers.get(key);
|
|
5558
6444
|
}
|
|
5559
6445
|
}
|
|
5560
|
-
catch (
|
|
6446
|
+
catch (e_64_1) { e_64 = { error: e_64_1 }; }
|
|
5561
6447
|
finally {
|
|
5562
6448
|
try {
|
|
5563
6449
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
5564
6450
|
}
|
|
5565
|
-
finally { if (
|
|
6451
|
+
finally { if (e_64) throw e_64.error; }
|
|
5566
6452
|
}
|
|
5567
6453
|
}
|
|
5568
|
-
if (status === 200) {
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
}));
|
|
6454
|
+
if (status === 200 || status === 206) {
|
|
6455
|
+
var contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
6456
|
+
var fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
6457
|
+
var fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
6458
|
+
return rxjs.of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
5574
6459
|
}
|
|
5575
6460
|
else if (status === 401) {
|
|
5576
6461
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
@@ -5590,20 +6475,14 @@
|
|
|
5590
6475
|
return rxjs.of(null);
|
|
5591
6476
|
};
|
|
5592
6477
|
/**
|
|
5593
|
-
* Renders a design proof with the specified parameters.
|
|
5594
|
-
* @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied
|
|
5595
|
-
(default value is 'false').
|
|
6478
|
+
* Renders a design proof with the specified parameters and saves rendering result as resource.
|
|
5596
6479
|
* @param tenantId (optional) Tenant identifier
|
|
5597
|
-
* @param body (optional) Render model with
|
|
6480
|
+
* @param body (optional) Render model with preview parameters.
|
|
5598
6481
|
* @return Success
|
|
5599
6482
|
*/
|
|
5600
|
-
DesignAtomsServiceApiClient.prototype.
|
|
6483
|
+
DesignAtomsServiceApiClient.prototype.renderDesignProofToResource = function (tenantId, body) {
|
|
5601
6484
|
var _this = this;
|
|
5602
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/render-proof?";
|
|
5603
|
-
if (attachment === null)
|
|
5604
|
-
throw new Error("The parameter 'attachment' cannot be null.");
|
|
5605
|
-
else if (attachment !== undefined)
|
|
5606
|
-
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
6485
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/render-proof/to-resource?";
|
|
5607
6486
|
if (tenantId === null)
|
|
5608
6487
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
5609
6488
|
else if (tenantId !== undefined)
|
|
@@ -5616,17 +6495,17 @@
|
|
|
5616
6495
|
responseType: "blob",
|
|
5617
6496
|
headers: new i1.HttpHeaders({
|
|
5618
6497
|
"Content-Type": "application/json",
|
|
5619
|
-
"Accept": "application/
|
|
6498
|
+
"Accept": "application/json"
|
|
5620
6499
|
})
|
|
5621
6500
|
};
|
|
5622
6501
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
5623
6502
|
return _this.http.request("post", url_, transformedOptions_);
|
|
5624
6503
|
})).pipe(operators.mergeMap(function (response_) {
|
|
5625
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
6504
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderDesignProofToResource(r); });
|
|
5626
6505
|
})).pipe(operators.catchError(function (response_) {
|
|
5627
6506
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
5628
6507
|
try {
|
|
5629
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
6508
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processRenderDesignProofToResource(r); });
|
|
5630
6509
|
}
|
|
5631
6510
|
catch (e) {
|
|
5632
6511
|
return rxjs.throwError(e);
|
|
@@ -5636,8 +6515,9 @@
|
|
|
5636
6515
|
return rxjs.throwError(response_);
|
|
5637
6516
|
}));
|
|
5638
6517
|
};
|
|
5639
|
-
DesignAtomsServiceApiClient.prototype.
|
|
5640
|
-
var
|
|
6518
|
+
DesignAtomsServiceApiClient.prototype.processRenderDesignProofToResource = function (response) {
|
|
6519
|
+
var e_65, _a;
|
|
6520
|
+
var _this = this;
|
|
5641
6521
|
var status = response.status;
|
|
5642
6522
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
5643
6523
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -5649,19 +6529,27 @@
|
|
|
5649
6529
|
_headers[key] = response.headers.get(key);
|
|
5650
6530
|
}
|
|
5651
6531
|
}
|
|
5652
|
-
catch (
|
|
6532
|
+
catch (e_65_1) { e_65 = { error: e_65_1 }; }
|
|
5653
6533
|
finally {
|
|
5654
6534
|
try {
|
|
5655
6535
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
5656
6536
|
}
|
|
5657
|
-
finally { if (
|
|
6537
|
+
finally { if (e_65) throw e_65.error; }
|
|
5658
6538
|
}
|
|
5659
6539
|
}
|
|
5660
|
-
if (status === 200
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
6540
|
+
if (status === 200) {
|
|
6541
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
6542
|
+
var result200 = null;
|
|
6543
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
6544
|
+
return rxjs.of(result200);
|
|
6545
|
+
}));
|
|
6546
|
+
}
|
|
6547
|
+
else if (status === 409) {
|
|
6548
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
6549
|
+
var result409 = null;
|
|
6550
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
6551
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
6552
|
+
}));
|
|
5665
6553
|
}
|
|
5666
6554
|
else if (status === 401) {
|
|
5667
6555
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
@@ -5681,37 +6569,54 @@
|
|
|
5681
6569
|
return rxjs.of(null);
|
|
5682
6570
|
};
|
|
5683
6571
|
/**
|
|
5684
|
-
*
|
|
6572
|
+
* Creates product item.
|
|
6573
|
+
* @param itemType (optional) Desired item type.
|
|
5685
6574
|
* @param tenantId (optional) Tenant identifier
|
|
5686
|
-
* @param
|
|
6575
|
+
* @param sourceType (optional)
|
|
6576
|
+
* @param sourceId (optional)
|
|
6577
|
+
* @param sourceOwnerId (optional)
|
|
6578
|
+
* @param url (optional)
|
|
6579
|
+
* @param sourceFile (optional)
|
|
5687
6580
|
* @return Success
|
|
6581
|
+
* @deprecated
|
|
5688
6582
|
*/
|
|
5689
|
-
DesignAtomsServiceApiClient.prototype.
|
|
6583
|
+
DesignAtomsServiceApiClient.prototype.createItem = function (itemType, tenantId, sourceType, sourceId, sourceOwnerId, url, sourceFile) {
|
|
5690
6584
|
var _this = this;
|
|
5691
|
-
var url_ = this.baseUrl + "/api/atoms/v1/designs/
|
|
6585
|
+
var url_ = this.baseUrl + "/api/atoms/v1/designs/model/items?";
|
|
6586
|
+
if (itemType !== undefined && itemType !== null)
|
|
6587
|
+
url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
|
|
5692
6588
|
if (tenantId === null)
|
|
5693
6589
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
5694
6590
|
else if (tenantId !== undefined)
|
|
5695
6591
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
5696
6592
|
url_ = url_.replace(/[?&]$/, "");
|
|
5697
|
-
var content_ =
|
|
6593
|
+
var content_ = new FormData();
|
|
6594
|
+
if (sourceType !== null && sourceType !== undefined)
|
|
6595
|
+
content_.append("sourceType", sourceType.toString());
|
|
6596
|
+
if (sourceId !== null && sourceId !== undefined)
|
|
6597
|
+
content_.append("sourceId", sourceId.toString());
|
|
6598
|
+
if (sourceOwnerId !== null && sourceOwnerId !== undefined)
|
|
6599
|
+
content_.append("sourceOwnerId", sourceOwnerId.toString());
|
|
6600
|
+
if (url !== null && url !== undefined)
|
|
6601
|
+
content_.append("url", url.toString());
|
|
6602
|
+
if (sourceFile !== null && sourceFile !== undefined)
|
|
6603
|
+
content_.append("sourceFile", sourceFile.data, sourceFile.fileName ? sourceFile.fileName : "sourceFile");
|
|
5698
6604
|
var options_ = {
|
|
5699
6605
|
body: content_,
|
|
5700
6606
|
observe: "response",
|
|
5701
6607
|
responseType: "blob",
|
|
5702
6608
|
headers: new i1.HttpHeaders({
|
|
5703
|
-
"Content-Type": "application/json",
|
|
5704
6609
|
"Accept": "application/json"
|
|
5705
6610
|
})
|
|
5706
6611
|
};
|
|
5707
6612
|
return rxjs.from(this.transformOptions(options_)).pipe(operators.mergeMap(function (transformedOptions_) {
|
|
5708
6613
|
return _this.http.request("post", url_, transformedOptions_);
|
|
5709
6614
|
})).pipe(operators.mergeMap(function (response_) {
|
|
5710
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
6615
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processCreateItem(r); });
|
|
5711
6616
|
})).pipe(operators.catchError(function (response_) {
|
|
5712
6617
|
if (response_ instanceof i1.HttpResponseBase) {
|
|
5713
6618
|
try {
|
|
5714
|
-
return _this.transformResult(url_, response_, function (r) { return _this.
|
|
6619
|
+
return _this.transformResult(url_, response_, function (r) { return _this.processCreateItem(r); });
|
|
5715
6620
|
}
|
|
5716
6621
|
catch (e) {
|
|
5717
6622
|
return rxjs.throwError(e);
|
|
@@ -5721,8 +6626,8 @@
|
|
|
5721
6626
|
return rxjs.throwError(response_);
|
|
5722
6627
|
}));
|
|
5723
6628
|
};
|
|
5724
|
-
DesignAtomsServiceApiClient.prototype.
|
|
5725
|
-
var
|
|
6629
|
+
DesignAtomsServiceApiClient.prototype.processCreateItem = function (response) {
|
|
6630
|
+
var e_66, _a;
|
|
5726
6631
|
var _this = this;
|
|
5727
6632
|
var status = response.status;
|
|
5728
6633
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -5735,12 +6640,12 @@
|
|
|
5735
6640
|
_headers[key] = response.headers.get(key);
|
|
5736
6641
|
}
|
|
5737
6642
|
}
|
|
5738
|
-
catch (
|
|
6643
|
+
catch (e_66_1) { e_66 = { error: e_66_1 }; }
|
|
5739
6644
|
finally {
|
|
5740
6645
|
try {
|
|
5741
6646
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
5742
6647
|
}
|
|
5743
|
-
finally { if (
|
|
6648
|
+
finally { if (e_66) throw e_66.error; }
|
|
5744
6649
|
}
|
|
5745
6650
|
}
|
|
5746
6651
|
if (status === 200) {
|
|
@@ -5750,6 +6655,13 @@
|
|
|
5750
6655
|
return rxjs.of(result200);
|
|
5751
6656
|
}));
|
|
5752
6657
|
}
|
|
6658
|
+
else if (status === 404) {
|
|
6659
|
+
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
6660
|
+
var result404 = null;
|
|
6661
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
6662
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
6663
|
+
}));
|
|
6664
|
+
}
|
|
5753
6665
|
else if (status === 401) {
|
|
5754
6666
|
return blobToText(responseBlob).pipe(operators.mergeMap(function (_responseText) {
|
|
5755
6667
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -5779,17 +6691,11 @@
|
|
|
5779
6691
|
DesignAtomsServiceApiClient.prototype.createPrivateDesignFromDesign = function (designId, privateDesignId, privateStorageOwner, tenantId) {
|
|
5780
6692
|
var _this = this;
|
|
5781
6693
|
var url_ = this.baseUrl + "/api/atoms/v1/private-designs/from-design?";
|
|
5782
|
-
if (designId
|
|
5783
|
-
throw new Error("The parameter 'designId' cannot be null.");
|
|
5784
|
-
else if (designId !== undefined)
|
|
6694
|
+
if (designId !== undefined && designId !== null)
|
|
5785
6695
|
url_ += "designId=" + encodeURIComponent("" + designId) + "&";
|
|
5786
|
-
if (privateDesignId
|
|
5787
|
-
throw new Error("The parameter 'privateDesignId' cannot be null.");
|
|
5788
|
-
else if (privateDesignId !== undefined)
|
|
6696
|
+
if (privateDesignId !== undefined && privateDesignId !== null)
|
|
5789
6697
|
url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
|
|
5790
|
-
if (privateStorageOwner
|
|
5791
|
-
throw new Error("The parameter 'privateStorageOwner' cannot be null.");
|
|
5792
|
-
else if (privateStorageOwner !== undefined)
|
|
6698
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
5793
6699
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
5794
6700
|
if (tenantId === null)
|
|
5795
6701
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
@@ -5819,7 +6725,7 @@
|
|
|
5819
6725
|
}));
|
|
5820
6726
|
};
|
|
5821
6727
|
DesignAtomsServiceApiClient.prototype.processCreatePrivateDesignFromDesign = function (response) {
|
|
5822
|
-
var
|
|
6728
|
+
var e_67, _a;
|
|
5823
6729
|
var status = response.status;
|
|
5824
6730
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
5825
6731
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -5831,12 +6737,12 @@
|
|
|
5831
6737
|
_headers[key] = response.headers.get(key);
|
|
5832
6738
|
}
|
|
5833
6739
|
}
|
|
5834
|
-
catch (
|
|
6740
|
+
catch (e_67_1) { e_67 = { error: e_67_1 }; }
|
|
5835
6741
|
finally {
|
|
5836
6742
|
try {
|
|
5837
6743
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
5838
6744
|
}
|
|
5839
|
-
finally { if (
|
|
6745
|
+
finally { if (e_67) throw e_67.error; }
|
|
5840
6746
|
}
|
|
5841
6747
|
}
|
|
5842
6748
|
if (status === 201) {
|
|
@@ -5873,17 +6779,11 @@
|
|
|
5873
6779
|
DesignAtomsServiceApiClient.prototype.createPrivateDesignFromResource = function (resourceId, privateDesignId, privateStorageOwner, tenantId) {
|
|
5874
6780
|
var _this = this;
|
|
5875
6781
|
var url_ = this.baseUrl + "/api/atoms/v1/private-designs/from-resource?";
|
|
5876
|
-
if (resourceId
|
|
5877
|
-
throw new Error("The parameter 'resourceId' cannot be null.");
|
|
5878
|
-
else if (resourceId !== undefined)
|
|
6782
|
+
if (resourceId !== undefined && resourceId !== null)
|
|
5879
6783
|
url_ += "resourceId=" + encodeURIComponent("" + resourceId) + "&";
|
|
5880
|
-
if (privateDesignId
|
|
5881
|
-
throw new Error("The parameter 'privateDesignId' cannot be null.");
|
|
5882
|
-
else if (privateDesignId !== undefined)
|
|
6784
|
+
if (privateDesignId !== undefined && privateDesignId !== null)
|
|
5883
6785
|
url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
|
|
5884
|
-
if (privateStorageOwner
|
|
5885
|
-
throw new Error("The parameter 'privateStorageOwner' cannot be null.");
|
|
5886
|
-
else if (privateStorageOwner !== undefined)
|
|
6786
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
5887
6787
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
5888
6788
|
if (tenantId === null)
|
|
5889
6789
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
@@ -5913,7 +6813,7 @@
|
|
|
5913
6813
|
}));
|
|
5914
6814
|
};
|
|
5915
6815
|
DesignAtomsServiceApiClient.prototype.processCreatePrivateDesignFromResource = function (response) {
|
|
5916
|
-
var
|
|
6816
|
+
var e_68, _a;
|
|
5917
6817
|
var status = response.status;
|
|
5918
6818
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
5919
6819
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -5925,12 +6825,12 @@
|
|
|
5925
6825
|
_headers[key] = response.headers.get(key);
|
|
5926
6826
|
}
|
|
5927
6827
|
}
|
|
5928
|
-
catch (
|
|
6828
|
+
catch (e_68_1) { e_68 = { error: e_68_1 }; }
|
|
5929
6829
|
finally {
|
|
5930
6830
|
try {
|
|
5931
6831
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
5932
6832
|
}
|
|
5933
|
-
finally { if (
|
|
6833
|
+
finally { if (e_68) throw e_68.error; }
|
|
5934
6834
|
}
|
|
5935
6835
|
}
|
|
5936
6836
|
if (status === 201) {
|
|
@@ -6018,7 +6918,7 @@
|
|
|
6018
6918
|
}));
|
|
6019
6919
|
};
|
|
6020
6920
|
DesignAtomsViewerApiClient.prototype.processCssFonts = function (response) {
|
|
6021
|
-
var
|
|
6921
|
+
var e_69, _a;
|
|
6022
6922
|
var _this = this;
|
|
6023
6923
|
var status = response.status;
|
|
6024
6924
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -6031,12 +6931,12 @@
|
|
|
6031
6931
|
_headers[key] = response.headers.get(key);
|
|
6032
6932
|
}
|
|
6033
6933
|
}
|
|
6034
|
-
catch (
|
|
6934
|
+
catch (e_69_1) { e_69 = { error: e_69_1 }; }
|
|
6035
6935
|
finally {
|
|
6036
6936
|
try {
|
|
6037
6937
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
6038
6938
|
}
|
|
6039
|
-
finally { if (
|
|
6939
|
+
finally { if (e_69) throw e_69.error; }
|
|
6040
6940
|
}
|
|
6041
6941
|
}
|
|
6042
6942
|
if (status === 200) {
|
|
@@ -6103,7 +7003,7 @@
|
|
|
6103
7003
|
}));
|
|
6104
7004
|
};
|
|
6105
7005
|
DesignAtomsViewerApiClient.prototype.processFonts = function (response) {
|
|
6106
|
-
var
|
|
7006
|
+
var e_70, _a;
|
|
6107
7007
|
var _this = this;
|
|
6108
7008
|
var status = response.status;
|
|
6109
7009
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -6116,12 +7016,12 @@
|
|
|
6116
7016
|
_headers[key] = response.headers.get(key);
|
|
6117
7017
|
}
|
|
6118
7018
|
}
|
|
6119
|
-
catch (
|
|
7019
|
+
catch (e_70_1) { e_70 = { error: e_70_1 }; }
|
|
6120
7020
|
finally {
|
|
6121
7021
|
try {
|
|
6122
7022
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
6123
7023
|
}
|
|
6124
|
-
finally { if (
|
|
7024
|
+
finally { if (e_70) throw e_70.error; }
|
|
6125
7025
|
}
|
|
6126
7026
|
}
|
|
6127
7027
|
if (status === 200 || status === 206) {
|
|
@@ -6195,7 +7095,7 @@
|
|
|
6195
7095
|
}));
|
|
6196
7096
|
};
|
|
6197
7097
|
DesignAtomsViewerApiClient.prototype.processGetColorPreview = function (response) {
|
|
6198
|
-
var
|
|
7098
|
+
var e_71, _a;
|
|
6199
7099
|
var _this = this;
|
|
6200
7100
|
var status = response.status;
|
|
6201
7101
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -6208,12 +7108,12 @@
|
|
|
6208
7108
|
_headers[key] = response.headers.get(key);
|
|
6209
7109
|
}
|
|
6210
7110
|
}
|
|
6211
|
-
catch (
|
|
7111
|
+
catch (e_71_1) { e_71 = { error: e_71_1 }; }
|
|
6212
7112
|
finally {
|
|
6213
7113
|
try {
|
|
6214
7114
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
6215
7115
|
}
|
|
6216
|
-
finally { if (
|
|
7116
|
+
finally { if (e_71) throw e_71.error; }
|
|
6217
7117
|
}
|
|
6218
7118
|
}
|
|
6219
7119
|
if (status === 200) {
|
|
@@ -6281,7 +7181,7 @@
|
|
|
6281
7181
|
}));
|
|
6282
7182
|
};
|
|
6283
7183
|
DesignAtomsViewerApiClient.prototype.processGetColorPreviews = function (response) {
|
|
6284
|
-
var
|
|
7184
|
+
var e_72, _a;
|
|
6285
7185
|
var _this = this;
|
|
6286
7186
|
var status = response.status;
|
|
6287
7187
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -6294,12 +7194,12 @@
|
|
|
6294
7194
|
_headers[key] = response.headers.get(key);
|
|
6295
7195
|
}
|
|
6296
7196
|
}
|
|
6297
|
-
catch (
|
|
7197
|
+
catch (e_72_1) { e_72 = { error: e_72_1 }; }
|
|
6298
7198
|
finally {
|
|
6299
7199
|
try {
|
|
6300
7200
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
6301
7201
|
}
|
|
6302
|
-
finally { if (
|
|
7202
|
+
finally { if (e_72) throw e_72.error; }
|
|
6303
7203
|
}
|
|
6304
7204
|
}
|
|
6305
7205
|
if (status === 200) {
|
|
@@ -6334,9 +7234,7 @@
|
|
|
6334
7234
|
DesignAtomsViewerApiClient.prototype.getCssFont = function (fontKey, tenantId) {
|
|
6335
7235
|
var _this = this;
|
|
6336
7236
|
var url_ = this.baseUrl + "/api/atoms/v1/ccviewer/GetCssFont?";
|
|
6337
|
-
if (fontKey
|
|
6338
|
-
throw new Error("The parameter 'fontKey' cannot be null.");
|
|
6339
|
-
else if (fontKey !== undefined)
|
|
7237
|
+
if (fontKey !== undefined && fontKey !== null)
|
|
6340
7238
|
url_ += "fontKey=" + encodeURIComponent("" + fontKey) + "&";
|
|
6341
7239
|
if (tenantId === null)
|
|
6342
7240
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
@@ -6368,7 +7266,7 @@
|
|
|
6368
7266
|
}));
|
|
6369
7267
|
};
|
|
6370
7268
|
DesignAtomsViewerApiClient.prototype.processGetCssFont = function (response) {
|
|
6371
|
-
var
|
|
7269
|
+
var e_73, _a;
|
|
6372
7270
|
var _this = this;
|
|
6373
7271
|
var status = response.status;
|
|
6374
7272
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -6381,12 +7279,12 @@
|
|
|
6381
7279
|
_headers[key] = response.headers.get(key);
|
|
6382
7280
|
}
|
|
6383
7281
|
}
|
|
6384
|
-
catch (
|
|
7282
|
+
catch (e_73_1) { e_73 = { error: e_73_1 }; }
|
|
6385
7283
|
finally {
|
|
6386
7284
|
try {
|
|
6387
7285
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
6388
7286
|
}
|
|
6389
|
-
finally { if (
|
|
7287
|
+
finally { if (e_73) throw e_73.error; }
|
|
6390
7288
|
}
|
|
6391
7289
|
}
|
|
6392
7290
|
if (status === 200 || status === 206) {
|
|
@@ -6456,7 +7354,7 @@
|
|
|
6456
7354
|
}));
|
|
6457
7355
|
};
|
|
6458
7356
|
DesignAtomsViewerApiClient.prototype.processGetFallbackFonts = function (response) {
|
|
6459
|
-
var
|
|
7357
|
+
var e_74, _a;
|
|
6460
7358
|
var _this = this;
|
|
6461
7359
|
var status = response.status;
|
|
6462
7360
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -6469,12 +7367,12 @@
|
|
|
6469
7367
|
_headers[key] = response.headers.get(key);
|
|
6470
7368
|
}
|
|
6471
7369
|
}
|
|
6472
|
-
catch (
|
|
7370
|
+
catch (e_74_1) { e_74 = { error: e_74_1 }; }
|
|
6473
7371
|
finally {
|
|
6474
7372
|
try {
|
|
6475
7373
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
6476
7374
|
}
|
|
6477
|
-
finally { if (
|
|
7375
|
+
finally { if (e_74) throw e_74.error; }
|
|
6478
7376
|
}
|
|
6479
7377
|
}
|
|
6480
7378
|
if (status === 200) {
|
|
@@ -6542,7 +7440,7 @@
|
|
|
6542
7440
|
}));
|
|
6543
7441
|
};
|
|
6544
7442
|
DesignAtomsViewerApiClient.prototype.processGetImageSize = function (response) {
|
|
6545
|
-
var
|
|
7443
|
+
var e_75, _a;
|
|
6546
7444
|
var _this = this;
|
|
6547
7445
|
var status = response.status;
|
|
6548
7446
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -6555,12 +7453,12 @@
|
|
|
6555
7453
|
_headers[key] = response.headers.get(key);
|
|
6556
7454
|
}
|
|
6557
7455
|
}
|
|
6558
|
-
catch (
|
|
7456
|
+
catch (e_75_1) { e_75 = { error: e_75_1 }; }
|
|
6559
7457
|
finally {
|
|
6560
7458
|
try {
|
|
6561
7459
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
6562
7460
|
}
|
|
6563
|
-
finally { if (
|
|
7461
|
+
finally { if (e_75) throw e_75.error; }
|
|
6564
7462
|
}
|
|
6565
7463
|
}
|
|
6566
7464
|
if (status === 200) {
|
|
@@ -6628,7 +7526,7 @@
|
|
|
6628
7526
|
}));
|
|
6629
7527
|
};
|
|
6630
7528
|
DesignAtomsViewerApiClient.prototype.processGetShapeBounds = function (response) {
|
|
6631
|
-
var
|
|
7529
|
+
var e_76, _a;
|
|
6632
7530
|
var _this = this;
|
|
6633
7531
|
var status = response.status;
|
|
6634
7532
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -6641,12 +7539,12 @@
|
|
|
6641
7539
|
_headers[key] = response.headers.get(key);
|
|
6642
7540
|
}
|
|
6643
7541
|
}
|
|
6644
|
-
catch (
|
|
7542
|
+
catch (e_76_1) { e_76 = { error: e_76_1 }; }
|
|
6645
7543
|
finally {
|
|
6646
7544
|
try {
|
|
6647
7545
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
6648
7546
|
}
|
|
6649
|
-
finally { if (
|
|
7547
|
+
finally { if (e_76) throw e_76.error; }
|
|
6650
7548
|
}
|
|
6651
7549
|
}
|
|
6652
7550
|
if (status === 200) {
|
|
@@ -6714,7 +7612,7 @@
|
|
|
6714
7612
|
}));
|
|
6715
7613
|
};
|
|
6716
7614
|
DesignAtomsViewerApiClient.prototype.processGetWatermarkItems = function (response) {
|
|
6717
|
-
var
|
|
7615
|
+
var e_77, _a;
|
|
6718
7616
|
var _this = this;
|
|
6719
7617
|
var status = response.status;
|
|
6720
7618
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -6727,12 +7625,12 @@
|
|
|
6727
7625
|
_headers[key] = response.headers.get(key);
|
|
6728
7626
|
}
|
|
6729
7627
|
}
|
|
6730
|
-
catch (
|
|
7628
|
+
catch (e_77_1) { e_77 = { error: e_77_1 }; }
|
|
6731
7629
|
finally {
|
|
6732
7630
|
try {
|
|
6733
7631
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
6734
7632
|
}
|
|
6735
|
-
finally { if (
|
|
7633
|
+
finally { if (e_77) throw e_77.error; }
|
|
6736
7634
|
}
|
|
6737
7635
|
}
|
|
6738
7636
|
if (status === 200) {
|
|
@@ -6784,77 +7682,41 @@
|
|
|
6784
7682
|
DesignAtomsViewerApiClient.prototype.img = function (f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, tenantId) {
|
|
6785
7683
|
var _this = this;
|
|
6786
7684
|
var url_ = this.baseUrl + "/api/atoms/v1/ccviewer/img?";
|
|
6787
|
-
if (f
|
|
6788
|
-
throw new Error("The parameter 'f' cannot be null.");
|
|
6789
|
-
else if (f !== undefined)
|
|
7685
|
+
if (f !== undefined && f !== null)
|
|
6790
7686
|
url_ += "f=" + encodeURIComponent("" + f) + "&";
|
|
6791
|
-
if (w
|
|
6792
|
-
throw new Error("The parameter 'w' cannot be null.");
|
|
6793
|
-
else if (w !== undefined)
|
|
7687
|
+
if (w !== undefined && w !== null)
|
|
6794
7688
|
url_ += "w=" + encodeURIComponent("" + w) + "&";
|
|
6795
|
-
if (h
|
|
6796
|
-
throw new Error("The parameter 'h' cannot be null.");
|
|
6797
|
-
else if (h !== undefined)
|
|
7689
|
+
if (h !== undefined && h !== null)
|
|
6798
7690
|
url_ += "h=" + encodeURIComponent("" + h) + "&";
|
|
6799
|
-
if (cmyk
|
|
6800
|
-
throw new Error("The parameter 'cmyk' cannot be null.");
|
|
6801
|
-
else if (cmyk !== undefined)
|
|
7691
|
+
if (cmyk !== undefined && cmyk !== null)
|
|
6802
7692
|
url_ += "cmyk=" + encodeURIComponent("" + cmyk) + "&";
|
|
6803
|
-
if (rgb
|
|
6804
|
-
throw new Error("The parameter 'rgb' cannot be null.");
|
|
6805
|
-
else if (rgb !== undefined)
|
|
7693
|
+
if (rgb !== undefined && rgb !== null)
|
|
6806
7694
|
url_ += "rgb=" + encodeURIComponent("" + rgb) + "&";
|
|
6807
|
-
if (grayscale
|
|
6808
|
-
throw new Error("The parameter 'grayscale' cannot be null.");
|
|
6809
|
-
else if (grayscale !== undefined)
|
|
7695
|
+
if (grayscale !== undefined && grayscale !== null)
|
|
6810
7696
|
url_ += "grayscale=" + encodeURIComponent("" + grayscale) + "&";
|
|
6811
|
-
if (target
|
|
6812
|
-
throw new Error("The parameter 'target' cannot be null.");
|
|
6813
|
-
else if (target !== undefined)
|
|
7697
|
+
if (target !== undefined && target !== null)
|
|
6814
7698
|
url_ += "target=" + encodeURIComponent("" + target) + "&";
|
|
6815
|
-
if (sq
|
|
6816
|
-
throw new Error("The parameter 'sq' cannot be null.");
|
|
6817
|
-
else if (sq !== undefined)
|
|
7699
|
+
if (sq !== undefined && sq !== null)
|
|
6818
7700
|
url_ += "sq=" + encodeURIComponent("" + sq) + "&";
|
|
6819
|
-
if (effect
|
|
6820
|
-
throw new Error("The parameter 'effect' cannot be null.");
|
|
6821
|
-
else if (effect !== undefined)
|
|
7701
|
+
if (effect !== undefined && effect !== null)
|
|
6822
7702
|
url_ += "effect=" + encodeURIComponent("" + effect) + "&";
|
|
6823
|
-
if (kp
|
|
6824
|
-
throw new Error("The parameter 'kp' cannot be null.");
|
|
6825
|
-
else if (kp !== undefined)
|
|
7703
|
+
if (kp !== undefined && kp !== null)
|
|
6826
7704
|
url_ += "kp=" + encodeURIComponent("" + kp) + "&";
|
|
6827
|
-
if (color
|
|
6828
|
-
throw new Error("The parameter 'color' cannot be null.");
|
|
6829
|
-
else if (color !== undefined)
|
|
7705
|
+
if (color !== undefined && color !== null)
|
|
6830
7706
|
url_ += "color=" + encodeURIComponent("" + color) + "&";
|
|
6831
|
-
if (obm
|
|
6832
|
-
throw new Error("The parameter 'obm' cannot be null.");
|
|
6833
|
-
else if (obm !== undefined)
|
|
7707
|
+
if (obm !== undefined && obm !== null)
|
|
6834
7708
|
url_ += "obm=" + encodeURIComponent("" + obm) + "&";
|
|
6835
|
-
if (oo
|
|
6836
|
-
throw new Error("The parameter 'oo' cannot be null.");
|
|
6837
|
-
else if (oo !== undefined)
|
|
7709
|
+
if (oo !== undefined && oo !== null)
|
|
6838
7710
|
url_ += "oo=" + encodeURIComponent("" + oo) + "&";
|
|
6839
|
-
if (alphaMask
|
|
6840
|
-
throw new Error("The parameter 'alphaMask' cannot be null.");
|
|
6841
|
-
else if (alphaMask !== undefined)
|
|
7711
|
+
if (alphaMask !== undefined && alphaMask !== null)
|
|
6842
7712
|
url_ += "alphaMask=" + encodeURIComponent("" + alphaMask) + "&";
|
|
6843
|
-
if (page
|
|
6844
|
-
throw new Error("The parameter 'page' cannot be null.");
|
|
6845
|
-
else if (page !== undefined)
|
|
7713
|
+
if (page !== undefined && page !== null)
|
|
6846
7714
|
url_ += "page=" + encodeURIComponent("" + page) + "&";
|
|
6847
|
-
if (colorizeColor
|
|
6848
|
-
throw new Error("The parameter 'colorizeColor' cannot be null.");
|
|
6849
|
-
else if (colorizeColor !== undefined)
|
|
7715
|
+
if (colorizeColor !== undefined && colorizeColor !== null)
|
|
6850
7716
|
url_ += "colorizeColor=" + encodeURIComponent("" + colorizeColor) + "&";
|
|
6851
|
-
if (rw
|
|
6852
|
-
throw new Error("The parameter 'rw' cannot be null.");
|
|
6853
|
-
else if (rw !== undefined)
|
|
7717
|
+
if (rw !== undefined && rw !== null)
|
|
6854
7718
|
url_ += "rw=" + encodeURIComponent("" + rw) + "&";
|
|
6855
|
-
if (rh
|
|
6856
|
-
throw new Error("The parameter 'rh' cannot be null.");
|
|
6857
|
-
else if (rh !== undefined)
|
|
7719
|
+
if (rh !== undefined && rh !== null)
|
|
6858
7720
|
url_ += "rh=" + encodeURIComponent("" + rh) + "&";
|
|
6859
7721
|
if (tenantId === null)
|
|
6860
7722
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
@@ -6886,7 +7748,7 @@
|
|
|
6886
7748
|
}));
|
|
6887
7749
|
};
|
|
6888
7750
|
DesignAtomsViewerApiClient.prototype.processImg = function (response) {
|
|
6889
|
-
var
|
|
7751
|
+
var e_78, _a;
|
|
6890
7752
|
var _this = this;
|
|
6891
7753
|
var status = response.status;
|
|
6892
7754
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -6899,12 +7761,12 @@
|
|
|
6899
7761
|
_headers[key] = response.headers.get(key);
|
|
6900
7762
|
}
|
|
6901
7763
|
}
|
|
6902
|
-
catch (
|
|
7764
|
+
catch (e_78_1) { e_78 = { error: e_78_1 }; }
|
|
6903
7765
|
finally {
|
|
6904
7766
|
try {
|
|
6905
7767
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
6906
7768
|
}
|
|
6907
|
-
finally { if (
|
|
7769
|
+
finally { if (e_78) throw e_78.error; }
|
|
6908
7770
|
}
|
|
6909
7771
|
}
|
|
6910
7772
|
if (status === 200 || status === 206) {
|
|
@@ -6979,7 +7841,7 @@
|
|
|
6979
7841
|
}));
|
|
6980
7842
|
};
|
|
6981
7843
|
DesignAtomsViewerApiClient.prototype.processGetLicense = function (response) {
|
|
6982
|
-
var
|
|
7844
|
+
var e_79, _a;
|
|
6983
7845
|
var _this = this;
|
|
6984
7846
|
var status = response.status;
|
|
6985
7847
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -6992,12 +7854,12 @@
|
|
|
6992
7854
|
_headers[key] = response.headers.get(key);
|
|
6993
7855
|
}
|
|
6994
7856
|
}
|
|
6995
|
-
catch (
|
|
7857
|
+
catch (e_79_1) { e_79 = { error: e_79_1 }; }
|
|
6996
7858
|
finally {
|
|
6997
7859
|
try {
|
|
6998
7860
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
6999
7861
|
}
|
|
7000
|
-
finally { if (
|
|
7862
|
+
finally { if (e_79) throw e_79.error; }
|
|
7001
7863
|
}
|
|
7002
7864
|
}
|
|
7003
7865
|
if (status === 200) {
|
|
@@ -7032,9 +7894,7 @@
|
|
|
7032
7894
|
DesignAtomsViewerApiClient.prototype.pth = function (f, tenantId) {
|
|
7033
7895
|
var _this = this;
|
|
7034
7896
|
var url_ = this.baseUrl + "/api/atoms/v1/ccviewer/pth?";
|
|
7035
|
-
if (f
|
|
7036
|
-
throw new Error("The parameter 'f' cannot be null.");
|
|
7037
|
-
else if (f !== undefined)
|
|
7897
|
+
if (f !== undefined && f !== null)
|
|
7038
7898
|
url_ += "f=" + encodeURIComponent("" + f) + "&";
|
|
7039
7899
|
if (tenantId === null)
|
|
7040
7900
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
@@ -7066,7 +7926,7 @@
|
|
|
7066
7926
|
}));
|
|
7067
7927
|
};
|
|
7068
7928
|
DesignAtomsViewerApiClient.prototype.processPth = function (response) {
|
|
7069
|
-
var
|
|
7929
|
+
var e_80, _a;
|
|
7070
7930
|
var _this = this;
|
|
7071
7931
|
var status = response.status;
|
|
7072
7932
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -7079,12 +7939,12 @@
|
|
|
7079
7939
|
_headers[key] = response.headers.get(key);
|
|
7080
7940
|
}
|
|
7081
7941
|
}
|
|
7082
|
-
catch (
|
|
7942
|
+
catch (e_80_1) { e_80 = { error: e_80_1 }; }
|
|
7083
7943
|
finally {
|
|
7084
7944
|
try {
|
|
7085
7945
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
7086
7946
|
}
|
|
7087
|
-
finally { if (
|
|
7947
|
+
finally { if (e_80) throw e_80.error; }
|
|
7088
7948
|
}
|
|
7089
7949
|
}
|
|
7090
7950
|
if (status === 200 || status === 206) {
|
|
@@ -7130,9 +7990,7 @@
|
|
|
7130
7990
|
DesignAtomsViewerApiClient.prototype.resource = function (image, tenantId) {
|
|
7131
7991
|
var _this = this;
|
|
7132
7992
|
var url_ = this.baseUrl + "/api/atoms/v1/ccviewer/resource?";
|
|
7133
|
-
if (image
|
|
7134
|
-
throw new Error("The parameter 'image' cannot be null.");
|
|
7135
|
-
else if (image !== undefined)
|
|
7993
|
+
if (image !== undefined && image !== null)
|
|
7136
7994
|
url_ += "image=" + encodeURIComponent("" + image) + "&";
|
|
7137
7995
|
if (tenantId === null)
|
|
7138
7996
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
@@ -7164,7 +8022,7 @@
|
|
|
7164
8022
|
}));
|
|
7165
8023
|
};
|
|
7166
8024
|
DesignAtomsViewerApiClient.prototype.processResource = function (response) {
|
|
7167
|
-
var
|
|
8025
|
+
var e_81, _a;
|
|
7168
8026
|
var _this = this;
|
|
7169
8027
|
var status = response.status;
|
|
7170
8028
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -7177,12 +8035,12 @@
|
|
|
7177
8035
|
_headers[key] = response.headers.get(key);
|
|
7178
8036
|
}
|
|
7179
8037
|
}
|
|
7180
|
-
catch (
|
|
8038
|
+
catch (e_81_1) { e_81 = { error: e_81_1 }; }
|
|
7181
8039
|
finally {
|
|
7182
8040
|
try {
|
|
7183
8041
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
7184
8042
|
}
|
|
7185
|
-
finally { if (
|
|
8043
|
+
finally { if (e_81) throw e_81.error; }
|
|
7186
8044
|
}
|
|
7187
8045
|
}
|
|
7188
8046
|
if (status === 200 || status === 206) {
|
|
@@ -7240,77 +8098,41 @@
|
|
|
7240
8098
|
DesignAtomsViewerApiClient.prototype.svg = function (f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, tenantId) {
|
|
7241
8099
|
var _this = this;
|
|
7242
8100
|
var url_ = this.baseUrl + "/api/atoms/v1/ccviewer/svg?";
|
|
7243
|
-
if (f
|
|
7244
|
-
throw new Error("The parameter 'f' cannot be null.");
|
|
7245
|
-
else if (f !== undefined)
|
|
8101
|
+
if (f !== undefined && f !== null)
|
|
7246
8102
|
url_ += "f=" + encodeURIComponent("" + f) + "&";
|
|
7247
|
-
if (w
|
|
7248
|
-
throw new Error("The parameter 'w' cannot be null.");
|
|
7249
|
-
else if (w !== undefined)
|
|
8103
|
+
if (w !== undefined && w !== null)
|
|
7250
8104
|
url_ += "w=" + encodeURIComponent("" + w) + "&";
|
|
7251
|
-
if (h
|
|
7252
|
-
throw new Error("The parameter 'h' cannot be null.");
|
|
7253
|
-
else if (h !== undefined)
|
|
8105
|
+
if (h !== undefined && h !== null)
|
|
7254
8106
|
url_ += "h=" + encodeURIComponent("" + h) + "&";
|
|
7255
|
-
if (cmyk
|
|
7256
|
-
throw new Error("The parameter 'cmyk' cannot be null.");
|
|
7257
|
-
else if (cmyk !== undefined)
|
|
8107
|
+
if (cmyk !== undefined && cmyk !== null)
|
|
7258
8108
|
url_ += "cmyk=" + encodeURIComponent("" + cmyk) + "&";
|
|
7259
|
-
if (rgb
|
|
7260
|
-
throw new Error("The parameter 'rgb' cannot be null.");
|
|
7261
|
-
else if (rgb !== undefined)
|
|
8109
|
+
if (rgb !== undefined && rgb !== null)
|
|
7262
8110
|
url_ += "rgb=" + encodeURIComponent("" + rgb) + "&";
|
|
7263
|
-
if (grayscale
|
|
7264
|
-
throw new Error("The parameter 'grayscale' cannot be null.");
|
|
7265
|
-
else if (grayscale !== undefined)
|
|
8111
|
+
if (grayscale !== undefined && grayscale !== null)
|
|
7266
8112
|
url_ += "grayscale=" + encodeURIComponent("" + grayscale) + "&";
|
|
7267
|
-
if (target
|
|
7268
|
-
throw new Error("The parameter 'target' cannot be null.");
|
|
7269
|
-
else if (target !== undefined)
|
|
8113
|
+
if (target !== undefined && target !== null)
|
|
7270
8114
|
url_ += "target=" + encodeURIComponent("" + target) + "&";
|
|
7271
|
-
if (sq
|
|
7272
|
-
throw new Error("The parameter 'sq' cannot be null.");
|
|
7273
|
-
else if (sq !== undefined)
|
|
8115
|
+
if (sq !== undefined && sq !== null)
|
|
7274
8116
|
url_ += "sq=" + encodeURIComponent("" + sq) + "&";
|
|
7275
|
-
if (effect
|
|
7276
|
-
throw new Error("The parameter 'effect' cannot be null.");
|
|
7277
|
-
else if (effect !== undefined)
|
|
8117
|
+
if (effect !== undefined && effect !== null)
|
|
7278
8118
|
url_ += "effect=" + encodeURIComponent("" + effect) + "&";
|
|
7279
|
-
if (kp
|
|
7280
|
-
throw new Error("The parameter 'kp' cannot be null.");
|
|
7281
|
-
else if (kp !== undefined)
|
|
8119
|
+
if (kp !== undefined && kp !== null)
|
|
7282
8120
|
url_ += "kp=" + encodeURIComponent("" + kp) + "&";
|
|
7283
|
-
if (color
|
|
7284
|
-
throw new Error("The parameter 'color' cannot be null.");
|
|
7285
|
-
else if (color !== undefined)
|
|
8121
|
+
if (color !== undefined && color !== null)
|
|
7286
8122
|
url_ += "color=" + encodeURIComponent("" + color) + "&";
|
|
7287
|
-
if (obm
|
|
7288
|
-
throw new Error("The parameter 'obm' cannot be null.");
|
|
7289
|
-
else if (obm !== undefined)
|
|
8123
|
+
if (obm !== undefined && obm !== null)
|
|
7290
8124
|
url_ += "obm=" + encodeURIComponent("" + obm) + "&";
|
|
7291
|
-
if (oo
|
|
7292
|
-
throw new Error("The parameter 'oo' cannot be null.");
|
|
7293
|
-
else if (oo !== undefined)
|
|
8125
|
+
if (oo !== undefined && oo !== null)
|
|
7294
8126
|
url_ += "oo=" + encodeURIComponent("" + oo) + "&";
|
|
7295
|
-
if (alphaMask
|
|
7296
|
-
throw new Error("The parameter 'alphaMask' cannot be null.");
|
|
7297
|
-
else if (alphaMask !== undefined)
|
|
8127
|
+
if (alphaMask !== undefined && alphaMask !== null)
|
|
7298
8128
|
url_ += "alphaMask=" + encodeURIComponent("" + alphaMask) + "&";
|
|
7299
|
-
if (page
|
|
7300
|
-
throw new Error("The parameter 'page' cannot be null.");
|
|
7301
|
-
else if (page !== undefined)
|
|
8129
|
+
if (page !== undefined && page !== null)
|
|
7302
8130
|
url_ += "page=" + encodeURIComponent("" + page) + "&";
|
|
7303
|
-
if (colorizeColor
|
|
7304
|
-
throw new Error("The parameter 'colorizeColor' cannot be null.");
|
|
7305
|
-
else if (colorizeColor !== undefined)
|
|
8131
|
+
if (colorizeColor !== undefined && colorizeColor !== null)
|
|
7306
8132
|
url_ += "colorizeColor=" + encodeURIComponent("" + colorizeColor) + "&";
|
|
7307
|
-
if (rw
|
|
7308
|
-
throw new Error("The parameter 'rw' cannot be null.");
|
|
7309
|
-
else if (rw !== undefined)
|
|
8133
|
+
if (rw !== undefined && rw !== null)
|
|
7310
8134
|
url_ += "rw=" + encodeURIComponent("" + rw) + "&";
|
|
7311
|
-
if (rh
|
|
7312
|
-
throw new Error("The parameter 'rh' cannot be null.");
|
|
7313
|
-
else if (rh !== undefined)
|
|
8135
|
+
if (rh !== undefined && rh !== null)
|
|
7314
8136
|
url_ += "rh=" + encodeURIComponent("" + rh) + "&";
|
|
7315
8137
|
if (tenantId === null)
|
|
7316
8138
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
@@ -7342,7 +8164,7 @@
|
|
|
7342
8164
|
}));
|
|
7343
8165
|
};
|
|
7344
8166
|
DesignAtomsViewerApiClient.prototype.processSvg = function (response) {
|
|
7345
|
-
var
|
|
8167
|
+
var e_82, _a;
|
|
7346
8168
|
var _this = this;
|
|
7347
8169
|
var status = response.status;
|
|
7348
8170
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -7355,12 +8177,12 @@
|
|
|
7355
8177
|
_headers[key] = response.headers.get(key);
|
|
7356
8178
|
}
|
|
7357
8179
|
}
|
|
7358
|
-
catch (
|
|
8180
|
+
catch (e_82_1) { e_82 = { error: e_82_1 }; }
|
|
7359
8181
|
finally {
|
|
7360
8182
|
try {
|
|
7361
8183
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
7362
8184
|
}
|
|
7363
|
-
finally { if (
|
|
8185
|
+
finally { if (e_82) throw e_82.error; }
|
|
7364
8186
|
}
|
|
7365
8187
|
}
|
|
7366
8188
|
if (status === 200 || status === 206) {
|
|
@@ -7406,9 +8228,7 @@
|
|
|
7406
8228
|
DesignAtomsViewerApiClient.prototype.txt = function (f, tenantId) {
|
|
7407
8229
|
var _this = this;
|
|
7408
8230
|
var url_ = this.baseUrl + "/api/atoms/v1/ccviewer/txt?";
|
|
7409
|
-
if (f
|
|
7410
|
-
throw new Error("The parameter 'f' cannot be null.");
|
|
7411
|
-
else if (f !== undefined)
|
|
8231
|
+
if (f !== undefined && f !== null)
|
|
7412
8232
|
url_ += "f=" + encodeURIComponent("" + f) + "&";
|
|
7413
8233
|
if (tenantId === null)
|
|
7414
8234
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
@@ -7440,7 +8260,7 @@
|
|
|
7440
8260
|
}));
|
|
7441
8261
|
};
|
|
7442
8262
|
DesignAtomsViewerApiClient.prototype.processTxt = function (response) {
|
|
7443
|
-
var
|
|
8263
|
+
var e_83, _a;
|
|
7444
8264
|
var _this = this;
|
|
7445
8265
|
var status = response.status;
|
|
7446
8266
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -7453,12 +8273,12 @@
|
|
|
7453
8273
|
_headers[key] = response.headers.get(key);
|
|
7454
8274
|
}
|
|
7455
8275
|
}
|
|
7456
|
-
catch (
|
|
8276
|
+
catch (e_83_1) { e_83 = { error: e_83_1 }; }
|
|
7457
8277
|
finally {
|
|
7458
8278
|
try {
|
|
7459
8279
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
7460
8280
|
}
|
|
7461
|
-
finally { if (
|
|
8281
|
+
finally { if (e_83) throw e_83.error; }
|
|
7462
8282
|
}
|
|
7463
8283
|
}
|
|
7464
8284
|
if (status === 200 || status === 206) {
|
|
@@ -7537,7 +8357,7 @@
|
|
|
7537
8357
|
}));
|
|
7538
8358
|
};
|
|
7539
8359
|
DesignAtomsViewerApiClient.prototype.processUpdateArchedTextItemHandler = function (response) {
|
|
7540
|
-
var
|
|
8360
|
+
var e_84, _a;
|
|
7541
8361
|
var _this = this;
|
|
7542
8362
|
var status = response.status;
|
|
7543
8363
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -7550,12 +8370,12 @@
|
|
|
7550
8370
|
_headers[key] = response.headers.get(key);
|
|
7551
8371
|
}
|
|
7552
8372
|
}
|
|
7553
|
-
catch (
|
|
8373
|
+
catch (e_84_1) { e_84 = { error: e_84_1 }; }
|
|
7554
8374
|
finally {
|
|
7555
8375
|
try {
|
|
7556
8376
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
7557
8377
|
}
|
|
7558
|
-
finally { if (
|
|
8378
|
+
finally { if (e_84) throw e_84.error; }
|
|
7559
8379
|
}
|
|
7560
8380
|
}
|
|
7561
8381
|
if (status === 200) {
|
|
@@ -7623,7 +8443,7 @@
|
|
|
7623
8443
|
}));
|
|
7624
8444
|
};
|
|
7625
8445
|
DesignAtomsViewerApiClient.prototype.processUpdateAutoScaledTextItemHandler = function (response) {
|
|
7626
|
-
var
|
|
8446
|
+
var e_85, _a;
|
|
7627
8447
|
var _this = this;
|
|
7628
8448
|
var status = response.status;
|
|
7629
8449
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -7636,12 +8456,12 @@
|
|
|
7636
8456
|
_headers[key] = response.headers.get(key);
|
|
7637
8457
|
}
|
|
7638
8458
|
}
|
|
7639
|
-
catch (
|
|
8459
|
+
catch (e_85_1) { e_85 = { error: e_85_1 }; }
|
|
7640
8460
|
finally {
|
|
7641
8461
|
try {
|
|
7642
8462
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
7643
8463
|
}
|
|
7644
|
-
finally { if (
|
|
8464
|
+
finally { if (e_85) throw e_85.error; }
|
|
7645
8465
|
}
|
|
7646
8466
|
}
|
|
7647
8467
|
if (status === 200) {
|
|
@@ -7709,7 +8529,7 @@
|
|
|
7709
8529
|
}));
|
|
7710
8530
|
};
|
|
7711
8531
|
DesignAtomsViewerApiClient.prototype.processUpdateBarcodeItemHandler = function (response) {
|
|
7712
|
-
var
|
|
8532
|
+
var e_86, _a;
|
|
7713
8533
|
var _this = this;
|
|
7714
8534
|
var status = response.status;
|
|
7715
8535
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -7722,12 +8542,12 @@
|
|
|
7722
8542
|
_headers[key] = response.headers.get(key);
|
|
7723
8543
|
}
|
|
7724
8544
|
}
|
|
7725
|
-
catch (
|
|
8545
|
+
catch (e_86_1) { e_86 = { error: e_86_1 }; }
|
|
7726
8546
|
finally {
|
|
7727
8547
|
try {
|
|
7728
8548
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
7729
8549
|
}
|
|
7730
|
-
finally { if (
|
|
8550
|
+
finally { if (e_86) throw e_86.error; }
|
|
7731
8551
|
}
|
|
7732
8552
|
}
|
|
7733
8553
|
if (status === 200) {
|
|
@@ -7795,7 +8615,7 @@
|
|
|
7795
8615
|
}));
|
|
7796
8616
|
};
|
|
7797
8617
|
DesignAtomsViewerApiClient.prototype.processUpdateBoundedTextItemHandler = function (response) {
|
|
7798
|
-
var
|
|
8618
|
+
var e_87, _a;
|
|
7799
8619
|
var _this = this;
|
|
7800
8620
|
var status = response.status;
|
|
7801
8621
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -7808,12 +8628,12 @@
|
|
|
7808
8628
|
_headers[key] = response.headers.get(key);
|
|
7809
8629
|
}
|
|
7810
8630
|
}
|
|
7811
|
-
catch (
|
|
8631
|
+
catch (e_87_1) { e_87 = { error: e_87_1 }; }
|
|
7812
8632
|
finally {
|
|
7813
8633
|
try {
|
|
7814
8634
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
7815
8635
|
}
|
|
7816
|
-
finally { if (
|
|
8636
|
+
finally { if (e_87) throw e_87.error; }
|
|
7817
8637
|
}
|
|
7818
8638
|
}
|
|
7819
8639
|
if (status === 200) {
|
|
@@ -7881,7 +8701,7 @@
|
|
|
7881
8701
|
}));
|
|
7882
8702
|
};
|
|
7883
8703
|
DesignAtomsViewerApiClient.prototype.processUpdateByColorData = function (response) {
|
|
7884
|
-
var
|
|
8704
|
+
var e_88, _a;
|
|
7885
8705
|
var _this = this;
|
|
7886
8706
|
var status = response.status;
|
|
7887
8707
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -7894,12 +8714,12 @@
|
|
|
7894
8714
|
_headers[key] = response.headers.get(key);
|
|
7895
8715
|
}
|
|
7896
8716
|
}
|
|
7897
|
-
catch (
|
|
8717
|
+
catch (e_88_1) { e_88 = { error: e_88_1 }; }
|
|
7898
8718
|
finally {
|
|
7899
8719
|
try {
|
|
7900
8720
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
7901
8721
|
}
|
|
7902
|
-
finally { if (
|
|
8722
|
+
finally { if (e_88) throw e_88.error; }
|
|
7903
8723
|
}
|
|
7904
8724
|
}
|
|
7905
8725
|
if (status === 200) {
|
|
@@ -7967,7 +8787,7 @@
|
|
|
7967
8787
|
}));
|
|
7968
8788
|
};
|
|
7969
8789
|
DesignAtomsViewerApiClient.prototype.processUpdateByMultiCallRequest = function (response) {
|
|
7970
|
-
var
|
|
8790
|
+
var e_89, _a;
|
|
7971
8791
|
var _this = this;
|
|
7972
8792
|
var status = response.status;
|
|
7973
8793
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -7980,12 +8800,12 @@
|
|
|
7980
8800
|
_headers[key] = response.headers.get(key);
|
|
7981
8801
|
}
|
|
7982
8802
|
}
|
|
7983
|
-
catch (
|
|
8803
|
+
catch (e_89_1) { e_89 = { error: e_89_1 }; }
|
|
7984
8804
|
finally {
|
|
7985
8805
|
try {
|
|
7986
8806
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
7987
8807
|
}
|
|
7988
|
-
finally { if (
|
|
8808
|
+
finally { if (e_89) throw e_89.error; }
|
|
7989
8809
|
}
|
|
7990
8810
|
}
|
|
7991
8811
|
if (status === 200) {
|
|
@@ -8053,7 +8873,7 @@
|
|
|
8053
8873
|
}));
|
|
8054
8874
|
};
|
|
8055
8875
|
DesignAtomsViewerApiClient.prototype.processUpdateCurvedTextItemHandler = function (response) {
|
|
8056
|
-
var
|
|
8876
|
+
var e_90, _a;
|
|
8057
8877
|
var _this = this;
|
|
8058
8878
|
var status = response.status;
|
|
8059
8879
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -8066,12 +8886,12 @@
|
|
|
8066
8886
|
_headers[key] = response.headers.get(key);
|
|
8067
8887
|
}
|
|
8068
8888
|
}
|
|
8069
|
-
catch (
|
|
8889
|
+
catch (e_90_1) { e_90 = { error: e_90_1 }; }
|
|
8070
8890
|
finally {
|
|
8071
8891
|
try {
|
|
8072
8892
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
8073
8893
|
}
|
|
8074
|
-
finally { if (
|
|
8894
|
+
finally { if (e_90) throw e_90.error; }
|
|
8075
8895
|
}
|
|
8076
8896
|
}
|
|
8077
8897
|
if (status === 200) {
|
|
@@ -8139,7 +8959,7 @@
|
|
|
8139
8959
|
}));
|
|
8140
8960
|
};
|
|
8141
8961
|
DesignAtomsViewerApiClient.prototype.processUpdateImageItemHandler = function (response) {
|
|
8142
|
-
var
|
|
8962
|
+
var e_91, _a;
|
|
8143
8963
|
var _this = this;
|
|
8144
8964
|
var status = response.status;
|
|
8145
8965
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -8152,12 +8972,12 @@
|
|
|
8152
8972
|
_headers[key] = response.headers.get(key);
|
|
8153
8973
|
}
|
|
8154
8974
|
}
|
|
8155
|
-
catch (
|
|
8975
|
+
catch (e_91_1) { e_91 = { error: e_91_1 }; }
|
|
8156
8976
|
finally {
|
|
8157
8977
|
try {
|
|
8158
8978
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
8159
8979
|
}
|
|
8160
|
-
finally { if (
|
|
8980
|
+
finally { if (e_91) throw e_91.error; }
|
|
8161
8981
|
}
|
|
8162
8982
|
}
|
|
8163
8983
|
if (status === 200) {
|
|
@@ -8225,7 +9045,7 @@
|
|
|
8225
9045
|
}));
|
|
8226
9046
|
};
|
|
8227
9047
|
DesignAtomsViewerApiClient.prototype.processUpdatePathBoundedTextItemHandler = function (response) {
|
|
8228
|
-
var
|
|
9048
|
+
var e_92, _a;
|
|
8229
9049
|
var _this = this;
|
|
8230
9050
|
var status = response.status;
|
|
8231
9051
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -8238,12 +9058,12 @@
|
|
|
8238
9058
|
_headers[key] = response.headers.get(key);
|
|
8239
9059
|
}
|
|
8240
9060
|
}
|
|
8241
|
-
catch (
|
|
9061
|
+
catch (e_92_1) { e_92 = { error: e_92_1 }; }
|
|
8242
9062
|
finally {
|
|
8243
9063
|
try {
|
|
8244
9064
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
8245
9065
|
}
|
|
8246
|
-
finally { if (
|
|
9066
|
+
finally { if (e_92) throw e_92.error; }
|
|
8247
9067
|
}
|
|
8248
9068
|
}
|
|
8249
9069
|
if (status === 200) {
|
|
@@ -8311,7 +9131,7 @@
|
|
|
8311
9131
|
}));
|
|
8312
9132
|
};
|
|
8313
9133
|
DesignAtomsViewerApiClient.prototype.processUpdatePlainTextItemHandler = function (response) {
|
|
8314
|
-
var
|
|
9134
|
+
var e_93, _a;
|
|
8315
9135
|
var _this = this;
|
|
8316
9136
|
var status = response.status;
|
|
8317
9137
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -8324,12 +9144,12 @@
|
|
|
8324
9144
|
_headers[key] = response.headers.get(key);
|
|
8325
9145
|
}
|
|
8326
9146
|
}
|
|
8327
|
-
catch (
|
|
9147
|
+
catch (e_93_1) { e_93 = { error: e_93_1 }; }
|
|
8328
9148
|
finally {
|
|
8329
9149
|
try {
|
|
8330
9150
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
8331
9151
|
}
|
|
8332
|
-
finally { if (
|
|
9152
|
+
finally { if (e_93) throw e_93.error; }
|
|
8333
9153
|
}
|
|
8334
9154
|
}
|
|
8335
9155
|
if (status === 200) {
|
|
@@ -8397,7 +9217,7 @@
|
|
|
8397
9217
|
}));
|
|
8398
9218
|
};
|
|
8399
9219
|
DesignAtomsViewerApiClient.prototype.processUpdateShapeItemHandler = function (response) {
|
|
8400
|
-
var
|
|
9220
|
+
var e_94, _a;
|
|
8401
9221
|
var _this = this;
|
|
8402
9222
|
var status = response.status;
|
|
8403
9223
|
var responseBlob = response instanceof i1.HttpResponse ? response.body :
|
|
@@ -8410,12 +9230,12 @@
|
|
|
8410
9230
|
_headers[key] = response.headers.get(key);
|
|
8411
9231
|
}
|
|
8412
9232
|
}
|
|
8413
|
-
catch (
|
|
9233
|
+
catch (e_94_1) { e_94 = { error: e_94_1 }; }
|
|
8414
9234
|
finally {
|
|
8415
9235
|
try {
|
|
8416
9236
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
8417
9237
|
}
|
|
8418
|
-
finally { if (
|
|
9238
|
+
finally { if (e_94) throw e_94.error; }
|
|
8419
9239
|
}
|
|
8420
9240
|
}
|
|
8421
9241
|
if (status === 200) {
|
|
@@ -8477,6 +9297,7 @@
|
|
|
8477
9297
|
ItemSourceType["File"] = "File";
|
|
8478
9298
|
ItemSourceType["ImageStorage"] = "ImageStorage";
|
|
8479
9299
|
ItemSourceType["PrivateImageStorage"] = "PrivateImageStorage";
|
|
9300
|
+
ItemSourceType["Url"] = "Url";
|
|
8480
9301
|
})(exports.ItemSourceType || (exports.ItemSourceType = {}));
|
|
8481
9302
|
(function (ItemType) {
|
|
8482
9303
|
ItemType["Image"] = "Image";
|