@aurigma/ng-storefront-api-client 2.62.12 → 2.63.14
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 +789 -274
- 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 +465 -13
- package/esm2015/lib/storefront.module.js +1 -1
- package/esm2015/public-api.js +1 -1
- package/fesm2015/aurigma-ng-storefront-api-client.js +465 -13
- package/fesm2015/aurigma-ng-storefront-api-client.js.map +1 -1
- package/lib/storefront-api-client.d.ts +133 -10
- 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmVmcm9udC5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiL2hvbWUvYXVyaWdtYS9hZ2VudHMvQ0NIMDEvX3dvcmsvMi9zL0JhY2tlbmQvc3JjL0JhY2tPZmZpY2UuV2ViLlB1YmxpY0FwaS5UeXBlU2NyaXB0QXBpQ2xpZW50L0FuZ3VsYXIvYXBpLWNsaWVudC9zdG9yZWZyb250LWNsaWVudC9wcm9qZWN0cy9jbGllbnQvc3JjLyIsInNvdXJjZXMiOlsibGliL3N0b3JlZnJvbnQubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBc0IsUUFBUSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQzVELE9BQ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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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIvaG9tZS9hdXJpZ21hL2FnZW50cy9DQ0gwMS9fd29yay8yL3MvQmFja2VuZC9zcmMvQmFja09mZmljZS5XZWIuUHVibGljQXBpLlR5cGVTY3JpcHRBcGlDbGllbnQvQW5ndWxhci9hcGktY2xpZW50L3N0b3JlZnJvbnQtY2xpZW50L3Byb2plY3RzL2NsaWVudC9zcmMvIiwic291cmNlcyI6WyJwdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyx5QkFBeUIsQ0FBQztBQUN4QyxjQUFjLDZCQUE2QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBjbGllbnRcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9zdG9yZWZyb250Lm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9zdG9yZWZyb250LWFwaS1jbGllbnQnO1xuIl19
|
|
@@ -523,6 +523,95 @@ class ProductBundlesApiClient extends ApiClientBase {
|
|
|
523
523
|
}
|
|
524
524
|
return of(null);
|
|
525
525
|
}
|
|
526
|
+
/**
|
|
527
|
+
* Returns a product bundle personalization parameters by product identifier.
|
|
528
|
+
* @param id Product bundle identifier.
|
|
529
|
+
* @param productBundleVersionId (optional) Product bundle version identifier.
|
|
530
|
+
* @param tenantId (optional) Tenant identifier.
|
|
531
|
+
* @return Success
|
|
532
|
+
*/
|
|
533
|
+
getProductBundlePersonalizationParameters(id, productBundleVersionId, tenantId) {
|
|
534
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-bundles/{id}/personalization-parameters?";
|
|
535
|
+
if (id === undefined || id === null)
|
|
536
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
537
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
538
|
+
if (productBundleVersionId !== undefined && productBundleVersionId !== null)
|
|
539
|
+
url_ += "productBundleVersionId=" + encodeURIComponent("" + productBundleVersionId) + "&";
|
|
540
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
541
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
542
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
543
|
+
let options_ = {
|
|
544
|
+
observe: "response",
|
|
545
|
+
responseType: "blob",
|
|
546
|
+
headers: new HttpHeaders({
|
|
547
|
+
"Accept": "application/json"
|
|
548
|
+
})
|
|
549
|
+
};
|
|
550
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
551
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
552
|
+
})).pipe(mergeMap((response_) => {
|
|
553
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductBundlePersonalizationParameters(r));
|
|
554
|
+
})).pipe(catchError((response_) => {
|
|
555
|
+
if (response_ instanceof HttpResponseBase) {
|
|
556
|
+
try {
|
|
557
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductBundlePersonalizationParameters(r));
|
|
558
|
+
}
|
|
559
|
+
catch (e) {
|
|
560
|
+
return throwError(e);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
else
|
|
564
|
+
return throwError(response_);
|
|
565
|
+
}));
|
|
566
|
+
}
|
|
567
|
+
processGetProductBundlePersonalizationParameters(response) {
|
|
568
|
+
const status = response.status;
|
|
569
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
570
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
571
|
+
let _headers = {};
|
|
572
|
+
if (response.headers) {
|
|
573
|
+
for (let key of response.headers.keys()) {
|
|
574
|
+
_headers[key] = response.headers.get(key);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
if (status === 200) {
|
|
578
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
579
|
+
let result200 = null;
|
|
580
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
581
|
+
return of(result200);
|
|
582
|
+
}));
|
|
583
|
+
}
|
|
584
|
+
else if (status === 404) {
|
|
585
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
586
|
+
let result404 = null;
|
|
587
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
588
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
589
|
+
}));
|
|
590
|
+
}
|
|
591
|
+
else if (status === 409) {
|
|
592
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
593
|
+
let result409 = null;
|
|
594
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
595
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
596
|
+
}));
|
|
597
|
+
}
|
|
598
|
+
else if (status === 401) {
|
|
599
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
600
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
601
|
+
}));
|
|
602
|
+
}
|
|
603
|
+
else if (status === 403) {
|
|
604
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
605
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
606
|
+
}));
|
|
607
|
+
}
|
|
608
|
+
else if (status !== 200 && status !== 204) {
|
|
609
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
610
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
611
|
+
}));
|
|
612
|
+
}
|
|
613
|
+
return of(null);
|
|
614
|
+
}
|
|
526
615
|
/**
|
|
527
616
|
* Returns a product bundle summary by product bundle identifier.
|
|
528
617
|
* @param id Product bundle identifier.
|
|
@@ -898,6 +987,95 @@ class ProductLinksApiClient extends ApiClientBase {
|
|
|
898
987
|
}
|
|
899
988
|
return of(null);
|
|
900
989
|
}
|
|
990
|
+
/**
|
|
991
|
+
* Returns a product link personalization parameters by product identifier.
|
|
992
|
+
* @param id Product link identifier.
|
|
993
|
+
* @param productLinkVersionId (optional) Product link version identifier.
|
|
994
|
+
* @param tenantId (optional) Tenant identifier.
|
|
995
|
+
* @return Success
|
|
996
|
+
*/
|
|
997
|
+
getProductLinkPersonalizationParameters(id, productLinkVersionId, tenantId) {
|
|
998
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-links/{id}/personalization-parameters?";
|
|
999
|
+
if (id === undefined || id === null)
|
|
1000
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
1001
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
1002
|
+
if (productLinkVersionId !== undefined && productLinkVersionId !== null)
|
|
1003
|
+
url_ += "productLinkVersionId=" + encodeURIComponent("" + productLinkVersionId) + "&";
|
|
1004
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1005
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1006
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1007
|
+
let options_ = {
|
|
1008
|
+
observe: "response",
|
|
1009
|
+
responseType: "blob",
|
|
1010
|
+
headers: new HttpHeaders({
|
|
1011
|
+
"Accept": "application/json"
|
|
1012
|
+
})
|
|
1013
|
+
};
|
|
1014
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1015
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
1016
|
+
})).pipe(mergeMap((response_) => {
|
|
1017
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductLinkPersonalizationParameters(r));
|
|
1018
|
+
})).pipe(catchError((response_) => {
|
|
1019
|
+
if (response_ instanceof HttpResponseBase) {
|
|
1020
|
+
try {
|
|
1021
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductLinkPersonalizationParameters(r));
|
|
1022
|
+
}
|
|
1023
|
+
catch (e) {
|
|
1024
|
+
return throwError(e);
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
else
|
|
1028
|
+
return throwError(response_);
|
|
1029
|
+
}));
|
|
1030
|
+
}
|
|
1031
|
+
processGetProductLinkPersonalizationParameters(response) {
|
|
1032
|
+
const status = response.status;
|
|
1033
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1034
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
1035
|
+
let _headers = {};
|
|
1036
|
+
if (response.headers) {
|
|
1037
|
+
for (let key of response.headers.keys()) {
|
|
1038
|
+
_headers[key] = response.headers.get(key);
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
if (status === 200) {
|
|
1042
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1043
|
+
let result200 = null;
|
|
1044
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1045
|
+
return of(result200);
|
|
1046
|
+
}));
|
|
1047
|
+
}
|
|
1048
|
+
else if (status === 404) {
|
|
1049
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1050
|
+
let result404 = null;
|
|
1051
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1052
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
1053
|
+
}));
|
|
1054
|
+
}
|
|
1055
|
+
else if (status === 409) {
|
|
1056
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1057
|
+
let result409 = null;
|
|
1058
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1059
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
1060
|
+
}));
|
|
1061
|
+
}
|
|
1062
|
+
else if (status === 401) {
|
|
1063
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1064
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1065
|
+
}));
|
|
1066
|
+
}
|
|
1067
|
+
else if (status === 403) {
|
|
1068
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1069
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1070
|
+
}));
|
|
1071
|
+
}
|
|
1072
|
+
else if (status !== 200 && status !== 204) {
|
|
1073
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1074
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1075
|
+
}));
|
|
1076
|
+
}
|
|
1077
|
+
return of(null);
|
|
1078
|
+
}
|
|
901
1079
|
/**
|
|
902
1080
|
* Returns a product link summary by product link identifier.
|
|
903
1081
|
* @param id Product link identifier.
|
|
@@ -1786,6 +1964,97 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
1786
1964
|
}
|
|
1787
1965
|
return of(null);
|
|
1788
1966
|
}
|
|
1967
|
+
/**
|
|
1968
|
+
* Returns a personalization parameters by the storefront product reference.
|
|
1969
|
+
* @param reference Product reference - external reference to Customer's Canvas product, e.g online store product identifier.
|
|
1970
|
+
* @param storefrontId Storefront identifier.
|
|
1971
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1972
|
+
* @return Success
|
|
1973
|
+
*/
|
|
1974
|
+
getPersonalizationParameters(reference, storefrontId, tenantId) {
|
|
1975
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/personalization-parameters?";
|
|
1976
|
+
if (reference === undefined || reference === null)
|
|
1977
|
+
throw new Error("The parameter 'reference' must be defined.");
|
|
1978
|
+
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
1979
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
1980
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
1981
|
+
else
|
|
1982
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1983
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1984
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1985
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1986
|
+
let options_ = {
|
|
1987
|
+
observe: "response",
|
|
1988
|
+
responseType: "blob",
|
|
1989
|
+
headers: new HttpHeaders({
|
|
1990
|
+
"Accept": "application/json"
|
|
1991
|
+
})
|
|
1992
|
+
};
|
|
1993
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1994
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
1995
|
+
})).pipe(mergeMap((response_) => {
|
|
1996
|
+
return this.transformResult(url_, response_, (r) => this.processGetPersonalizationParameters(r));
|
|
1997
|
+
})).pipe(catchError((response_) => {
|
|
1998
|
+
if (response_ instanceof HttpResponseBase) {
|
|
1999
|
+
try {
|
|
2000
|
+
return this.transformResult(url_, response_, (r) => this.processGetPersonalizationParameters(r));
|
|
2001
|
+
}
|
|
2002
|
+
catch (e) {
|
|
2003
|
+
return throwError(e);
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
else
|
|
2007
|
+
return throwError(response_);
|
|
2008
|
+
}));
|
|
2009
|
+
}
|
|
2010
|
+
processGetPersonalizationParameters(response) {
|
|
2011
|
+
const status = response.status;
|
|
2012
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2013
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
2014
|
+
let _headers = {};
|
|
2015
|
+
if (response.headers) {
|
|
2016
|
+
for (let key of response.headers.keys()) {
|
|
2017
|
+
_headers[key] = response.headers.get(key);
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
if (status === 200) {
|
|
2021
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2022
|
+
let result200 = null;
|
|
2023
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2024
|
+
return of(result200);
|
|
2025
|
+
}));
|
|
2026
|
+
}
|
|
2027
|
+
else if (status === 404) {
|
|
2028
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2029
|
+
let result404 = null;
|
|
2030
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2031
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2032
|
+
}));
|
|
2033
|
+
}
|
|
2034
|
+
else if (status === 409) {
|
|
2035
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2036
|
+
let result409 = null;
|
|
2037
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2038
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2039
|
+
}));
|
|
2040
|
+
}
|
|
2041
|
+
else if (status === 401) {
|
|
2042
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2043
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2044
|
+
}));
|
|
2045
|
+
}
|
|
2046
|
+
else if (status === 403) {
|
|
2047
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2048
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2049
|
+
}));
|
|
2050
|
+
}
|
|
2051
|
+
else if (status !== 200 && status !== 204) {
|
|
2052
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2053
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2054
|
+
}));
|
|
2055
|
+
}
|
|
2056
|
+
return of(null);
|
|
2057
|
+
}
|
|
1789
2058
|
/**
|
|
1790
2059
|
* Returns a product specification by the storefront product reference.
|
|
1791
2060
|
* @param reference Product reference - external reference to Customer's Canvas product, e.g online store product identifier.
|
|
@@ -2642,6 +2911,95 @@ class ProductsApiClient extends ApiClientBase {
|
|
|
2642
2911
|
}
|
|
2643
2912
|
return of(null);
|
|
2644
2913
|
}
|
|
2914
|
+
/**
|
|
2915
|
+
* Returns a product personalization parameters by product identifier.
|
|
2916
|
+
* @param id Product identifier.
|
|
2917
|
+
* @param productVersionId (optional) Product version identifier.
|
|
2918
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2919
|
+
* @return Success
|
|
2920
|
+
*/
|
|
2921
|
+
getProductSummary(id, productVersionId, tenantId) {
|
|
2922
|
+
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/personalization-parameters?";
|
|
2923
|
+
if (id === undefined || id === null)
|
|
2924
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
2925
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2926
|
+
if (productVersionId !== undefined && productVersionId !== null)
|
|
2927
|
+
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
2928
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
2929
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2930
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2931
|
+
let options_ = {
|
|
2932
|
+
observe: "response",
|
|
2933
|
+
responseType: "blob",
|
|
2934
|
+
headers: new HttpHeaders({
|
|
2935
|
+
"Accept": "application/json"
|
|
2936
|
+
})
|
|
2937
|
+
};
|
|
2938
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
2939
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
2940
|
+
})).pipe(mergeMap((response_) => {
|
|
2941
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductSummary(r));
|
|
2942
|
+
})).pipe(catchError((response_) => {
|
|
2943
|
+
if (response_ instanceof HttpResponseBase) {
|
|
2944
|
+
try {
|
|
2945
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductSummary(r));
|
|
2946
|
+
}
|
|
2947
|
+
catch (e) {
|
|
2948
|
+
return throwError(e);
|
|
2949
|
+
}
|
|
2950
|
+
}
|
|
2951
|
+
else
|
|
2952
|
+
return throwError(response_);
|
|
2953
|
+
}));
|
|
2954
|
+
}
|
|
2955
|
+
processGetProductSummary(response) {
|
|
2956
|
+
const status = response.status;
|
|
2957
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2958
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
2959
|
+
let _headers = {};
|
|
2960
|
+
if (response.headers) {
|
|
2961
|
+
for (let key of response.headers.keys()) {
|
|
2962
|
+
_headers[key] = response.headers.get(key);
|
|
2963
|
+
}
|
|
2964
|
+
}
|
|
2965
|
+
if (status === 200) {
|
|
2966
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2967
|
+
let result200 = null;
|
|
2968
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2969
|
+
return of(result200);
|
|
2970
|
+
}));
|
|
2971
|
+
}
|
|
2972
|
+
else if (status === 404) {
|
|
2973
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2974
|
+
let result404 = null;
|
|
2975
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2976
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2977
|
+
}));
|
|
2978
|
+
}
|
|
2979
|
+
else if (status === 409) {
|
|
2980
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2981
|
+
let result409 = null;
|
|
2982
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2983
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2984
|
+
}));
|
|
2985
|
+
}
|
|
2986
|
+
else if (status === 401) {
|
|
2987
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2988
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2989
|
+
}));
|
|
2990
|
+
}
|
|
2991
|
+
else if (status === 403) {
|
|
2992
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2993
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2994
|
+
}));
|
|
2995
|
+
}
|
|
2996
|
+
else if (status !== 200 && status !== 204) {
|
|
2997
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2998
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2999
|
+
}));
|
|
3000
|
+
}
|
|
3001
|
+
return of(null);
|
|
3002
|
+
}
|
|
2645
3003
|
/**
|
|
2646
3004
|
* Returns a product summary by product identifier.
|
|
2647
3005
|
* @param id Product identifier.
|
|
@@ -2652,7 +3010,7 @@ class ProductsApiClient extends ApiClientBase {
|
|
|
2652
3010
|
* @param tenantId (optional) Tenant identifier.
|
|
2653
3011
|
* @return Success
|
|
2654
3012
|
*/
|
|
2655
|
-
|
|
3013
|
+
getProductSummary2(id, productVersionId, productLinkId, productVariantId, sku, tenantId) {
|
|
2656
3014
|
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/summary?";
|
|
2657
3015
|
if (id === undefined || id === null)
|
|
2658
3016
|
throw new Error("The parameter 'id' must be defined.");
|
|
@@ -2678,11 +3036,11 @@ class ProductsApiClient extends ApiClientBase {
|
|
|
2678
3036
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
2679
3037
|
return this.http.request("get", url_, transformedOptions_);
|
|
2680
3038
|
})).pipe(mergeMap((response_) => {
|
|
2681
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
3039
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductSummary2(r));
|
|
2682
3040
|
})).pipe(catchError((response_) => {
|
|
2683
3041
|
if (response_ instanceof HttpResponseBase) {
|
|
2684
3042
|
try {
|
|
2685
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
3043
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductSummary2(r));
|
|
2686
3044
|
}
|
|
2687
3045
|
catch (e) {
|
|
2688
3046
|
return throwError(e);
|
|
@@ -2692,7 +3050,7 @@ class ProductsApiClient extends ApiClientBase {
|
|
|
2692
3050
|
return throwError(response_);
|
|
2693
3051
|
}));
|
|
2694
3052
|
}
|
|
2695
|
-
|
|
3053
|
+
processGetProductSummary2(response) {
|
|
2696
3054
|
const status = response.status;
|
|
2697
3055
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2698
3056
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -4077,6 +4435,92 @@ class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
4077
4435
|
}
|
|
4078
4436
|
return of(null);
|
|
4079
4437
|
}
|
|
4438
|
+
/**
|
|
4439
|
+
* Returns a product specification personalization parameters by product identifier.
|
|
4440
|
+
* @param id Product specification identifier.
|
|
4441
|
+
* @param tenantId (optional) Tenant identifier.
|
|
4442
|
+
* @return Success
|
|
4443
|
+
*/
|
|
4444
|
+
getProductSpecificationSummary(id, tenantId) {
|
|
4445
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-specifications/{id}/personalization-parameters?";
|
|
4446
|
+
if (id === undefined || id === null)
|
|
4447
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
4448
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4449
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
4450
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
4451
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4452
|
+
let options_ = {
|
|
4453
|
+
observe: "response",
|
|
4454
|
+
responseType: "blob",
|
|
4455
|
+
headers: new HttpHeaders({
|
|
4456
|
+
"Accept": "application/json"
|
|
4457
|
+
})
|
|
4458
|
+
};
|
|
4459
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
4460
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
4461
|
+
})).pipe(mergeMap((response_) => {
|
|
4462
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductSpecificationSummary(r));
|
|
4463
|
+
})).pipe(catchError((response_) => {
|
|
4464
|
+
if (response_ instanceof HttpResponseBase) {
|
|
4465
|
+
try {
|
|
4466
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductSpecificationSummary(r));
|
|
4467
|
+
}
|
|
4468
|
+
catch (e) {
|
|
4469
|
+
return throwError(e);
|
|
4470
|
+
}
|
|
4471
|
+
}
|
|
4472
|
+
else
|
|
4473
|
+
return throwError(response_);
|
|
4474
|
+
}));
|
|
4475
|
+
}
|
|
4476
|
+
processGetProductSpecificationSummary(response) {
|
|
4477
|
+
const status = response.status;
|
|
4478
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
4479
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
4480
|
+
let _headers = {};
|
|
4481
|
+
if (response.headers) {
|
|
4482
|
+
for (let key of response.headers.keys()) {
|
|
4483
|
+
_headers[key] = response.headers.get(key);
|
|
4484
|
+
}
|
|
4485
|
+
}
|
|
4486
|
+
if (status === 200) {
|
|
4487
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
4488
|
+
let result200 = null;
|
|
4489
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
4490
|
+
return of(result200);
|
|
4491
|
+
}));
|
|
4492
|
+
}
|
|
4493
|
+
else if (status === 404) {
|
|
4494
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
4495
|
+
let result404 = null;
|
|
4496
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
4497
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
4498
|
+
}));
|
|
4499
|
+
}
|
|
4500
|
+
else if (status === 409) {
|
|
4501
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
4502
|
+
let result409 = null;
|
|
4503
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
4504
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
4505
|
+
}));
|
|
4506
|
+
}
|
|
4507
|
+
else if (status === 401) {
|
|
4508
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
4509
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
4510
|
+
}));
|
|
4511
|
+
}
|
|
4512
|
+
else if (status === 403) {
|
|
4513
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
4514
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
4515
|
+
}));
|
|
4516
|
+
}
|
|
4517
|
+
else if (status !== 200 && status !== 204) {
|
|
4518
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
4519
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4520
|
+
}));
|
|
4521
|
+
}
|
|
4522
|
+
return of(null);
|
|
4523
|
+
}
|
|
4080
4524
|
/**
|
|
4081
4525
|
* Returns a product personalization workflow description by product specification identifier.
|
|
4082
4526
|
* @param id Product specification identifier.
|
|
@@ -6985,6 +7429,22 @@ var ConflictType;
|
|
|
6985
7429
|
ConflictType["IdConflict"] = "IdConflict";
|
|
6986
7430
|
ConflictType["GeneralConflict"] = "GeneralConflict";
|
|
6987
7431
|
})(ConflictType || (ConflictType = {}));
|
|
7432
|
+
/** Customer's Canvas product type. */
|
|
7433
|
+
var ProductType;
|
|
7434
|
+
(function (ProductType) {
|
|
7435
|
+
ProductType["ProductSpecification"] = "ProductSpecification";
|
|
7436
|
+
ProductType["Product"] = "Product";
|
|
7437
|
+
ProductType["ProductLink"] = "ProductLink";
|
|
7438
|
+
ProductType["ProductBundle"] = "ProductBundle";
|
|
7439
|
+
})(ProductType || (ProductType = {}));
|
|
7440
|
+
/** Type of editor that should be configured by workflow. */
|
|
7441
|
+
var WorkflowType;
|
|
7442
|
+
(function (WorkflowType) {
|
|
7443
|
+
WorkflowType["UIFramework"] = "UIFramework";
|
|
7444
|
+
WorkflowType["SimpleEditor"] = "SimpleEditor";
|
|
7445
|
+
WorkflowType["DesignEditor"] = "DesignEditor";
|
|
7446
|
+
WorkflowType["WorkflowElements"] = "WorkflowElements";
|
|
7447
|
+
})(WorkflowType || (WorkflowType = {}));
|
|
6988
7448
|
/** Available appearance types. */
|
|
6989
7449
|
var AppearanceDataType;
|
|
6990
7450
|
(function (AppearanceDataType) {
|
|
@@ -6996,14 +7456,6 @@ var AppearanceDataType;
|
|
|
6996
7456
|
AppearanceDataType["ImageGrid"] = "ImageGrid";
|
|
6997
7457
|
AppearanceDataType["ImageList"] = "ImageList";
|
|
6998
7458
|
})(AppearanceDataType || (AppearanceDataType = {}));
|
|
6999
|
-
/** Type of editor that should be configured by workflow. */
|
|
7000
|
-
var WorkflowType;
|
|
7001
|
-
(function (WorkflowType) {
|
|
7002
|
-
WorkflowType["UIFramework"] = "UIFramework";
|
|
7003
|
-
WorkflowType["SimpleEditor"] = "SimpleEditor";
|
|
7004
|
-
WorkflowType["DesignEditor"] = "DesignEditor";
|
|
7005
|
-
WorkflowType["WorkflowElements"] = "WorkflowElements";
|
|
7006
|
-
})(WorkflowType || (WorkflowType = {}));
|
|
7007
7459
|
/** Product link resource type. */
|
|
7008
7460
|
var ProductLinkResourceType;
|
|
7009
7461
|
(function (ProductLinkResourceType) {
|
|
@@ -7200,5 +7652,5 @@ StorefrontModule.decorators = [
|
|
|
7200
7652
|
* Generated bundle index. Do not edit.
|
|
7201
7653
|
*/
|
|
7202
7654
|
|
|
7203
|
-
export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, AppearanceDataType, BuildInfoApiClient, ConflictType, CreateApiClientConfiguration, DatePeriod, OptionType, OrderDataItemValueType, ProcessingPipelinesApiClient, ProductBundleResourceType, ProductBundlesApiClient, ProductLinkResourceType, ProductLinksApiClient, ProductReferenceType, ProductReferencesApiClient, ProductSpecificationsApiClient, ProductVariantMockupType, ProductVariantResourceType, ProductsApiClient, ProjectItemProductType, ProjectItemResourceType, ProjectProcessingStatus, ProjectsApiClient, RenderHiResScenarioOutputColorSpace, RenderHiResScenarioOutputFlipMode, RenderHiResScenarioOutputFormat, RenderHiResScenarioOutputRotateMode, StorefrontModule, StorefrontType, StorefrontUsersApiClient, StorefrontsApiClient, SurfaceUsageType, TenantInfoApiClient, WorkflowType };
|
|
7655
|
+
export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, AppearanceDataType, BuildInfoApiClient, ConflictType, CreateApiClientConfiguration, DatePeriod, OptionType, OrderDataItemValueType, ProcessingPipelinesApiClient, ProductBundleResourceType, ProductBundlesApiClient, ProductLinkResourceType, ProductLinksApiClient, ProductReferenceType, ProductReferencesApiClient, ProductSpecificationsApiClient, ProductType, ProductVariantMockupType, ProductVariantResourceType, ProductsApiClient, ProjectItemProductType, ProjectItemResourceType, ProjectProcessingStatus, ProjectsApiClient, RenderHiResScenarioOutputColorSpace, RenderHiResScenarioOutputFlipMode, RenderHiResScenarioOutputFormat, RenderHiResScenarioOutputRotateMode, StorefrontModule, StorefrontType, StorefrontUsersApiClient, StorefrontsApiClient, SurfaceUsageType, TenantInfoApiClient, WorkflowType };
|
|
7204
7656
|
//# sourceMappingURL=aurigma-ng-storefront-api-client.js.map
|