@aurigma/ng-storefront-api-client 2.46.2 → 2.48.3
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-storefront-api-client.metadata.json +1 -1
- package/bundles/aurigma-ng-storefront-api-client.umd.js +299 -162
- package/bundles/aurigma-ng-storefront-api-client.umd.js.map +1 -1
- package/bundles/aurigma-ng-storefront-api-client.umd.min.js +1 -1
- package/bundles/aurigma-ng-storefront-api-client.umd.min.js.map +1 -1
- package/esm2015/aurigma-ng-storefront-api-client.js +1 -1
- package/esm2015/lib/storefront-api-client.js +208 -84
- package/esm2015/lib/storefront.module.js +1 -1
- package/esm2015/public-api.js +1 -1
- package/fesm2015/aurigma-ng-storefront-api-client.js +207 -83
- package/fesm2015/aurigma-ng-storefront-api-client.js.map +1 -1
- package/lib/storefront-api-client.d.ts +122 -40
- package/package.json +1 -1
|
@@ -32,4 +32,4 @@ StorefrontModule.decorators = [
|
|
|
32
32
|
exports: []
|
|
33
33
|
},] }
|
|
34
34
|
];
|
|
35
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmVmcm9udC5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiL2hvbWUvYXVyaWdtYS9hZ2VudHMvQ0NIMDQvX3dvcmsvMS9zL0JhY2tlbmQvc3JjL0JhY2tPZmZpY2UuV2ViLlB1YmxpY0FwaS5UeXBlU2NyaXB0QXBpQ2xpZW50L0FuZ3VsYXIvYXBpLWNsaWVudC9zdG9yZWZyb250LWNsaWVudC9wcm9qZWN0cy9jbGllbnQvc3JjLyIsInNvdXJjZXMiOlsibGliL3N0b3JlZnJvbnQubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBc0IsUUFBUSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQzVELE9BQ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AgICAgICB1c2VWYWx1ZTogYXBpVXJsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBwcm92aWRlOiBTdG9yZWZyb250QXBpQ2xpZW50LkFwaUNsaWVudENvbmZpZ3VyYXRpb24sXG4gICAgICAgICAgdXNlRmFjdG9yeTogQ3JlYXRlQXBpQ2xpZW50Q29uZmlndXJhdGlvbi5iaW5kKHRoaXMsIHRva2VuICwgYXBpVXJsLCBhcGlLZXkpXG4gICAgICAgIH0sXG4gICAgICBdXG4gICAgfTtcbiAgfVxufVxuIl19
|
package/esm2015/public-api.js
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export * from './lib/storefront.module';
|
|
5
5
|
export * from './lib/storefront-api-client';
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIvaG9tZS9hdXJpZ21hL2FnZW50cy9DQ0gwNC9fd29yay8xL3MvQmFja2VuZC9zcmMvQmFja09mZmljZS5XZWIuUHVibGljQXBpLlR5cGVTY3JpcHRBcGlDbGllbnQvQW5ndWxhci9hcGktY2xpZW50L3N0b3JlZnJvbnQtY2xpZW50L3Byb2plY3RzL2NsaWVudC9zcmMvIiwic291cmNlcyI6WyJwdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyx5QkFBeUIsQ0FBQztBQUN4QyxjQUFjLDZCQUE2QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBjbGllbnRcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9zdG9yZWZyb250Lm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9zdG9yZWZyb250LWFwaS1jbGllbnQnO1xuIl19
|
|
@@ -1507,39 +1507,34 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1507
1507
|
return of(null);
|
|
1508
1508
|
}
|
|
1509
1509
|
/**
|
|
1510
|
-
*
|
|
1511
|
-
* @param
|
|
1510
|
+
* Returns a project by identifier.
|
|
1511
|
+
* @param id Project identifier.
|
|
1512
1512
|
* @param tenantId (optional) Tenant identifier.
|
|
1513
|
-
* @param body (optional) Create operation parameters.
|
|
1514
1513
|
* @return Success
|
|
1515
1514
|
*/
|
|
1516
|
-
|
|
1517
|
-
let url_ = this.baseUrl + "/api/storefront/v1/projects?";
|
|
1518
|
-
if (
|
|
1519
|
-
throw new Error("The parameter '
|
|
1520
|
-
|
|
1521
|
-
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1515
|
+
get(id, tenantId) {
|
|
1516
|
+
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}?";
|
|
1517
|
+
if (id === undefined || id === null)
|
|
1518
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
1519
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
1522
1520
|
if (tenantId !== undefined && tenantId !== null)
|
|
1523
1521
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1524
1522
|
url_ = url_.replace(/[?&]$/, "");
|
|
1525
|
-
const content_ = JSON.stringify(body);
|
|
1526
1523
|
let options_ = {
|
|
1527
|
-
body: content_,
|
|
1528
1524
|
observe: "response",
|
|
1529
1525
|
responseType: "blob",
|
|
1530
1526
|
headers: new HttpHeaders({
|
|
1531
|
-
"Content-Type": "application/json-patch+json",
|
|
1532
1527
|
"Accept": "text/plain"
|
|
1533
1528
|
})
|
|
1534
1529
|
};
|
|
1535
1530
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1536
|
-
return this.http.request("
|
|
1531
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
1537
1532
|
})).pipe(mergeMap((response_) => {
|
|
1538
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
1533
|
+
return this.transformResult(url_, response_, (r) => this.processGet(r));
|
|
1539
1534
|
})).pipe(catchError((response_) => {
|
|
1540
1535
|
if (response_ instanceof HttpResponseBase) {
|
|
1541
1536
|
try {
|
|
1542
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
1537
|
+
return this.transformResult(url_, response_, (r) => this.processGet(r));
|
|
1543
1538
|
}
|
|
1544
1539
|
catch (e) {
|
|
1545
1540
|
return throwError(e);
|
|
@@ -1549,7 +1544,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1549
1544
|
return throwError(response_);
|
|
1550
1545
|
}));
|
|
1551
1546
|
}
|
|
1552
|
-
|
|
1547
|
+
processGet(response) {
|
|
1553
1548
|
const status = response.status;
|
|
1554
1549
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1555
1550
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -1559,18 +1554,18 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1559
1554
|
_headers[key] = response.headers.get(key);
|
|
1560
1555
|
}
|
|
1561
1556
|
}
|
|
1562
|
-
if (status ===
|
|
1557
|
+
if (status === 200) {
|
|
1563
1558
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1564
|
-
let
|
|
1565
|
-
|
|
1566
|
-
return of(
|
|
1559
|
+
let result200 = null;
|
|
1560
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1561
|
+
return of(result200);
|
|
1567
1562
|
}));
|
|
1568
1563
|
}
|
|
1569
|
-
else if (status ===
|
|
1564
|
+
else if (status === 404) {
|
|
1570
1565
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1571
|
-
let
|
|
1572
|
-
|
|
1573
|
-
return throwException("
|
|
1566
|
+
let result404 = null;
|
|
1567
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1568
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
1574
1569
|
}));
|
|
1575
1570
|
}
|
|
1576
1571
|
else if (status === 401) {
|
|
@@ -1591,12 +1586,12 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1591
1586
|
return of(null);
|
|
1592
1587
|
}
|
|
1593
1588
|
/**
|
|
1594
|
-
*
|
|
1589
|
+
* Removes a project by identifier.
|
|
1595
1590
|
* @param id Project identifier.
|
|
1596
1591
|
* @param tenantId (optional) Tenant identifier.
|
|
1597
1592
|
* @return Success
|
|
1598
1593
|
*/
|
|
1599
|
-
|
|
1594
|
+
delete(id, tenantId) {
|
|
1600
1595
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}?";
|
|
1601
1596
|
if (id === undefined || id === null)
|
|
1602
1597
|
throw new Error("The parameter 'id' must be defined.");
|
|
@@ -1607,18 +1602,16 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1607
1602
|
let options_ = {
|
|
1608
1603
|
observe: "response",
|
|
1609
1604
|
responseType: "blob",
|
|
1610
|
-
headers: new HttpHeaders({
|
|
1611
|
-
"Accept": "text/plain"
|
|
1612
|
-
})
|
|
1605
|
+
headers: new HttpHeaders({})
|
|
1613
1606
|
};
|
|
1614
1607
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1615
|
-
return this.http.request("
|
|
1608
|
+
return this.http.request("delete", url_, transformedOptions_);
|
|
1616
1609
|
})).pipe(mergeMap((response_) => {
|
|
1617
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
1610
|
+
return this.transformResult(url_, response_, (r) => this.processDelete(r));
|
|
1618
1611
|
})).pipe(catchError((response_) => {
|
|
1619
1612
|
if (response_ instanceof HttpResponseBase) {
|
|
1620
1613
|
try {
|
|
1621
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
1614
|
+
return this.transformResult(url_, response_, (r) => this.processDelete(r));
|
|
1622
1615
|
}
|
|
1623
1616
|
catch (e) {
|
|
1624
1617
|
return throwError(e);
|
|
@@ -1628,7 +1621,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1628
1621
|
return throwError(response_);
|
|
1629
1622
|
}));
|
|
1630
1623
|
}
|
|
1631
|
-
|
|
1624
|
+
processDelete(response) {
|
|
1632
1625
|
const status = response.status;
|
|
1633
1626
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1634
1627
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -1640,9 +1633,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1640
1633
|
}
|
|
1641
1634
|
if (status === 200) {
|
|
1642
1635
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1643
|
-
|
|
1644
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1645
|
-
return of(result200);
|
|
1636
|
+
return of(null);
|
|
1646
1637
|
}));
|
|
1647
1638
|
}
|
|
1648
1639
|
else if (status === 404) {
|
|
@@ -1670,13 +1661,13 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1670
1661
|
return of(null);
|
|
1671
1662
|
}
|
|
1672
1663
|
/**
|
|
1673
|
-
*
|
|
1664
|
+
* Returns a project preview file by project identifier.
|
|
1674
1665
|
* @param id Project identifier.
|
|
1675
1666
|
* @param tenantId (optional) Tenant identifier.
|
|
1676
1667
|
* @return Success
|
|
1677
1668
|
*/
|
|
1678
|
-
|
|
1679
|
-
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}?";
|
|
1669
|
+
getPreview(id, tenantId) {
|
|
1670
|
+
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/preview?";
|
|
1680
1671
|
if (id === undefined || id === null)
|
|
1681
1672
|
throw new Error("The parameter 'id' must be defined.");
|
|
1682
1673
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
@@ -1686,16 +1677,18 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1686
1677
|
let options_ = {
|
|
1687
1678
|
observe: "response",
|
|
1688
1679
|
responseType: "blob",
|
|
1689
|
-
headers: new HttpHeaders({
|
|
1680
|
+
headers: new HttpHeaders({
|
|
1681
|
+
"Accept": "text/plain"
|
|
1682
|
+
})
|
|
1690
1683
|
};
|
|
1691
1684
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1692
|
-
return this.http.request("
|
|
1685
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
1693
1686
|
})).pipe(mergeMap((response_) => {
|
|
1694
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
1687
|
+
return this.transformResult(url_, response_, (r) => this.processGetPreview(r));
|
|
1695
1688
|
})).pipe(catchError((response_) => {
|
|
1696
1689
|
if (response_ instanceof HttpResponseBase) {
|
|
1697
1690
|
try {
|
|
1698
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
1691
|
+
return this.transformResult(url_, response_, (r) => this.processGetPreview(r));
|
|
1699
1692
|
}
|
|
1700
1693
|
catch (e) {
|
|
1701
1694
|
return throwError(e);
|
|
@@ -1705,7 +1698,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1705
1698
|
return throwError(response_);
|
|
1706
1699
|
}));
|
|
1707
1700
|
}
|
|
1708
|
-
|
|
1701
|
+
processGetPreview(response) {
|
|
1709
1702
|
const status = response.status;
|
|
1710
1703
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1711
1704
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -1715,10 +1708,11 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1715
1708
|
_headers[key] = response.headers.get(key);
|
|
1716
1709
|
}
|
|
1717
1710
|
}
|
|
1718
|
-
if (status === 200) {
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1711
|
+
if (status === 200 || status === 206) {
|
|
1712
|
+
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
1713
|
+
const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
1714
|
+
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
1715
|
+
return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
1722
1716
|
}
|
|
1723
1717
|
else if (status === 404) {
|
|
1724
1718
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
@@ -1745,13 +1739,13 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1745
1739
|
return of(null);
|
|
1746
1740
|
}
|
|
1747
1741
|
/**
|
|
1748
|
-
* Returns a project preview
|
|
1742
|
+
* Returns a project preview URL by project identifier.
|
|
1749
1743
|
* @param id Project identifier.
|
|
1750
1744
|
* @param tenantId (optional) Tenant identifier.
|
|
1751
1745
|
* @return Success
|
|
1752
1746
|
*/
|
|
1753
|
-
|
|
1754
|
-
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/preview?";
|
|
1747
|
+
getPreviewUrl(id, tenantId) {
|
|
1748
|
+
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/preview-url?";
|
|
1755
1749
|
if (id === undefined || id === null)
|
|
1756
1750
|
throw new Error("The parameter 'id' must be defined.");
|
|
1757
1751
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
@@ -1768,11 +1762,11 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1768
1762
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1769
1763
|
return this.http.request("get", url_, transformedOptions_);
|
|
1770
1764
|
})).pipe(mergeMap((response_) => {
|
|
1771
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
1765
|
+
return this.transformResult(url_, response_, (r) => this.processGetPreviewUrl(r));
|
|
1772
1766
|
})).pipe(catchError((response_) => {
|
|
1773
1767
|
if (response_ instanceof HttpResponseBase) {
|
|
1774
1768
|
try {
|
|
1775
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
1769
|
+
return this.transformResult(url_, response_, (r) => this.processGetPreviewUrl(r));
|
|
1776
1770
|
}
|
|
1777
1771
|
catch (e) {
|
|
1778
1772
|
return throwError(e);
|
|
@@ -1782,7 +1776,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1782
1776
|
return throwError(response_);
|
|
1783
1777
|
}));
|
|
1784
1778
|
}
|
|
1785
|
-
|
|
1779
|
+
processGetPreviewUrl(response) {
|
|
1786
1780
|
const status = response.status;
|
|
1787
1781
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1788
1782
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -1792,16 +1786,17 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1792
1786
|
_headers[key] = response.headers.get(key);
|
|
1793
1787
|
}
|
|
1794
1788
|
}
|
|
1795
|
-
if (status === 200
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1789
|
+
if (status === 200) {
|
|
1790
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1791
|
+
let result200 = null;
|
|
1792
|
+
result200 = _responseText === "" ? null : _responseText;
|
|
1793
|
+
return of(result200);
|
|
1794
|
+
}));
|
|
1800
1795
|
}
|
|
1801
1796
|
else if (status === 404) {
|
|
1802
1797
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1803
1798
|
let result404 = null;
|
|
1804
|
-
result404 = _responseText === "" ? null :
|
|
1799
|
+
result404 = _responseText === "" ? null : _responseText;
|
|
1805
1800
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
1806
1801
|
}));
|
|
1807
1802
|
}
|
|
@@ -1823,34 +1818,39 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1823
1818
|
return of(null);
|
|
1824
1819
|
}
|
|
1825
1820
|
/**
|
|
1826
|
-
*
|
|
1827
|
-
* @param
|
|
1821
|
+
* Creates a new project with single item.
|
|
1822
|
+
* @param storefrontId Storefront identifier.
|
|
1828
1823
|
* @param tenantId (optional) Tenant identifier.
|
|
1824
|
+
* @param body (optional) Create operation parameters.
|
|
1829
1825
|
* @return Success
|
|
1830
1826
|
*/
|
|
1831
|
-
|
|
1832
|
-
let url_ = this.baseUrl + "/api/storefront/v1/projects/
|
|
1833
|
-
if (
|
|
1834
|
-
throw new Error("The parameter '
|
|
1835
|
-
|
|
1827
|
+
createWithSingleItem(storefrontId, tenantId, body) {
|
|
1828
|
+
let url_ = this.baseUrl + "/api/storefront/v1/projects/with-single-item?";
|
|
1829
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
1830
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
1831
|
+
else
|
|
1832
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1836
1833
|
if (tenantId !== undefined && tenantId !== null)
|
|
1837
1834
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1838
1835
|
url_ = url_.replace(/[?&]$/, "");
|
|
1836
|
+
const content_ = JSON.stringify(body);
|
|
1839
1837
|
let options_ = {
|
|
1838
|
+
body: content_,
|
|
1840
1839
|
observe: "response",
|
|
1841
1840
|
responseType: "blob",
|
|
1842
1841
|
headers: new HttpHeaders({
|
|
1842
|
+
"Content-Type": "application/json-patch+json",
|
|
1843
1843
|
"Accept": "text/plain"
|
|
1844
1844
|
})
|
|
1845
1845
|
};
|
|
1846
1846
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1847
|
-
return this.http.request("
|
|
1847
|
+
return this.http.request("post", url_, transformedOptions_);
|
|
1848
1848
|
})).pipe(mergeMap((response_) => {
|
|
1849
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
1849
|
+
return this.transformResult(url_, response_, (r) => this.processCreateWithSingleItem(r));
|
|
1850
1850
|
})).pipe(catchError((response_) => {
|
|
1851
1851
|
if (response_ instanceof HttpResponseBase) {
|
|
1852
1852
|
try {
|
|
1853
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
1853
|
+
return this.transformResult(url_, response_, (r) => this.processCreateWithSingleItem(r));
|
|
1854
1854
|
}
|
|
1855
1855
|
catch (e) {
|
|
1856
1856
|
return throwError(e);
|
|
@@ -1860,7 +1860,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1860
1860
|
return throwError(response_);
|
|
1861
1861
|
}));
|
|
1862
1862
|
}
|
|
1863
|
-
|
|
1863
|
+
processCreateWithSingleItem(response) {
|
|
1864
1864
|
const status = response.status;
|
|
1865
1865
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1866
1866
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -1870,18 +1870,116 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1870
1870
|
_headers[key] = response.headers.get(key);
|
|
1871
1871
|
}
|
|
1872
1872
|
}
|
|
1873
|
-
if (status ===
|
|
1873
|
+
if (status === 201) {
|
|
1874
1874
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1875
|
-
let
|
|
1876
|
-
|
|
1877
|
-
return of(
|
|
1875
|
+
let result201 = null;
|
|
1876
|
+
result201 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1877
|
+
return of(result201);
|
|
1878
1878
|
}));
|
|
1879
1879
|
}
|
|
1880
|
-
else if (status ===
|
|
1880
|
+
else if (status === 400) {
|
|
1881
1881
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1882
|
-
let
|
|
1883
|
-
|
|
1884
|
-
return throwException("
|
|
1882
|
+
let result400 = null;
|
|
1883
|
+
result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1884
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
1885
|
+
}));
|
|
1886
|
+
}
|
|
1887
|
+
else if (status === 409) {
|
|
1888
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1889
|
+
let result409 = null;
|
|
1890
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1891
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
1892
|
+
}));
|
|
1893
|
+
}
|
|
1894
|
+
else if (status === 401) {
|
|
1895
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1896
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1897
|
+
}));
|
|
1898
|
+
}
|
|
1899
|
+
else if (status === 403) {
|
|
1900
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1901
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1902
|
+
}));
|
|
1903
|
+
}
|
|
1904
|
+
else if (status !== 200 && status !== 204) {
|
|
1905
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1906
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1907
|
+
}));
|
|
1908
|
+
}
|
|
1909
|
+
return of(null);
|
|
1910
|
+
}
|
|
1911
|
+
/**
|
|
1912
|
+
* Creates a new project with multiple items.
|
|
1913
|
+
* @param storefrontId Storefront identifier.
|
|
1914
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1915
|
+
* @param body (optional) Create operation parameters.
|
|
1916
|
+
* @return Success
|
|
1917
|
+
*/
|
|
1918
|
+
createWithMultipleItems(storefrontId, tenantId, body) {
|
|
1919
|
+
let url_ = this.baseUrl + "/api/storefront/v1/projects/with-multiple-items?";
|
|
1920
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
1921
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
1922
|
+
else
|
|
1923
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1924
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1925
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1926
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1927
|
+
const content_ = JSON.stringify(body);
|
|
1928
|
+
let options_ = {
|
|
1929
|
+
body: content_,
|
|
1930
|
+
observe: "response",
|
|
1931
|
+
responseType: "blob",
|
|
1932
|
+
headers: new HttpHeaders({
|
|
1933
|
+
"Content-Type": "application/json-patch+json",
|
|
1934
|
+
"Accept": "text/plain"
|
|
1935
|
+
})
|
|
1936
|
+
};
|
|
1937
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1938
|
+
return this.http.request("post", url_, transformedOptions_);
|
|
1939
|
+
})).pipe(mergeMap((response_) => {
|
|
1940
|
+
return this.transformResult(url_, response_, (r) => this.processCreateWithMultipleItems(r));
|
|
1941
|
+
})).pipe(catchError((response_) => {
|
|
1942
|
+
if (response_ instanceof HttpResponseBase) {
|
|
1943
|
+
try {
|
|
1944
|
+
return this.transformResult(url_, response_, (r) => this.processCreateWithMultipleItems(r));
|
|
1945
|
+
}
|
|
1946
|
+
catch (e) {
|
|
1947
|
+
return throwError(e);
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
else
|
|
1951
|
+
return throwError(response_);
|
|
1952
|
+
}));
|
|
1953
|
+
}
|
|
1954
|
+
processCreateWithMultipleItems(response) {
|
|
1955
|
+
const status = response.status;
|
|
1956
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1957
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
1958
|
+
let _headers = {};
|
|
1959
|
+
if (response.headers) {
|
|
1960
|
+
for (let key of response.headers.keys()) {
|
|
1961
|
+
_headers[key] = response.headers.get(key);
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
if (status === 201) {
|
|
1965
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1966
|
+
let result201 = null;
|
|
1967
|
+
result201 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1968
|
+
return of(result201);
|
|
1969
|
+
}));
|
|
1970
|
+
}
|
|
1971
|
+
else if (status === 400) {
|
|
1972
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1973
|
+
let result400 = null;
|
|
1974
|
+
result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1975
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
1976
|
+
}));
|
|
1977
|
+
}
|
|
1978
|
+
else if (status === 409) {
|
|
1979
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1980
|
+
let result409 = null;
|
|
1981
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1982
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
1885
1983
|
}));
|
|
1886
1984
|
}
|
|
1887
1985
|
else if (status === 401) {
|
|
@@ -1961,6 +2059,13 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1961
2059
|
return of(result201);
|
|
1962
2060
|
}));
|
|
1963
2061
|
}
|
|
2062
|
+
else if (status === 400) {
|
|
2063
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2064
|
+
let result400 = null;
|
|
2065
|
+
result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2066
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
2067
|
+
}));
|
|
2068
|
+
}
|
|
1964
2069
|
else if (status === 409) {
|
|
1965
2070
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1966
2071
|
let result409 = null;
|
|
@@ -2045,6 +2150,13 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
2045
2150
|
return of(result201);
|
|
2046
2151
|
}));
|
|
2047
2152
|
}
|
|
2153
|
+
else if (status === 400) {
|
|
2154
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2155
|
+
let result400 = null;
|
|
2156
|
+
result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2157
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
2158
|
+
}));
|
|
2159
|
+
}
|
|
2048
2160
|
else if (status === 409) {
|
|
2049
2161
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2050
2162
|
let result409 = null;
|
|
@@ -2663,14 +2775,17 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
2663
2775
|
/**
|
|
2664
2776
|
* Returns a project processing results.
|
|
2665
2777
|
* @param id Project identifier.
|
|
2778
|
+
* @param itemId (optional) Project item identifier.
|
|
2666
2779
|
* @param tenantId (optional) Tenant identifier.
|
|
2667
2780
|
* @return Success
|
|
2668
2781
|
*/
|
|
2669
|
-
getProjectProcessingResults(id, tenantId) {
|
|
2782
|
+
getProjectProcessingResults(id, itemId, tenantId) {
|
|
2670
2783
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/processing-results?";
|
|
2671
2784
|
if (id === undefined || id === null)
|
|
2672
2785
|
throw new Error("The parameter 'id' must be defined.");
|
|
2673
2786
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2787
|
+
if (itemId !== undefined && itemId !== null)
|
|
2788
|
+
url_ += "itemId=" + encodeURIComponent("" + itemId) + "&";
|
|
2674
2789
|
if (tenantId !== undefined && tenantId !== null)
|
|
2675
2790
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2676
2791
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -2742,14 +2857,17 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
2742
2857
|
/**
|
|
2743
2858
|
* Resumes project processing.
|
|
2744
2859
|
* @param id Project identifier.
|
|
2860
|
+
* @param itemId (optional) Project item identifier. If value is set, only specified item processing will be resumed.
|
|
2745
2861
|
* @param tenantId (optional) Tenant identifier.
|
|
2746
2862
|
* @return Success
|
|
2747
2863
|
*/
|
|
2748
|
-
resumeProjectProcessing(id, tenantId) {
|
|
2864
|
+
resumeProjectProcessing(id, itemId, tenantId) {
|
|
2749
2865
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/resume-processing?";
|
|
2750
2866
|
if (id === undefined || id === null)
|
|
2751
2867
|
throw new Error("The parameter 'id' must be defined.");
|
|
2752
2868
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2869
|
+
if (itemId !== undefined && itemId !== null)
|
|
2870
|
+
url_ += "itemId=" + encodeURIComponent("" + itemId) + "&";
|
|
2753
2871
|
if (tenantId !== undefined && tenantId !== null)
|
|
2754
2872
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2755
2873
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -2817,14 +2935,17 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
2817
2935
|
/**
|
|
2818
2936
|
* Restarts a project processing routine.
|
|
2819
2937
|
* @param id Project identifier.
|
|
2938
|
+
* @param itemId (optional) Project item identifier. If value is set, only specified item processing will be restarted.
|
|
2820
2939
|
* @param tenantId (optional) Tenant identifier.
|
|
2821
2940
|
* @return Success
|
|
2822
2941
|
*/
|
|
2823
|
-
restartProjectProcessing(id, tenantId) {
|
|
2942
|
+
restartProjectProcessing(id, itemId, tenantId) {
|
|
2824
2943
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/restart-processing?";
|
|
2825
2944
|
if (id === undefined || id === null)
|
|
2826
2945
|
throw new Error("The parameter 'id' must be defined.");
|
|
2827
2946
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2947
|
+
if (itemId !== undefined && itemId !== null)
|
|
2948
|
+
url_ += "itemId=" + encodeURIComponent("" + itemId) + "&";
|
|
2828
2949
|
if (tenantId !== undefined && tenantId !== null)
|
|
2829
2950
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2830
2951
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -2971,15 +3092,18 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
2971
3092
|
/**
|
|
2972
3093
|
* Attachs the specified data to the project's order in ecommerce system.
|
|
2973
3094
|
* @param id Project identifier.
|
|
3095
|
+
* @param itemId (optional)
|
|
2974
3096
|
* @param tenantId (optional) Tenant identifier.
|
|
2975
3097
|
* @param body (optional) A list of data items, which should be attached to project's order.
|
|
2976
3098
|
* @return Success
|
|
2977
3099
|
*/
|
|
2978
|
-
attachDataToProjectOrder(id, tenantId, body) {
|
|
3100
|
+
attachDataToProjectOrder(id, itemId, tenantId, body) {
|
|
2979
3101
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/order-data?";
|
|
2980
3102
|
if (id === undefined || id === null)
|
|
2981
3103
|
throw new Error("The parameter 'id' must be defined.");
|
|
2982
3104
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3105
|
+
if (itemId !== undefined && itemId !== null)
|
|
3106
|
+
url_ += "itemId=" + encodeURIComponent("" + itemId) + "&";
|
|
2983
3107
|
if (tenantId !== undefined && tenantId !== null)
|
|
2984
3108
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2985
3109
|
url_ = url_.replace(/[?&]$/, "");
|