@aurigma/ng-storefront-api-client 2.54.1 → 2.55.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/aurigma-ng-storefront-api-client.metadata.json +1 -1
- package/bundles/aurigma-ng-storefront-api-client.umd.js +302 -1026
- 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/lib/storefront-api-client.js +18 -651
- package/fesm2015/aurigma-ng-storefront-api-client.js +17 -650
- package/fesm2015/aurigma-ng-storefront-api-client.js.map +1 -1
- package/lib/storefront-api-client.d.ts +12 -186
- package/package.json +1 -1
|
@@ -849,97 +849,6 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
849
849
|
}
|
|
850
850
|
return of(null);
|
|
851
851
|
}
|
|
852
|
-
/**
|
|
853
|
-
* Creates a new storefront product reference.
|
|
854
|
-
* @param storefrontId Storefront identifier.
|
|
855
|
-
* @param tenantId (optional) Tenant identifier.
|
|
856
|
-
* @param body (optional) Create operation parameters.
|
|
857
|
-
* @return Success
|
|
858
|
-
*/
|
|
859
|
-
create(storefrontId, tenantId, body) {
|
|
860
|
-
let url_ = this.baseUrl + "/api/storefront/v1/product-references?";
|
|
861
|
-
if (storefrontId === undefined || storefrontId === null)
|
|
862
|
-
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
863
|
-
else
|
|
864
|
-
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
865
|
-
if (tenantId !== undefined && tenantId !== null)
|
|
866
|
-
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
867
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
868
|
-
const content_ = JSON.stringify(body);
|
|
869
|
-
let options_ = {
|
|
870
|
-
body: content_,
|
|
871
|
-
observe: "response",
|
|
872
|
-
responseType: "blob",
|
|
873
|
-
headers: new HttpHeaders({
|
|
874
|
-
"Content-Type": "application/json",
|
|
875
|
-
"Accept": "application/json"
|
|
876
|
-
})
|
|
877
|
-
};
|
|
878
|
-
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
879
|
-
return this.http.request("post", url_, transformedOptions_);
|
|
880
|
-
})).pipe(mergeMap((response_) => {
|
|
881
|
-
return this.transformResult(url_, response_, (r) => this.processCreate(r));
|
|
882
|
-
})).pipe(catchError((response_) => {
|
|
883
|
-
if (response_ instanceof HttpResponseBase) {
|
|
884
|
-
try {
|
|
885
|
-
return this.transformResult(url_, response_, (r) => this.processCreate(r));
|
|
886
|
-
}
|
|
887
|
-
catch (e) {
|
|
888
|
-
return throwError(e);
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
else
|
|
892
|
-
return throwError(response_);
|
|
893
|
-
}));
|
|
894
|
-
}
|
|
895
|
-
processCreate(response) {
|
|
896
|
-
const status = response.status;
|
|
897
|
-
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
898
|
-
response.error instanceof Blob ? response.error : undefined;
|
|
899
|
-
let _headers = {};
|
|
900
|
-
if (response.headers) {
|
|
901
|
-
for (let key of response.headers.keys()) {
|
|
902
|
-
_headers[key] = response.headers.get(key);
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
if (status === 201) {
|
|
906
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
907
|
-
let result201 = null;
|
|
908
|
-
result201 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
909
|
-
return of(result201);
|
|
910
|
-
}));
|
|
911
|
-
}
|
|
912
|
-
else if (status === 404) {
|
|
913
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
914
|
-
let result404 = null;
|
|
915
|
-
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
916
|
-
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
917
|
-
}));
|
|
918
|
-
}
|
|
919
|
-
else if (status === 409) {
|
|
920
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
921
|
-
let result409 = null;
|
|
922
|
-
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
923
|
-
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
924
|
-
}));
|
|
925
|
-
}
|
|
926
|
-
else if (status === 401) {
|
|
927
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
928
|
-
return throwException("Unauthorized", status, _responseText, _headers);
|
|
929
|
-
}));
|
|
930
|
-
}
|
|
931
|
-
else if (status === 403) {
|
|
932
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
933
|
-
return throwException("Forbidden", status, _responseText, _headers);
|
|
934
|
-
}));
|
|
935
|
-
}
|
|
936
|
-
else if (status !== 200 && status !== 204) {
|
|
937
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
938
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
939
|
-
}));
|
|
940
|
-
}
|
|
941
|
-
return of(null);
|
|
942
|
-
}
|
|
943
852
|
/**
|
|
944
853
|
* Returns a list of product specifications associated with storefront product references relevant to the specified query parameters.
|
|
945
854
|
* @param storefrontId Storefront identifier.
|
|
@@ -1373,97 +1282,6 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
1373
1282
|
}
|
|
1374
1283
|
return of(null);
|
|
1375
1284
|
}
|
|
1376
|
-
/**
|
|
1377
|
-
* Deletes the storefront product reference.
|
|
1378
|
-
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier.
|
|
1379
|
-
* @param storefrontId Storefront identifier.
|
|
1380
|
-
* @param tenantId (optional) Tenant identifier.
|
|
1381
|
-
* @return Success
|
|
1382
|
-
*/
|
|
1383
|
-
delete(reference, storefrontId, tenantId) {
|
|
1384
|
-
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}?";
|
|
1385
|
-
if (reference === undefined || reference === null)
|
|
1386
|
-
throw new Error("The parameter 'reference' must be defined.");
|
|
1387
|
-
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
1388
|
-
if (storefrontId === undefined || storefrontId === null)
|
|
1389
|
-
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
1390
|
-
else
|
|
1391
|
-
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1392
|
-
if (tenantId !== undefined && tenantId !== null)
|
|
1393
|
-
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1394
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1395
|
-
let options_ = {
|
|
1396
|
-
observe: "response",
|
|
1397
|
-
responseType: "blob",
|
|
1398
|
-
headers: new HttpHeaders({
|
|
1399
|
-
"Accept": "application/json"
|
|
1400
|
-
})
|
|
1401
|
-
};
|
|
1402
|
-
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1403
|
-
return this.http.request("delete", url_, transformedOptions_);
|
|
1404
|
-
})).pipe(mergeMap((response_) => {
|
|
1405
|
-
return this.transformResult(url_, response_, (r) => this.processDelete(r));
|
|
1406
|
-
})).pipe(catchError((response_) => {
|
|
1407
|
-
if (response_ instanceof HttpResponseBase) {
|
|
1408
|
-
try {
|
|
1409
|
-
return this.transformResult(url_, response_, (r) => this.processDelete(r));
|
|
1410
|
-
}
|
|
1411
|
-
catch (e) {
|
|
1412
|
-
return throwError(e);
|
|
1413
|
-
}
|
|
1414
|
-
}
|
|
1415
|
-
else
|
|
1416
|
-
return throwError(response_);
|
|
1417
|
-
}));
|
|
1418
|
-
}
|
|
1419
|
-
processDelete(response) {
|
|
1420
|
-
const status = response.status;
|
|
1421
|
-
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1422
|
-
response.error instanceof Blob ? response.error : undefined;
|
|
1423
|
-
let _headers = {};
|
|
1424
|
-
if (response.headers) {
|
|
1425
|
-
for (let key of response.headers.keys()) {
|
|
1426
|
-
_headers[key] = response.headers.get(key);
|
|
1427
|
-
}
|
|
1428
|
-
}
|
|
1429
|
-
if (status === 200) {
|
|
1430
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1431
|
-
let result200 = null;
|
|
1432
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1433
|
-
return of(result200);
|
|
1434
|
-
}));
|
|
1435
|
-
}
|
|
1436
|
-
else if (status === 404) {
|
|
1437
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1438
|
-
let result404 = null;
|
|
1439
|
-
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1440
|
-
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
1441
|
-
}));
|
|
1442
|
-
}
|
|
1443
|
-
else if (status === 409) {
|
|
1444
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1445
|
-
let result409 = null;
|
|
1446
|
-
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1447
|
-
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
1448
|
-
}));
|
|
1449
|
-
}
|
|
1450
|
-
else if (status === 401) {
|
|
1451
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1452
|
-
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1453
|
-
}));
|
|
1454
|
-
}
|
|
1455
|
-
else if (status === 403) {
|
|
1456
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1457
|
-
return throwException("Forbidden", status, _responseText, _headers);
|
|
1458
|
-
}));
|
|
1459
|
-
}
|
|
1460
|
-
else if (status !== 200 && status !== 204) {
|
|
1461
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1462
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1463
|
-
}));
|
|
1464
|
-
}
|
|
1465
|
-
return of(null);
|
|
1466
|
-
}
|
|
1467
1285
|
/**
|
|
1468
1286
|
* Returns a product specification by the storefront product reference.
|
|
1469
1287
|
* @param reference Product reference - external reference to Customer's Canvas product, e.g online store product identifier.
|
|
@@ -2032,98 +1850,6 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
2032
1850
|
}
|
|
2033
1851
|
return of(null);
|
|
2034
1852
|
}
|
|
2035
|
-
/**
|
|
2036
|
-
* Returns a product personalization workflow configuration by storefront product reference.
|
|
2037
|
-
* @param reference An external reference to Customer's Canvas product, e.g online store product identifier.
|
|
2038
|
-
* @param storefrontId Storefront identifier.
|
|
2039
|
-
* @param tenantId (optional) Tenant identifier.
|
|
2040
|
-
* @return Success
|
|
2041
|
-
* @deprecated
|
|
2042
|
-
*/
|
|
2043
|
-
getProductConfig(reference, storefrontId, tenantId) {
|
|
2044
|
-
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-config?";
|
|
2045
|
-
if (reference === undefined || reference === null)
|
|
2046
|
-
throw new Error("The parameter 'reference' must be defined.");
|
|
2047
|
-
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
2048
|
-
if (storefrontId === undefined || storefrontId === null)
|
|
2049
|
-
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
2050
|
-
else
|
|
2051
|
-
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
2052
|
-
if (tenantId !== undefined && tenantId !== null)
|
|
2053
|
-
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2054
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
2055
|
-
let options_ = {
|
|
2056
|
-
observe: "response",
|
|
2057
|
-
responseType: "blob",
|
|
2058
|
-
headers: new HttpHeaders({
|
|
2059
|
-
"Accept": "text/plain"
|
|
2060
|
-
})
|
|
2061
|
-
};
|
|
2062
|
-
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
2063
|
-
return this.http.request("get", url_, transformedOptions_);
|
|
2064
|
-
})).pipe(mergeMap((response_) => {
|
|
2065
|
-
return this.transformResult(url_, response_, (r) => this.processGetProductConfig(r));
|
|
2066
|
-
})).pipe(catchError((response_) => {
|
|
2067
|
-
if (response_ instanceof HttpResponseBase) {
|
|
2068
|
-
try {
|
|
2069
|
-
return this.transformResult(url_, response_, (r) => this.processGetProductConfig(r));
|
|
2070
|
-
}
|
|
2071
|
-
catch (e) {
|
|
2072
|
-
return throwError(e);
|
|
2073
|
-
}
|
|
2074
|
-
}
|
|
2075
|
-
else
|
|
2076
|
-
return throwError(response_);
|
|
2077
|
-
}));
|
|
2078
|
-
}
|
|
2079
|
-
processGetProductConfig(response) {
|
|
2080
|
-
const status = response.status;
|
|
2081
|
-
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2082
|
-
response.error instanceof Blob ? response.error : undefined;
|
|
2083
|
-
let _headers = {};
|
|
2084
|
-
if (response.headers) {
|
|
2085
|
-
for (let key of response.headers.keys()) {
|
|
2086
|
-
_headers[key] = response.headers.get(key);
|
|
2087
|
-
}
|
|
2088
|
-
}
|
|
2089
|
-
if (status === 200) {
|
|
2090
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2091
|
-
let result200 = null;
|
|
2092
|
-
result200 = _responseText === "" ? null : _responseText;
|
|
2093
|
-
return of(result200);
|
|
2094
|
-
}));
|
|
2095
|
-
}
|
|
2096
|
-
else if (status === 404) {
|
|
2097
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2098
|
-
let result404 = null;
|
|
2099
|
-
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2100
|
-
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2101
|
-
}));
|
|
2102
|
-
}
|
|
2103
|
-
else if (status === 409) {
|
|
2104
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2105
|
-
let result409 = null;
|
|
2106
|
-
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2107
|
-
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2108
|
-
}));
|
|
2109
|
-
}
|
|
2110
|
-
else if (status === 401) {
|
|
2111
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2112
|
-
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2113
|
-
}));
|
|
2114
|
-
}
|
|
2115
|
-
else if (status === 403) {
|
|
2116
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2117
|
-
return throwException("Forbidden", status, _responseText, _headers);
|
|
2118
|
-
}));
|
|
2119
|
-
}
|
|
2120
|
-
else if (status !== 200 && status !== 204) {
|
|
2121
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2122
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2123
|
-
}));
|
|
2124
|
-
}
|
|
2125
|
-
return of(null);
|
|
2126
|
-
}
|
|
2127
1853
|
}
|
|
2128
1854
|
ProductReferencesApiClient.ɵprov = ɵɵdefineInjectable({ factory: function ProductReferencesApiClient_Factory() { return new ProductReferencesApiClient(ɵɵinject(ApiClientConfiguration), ɵɵinject(HttpClient), ɵɵinject(API_BASE_URL, 8)); }, token: ProductReferencesApiClient, providedIn: "root" });
|
|
2129
1855
|
ProductReferencesApiClient.decorators = [
|
|
@@ -3258,105 +2984,18 @@ class ProductsApiClient extends ApiClientBase {
|
|
|
3258
2984
|
let options_ = {
|
|
3259
2985
|
observe: "response",
|
|
3260
2986
|
responseType: "blob",
|
|
3261
|
-
headers: new HttpHeaders({
|
|
3262
|
-
"Accept": "application/json"
|
|
3263
|
-
})
|
|
3264
|
-
};
|
|
3265
|
-
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
3266
|
-
return this.http.request("get", url_, transformedOptions_);
|
|
3267
|
-
})).pipe(mergeMap((response_) => {
|
|
3268
|
-
return this.transformResult(url_, response_, (r) => this.processGetProductVariantDocuments(r));
|
|
3269
|
-
})).pipe(catchError((response_) => {
|
|
3270
|
-
if (response_ instanceof HttpResponseBase) {
|
|
3271
|
-
try {
|
|
3272
|
-
return this.transformResult(url_, response_, (r) => this.processGetProductVariantDocuments(r));
|
|
3273
|
-
}
|
|
3274
|
-
catch (e) {
|
|
3275
|
-
return throwError(e);
|
|
3276
|
-
}
|
|
3277
|
-
}
|
|
3278
|
-
else
|
|
3279
|
-
return throwError(response_);
|
|
3280
|
-
}));
|
|
3281
|
-
}
|
|
3282
|
-
processGetProductVariantDocuments(response) {
|
|
3283
|
-
const status = response.status;
|
|
3284
|
-
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
3285
|
-
response.error instanceof Blob ? response.error : undefined;
|
|
3286
|
-
let _headers = {};
|
|
3287
|
-
if (response.headers) {
|
|
3288
|
-
for (let key of response.headers.keys()) {
|
|
3289
|
-
_headers[key] = response.headers.get(key);
|
|
3290
|
-
}
|
|
3291
|
-
}
|
|
3292
|
-
if (status === 200) {
|
|
3293
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3294
|
-
let result200 = null;
|
|
3295
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3296
|
-
return of(result200);
|
|
3297
|
-
}));
|
|
3298
|
-
}
|
|
3299
|
-
else if (status === 404) {
|
|
3300
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3301
|
-
let result404 = null;
|
|
3302
|
-
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3303
|
-
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3304
|
-
}));
|
|
3305
|
-
}
|
|
3306
|
-
else if (status === 409) {
|
|
3307
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3308
|
-
let result409 = null;
|
|
3309
|
-
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3310
|
-
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3311
|
-
}));
|
|
3312
|
-
}
|
|
3313
|
-
else if (status === 401) {
|
|
3314
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3315
|
-
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3316
|
-
}));
|
|
3317
|
-
}
|
|
3318
|
-
else if (status === 403) {
|
|
3319
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3320
|
-
return throwException("Forbidden", status, _responseText, _headers);
|
|
3321
|
-
}));
|
|
3322
|
-
}
|
|
3323
|
-
else if (status !== 200 && status !== 204) {
|
|
3324
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3325
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3326
|
-
}));
|
|
3327
|
-
}
|
|
3328
|
-
return of(null);
|
|
3329
|
-
}
|
|
3330
|
-
/**
|
|
3331
|
-
* Updates product variant resources.
|
|
3332
|
-
* @param id Product identifier.
|
|
3333
|
-
* @param productVersionId (optional) Product version identifier.
|
|
3334
|
-
* @param tenantId (optional) Tenant identifier.
|
|
3335
|
-
* @return Success
|
|
3336
|
-
*/
|
|
3337
|
-
updateProductVariantResources(id, productVersionId, tenantId) {
|
|
3338
|
-
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/update-variant-resources?";
|
|
3339
|
-
if (id === undefined || id === null)
|
|
3340
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
3341
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3342
|
-
if (productVersionId !== undefined && productVersionId !== null)
|
|
3343
|
-
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
3344
|
-
if (tenantId !== undefined && tenantId !== null)
|
|
3345
|
-
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3346
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
3347
|
-
let options_ = {
|
|
3348
|
-
observe: "response",
|
|
3349
|
-
responseType: "blob",
|
|
3350
|
-
headers: new HttpHeaders({})
|
|
2987
|
+
headers: new HttpHeaders({
|
|
2988
|
+
"Accept": "application/json"
|
|
2989
|
+
})
|
|
3351
2990
|
};
|
|
3352
2991
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
3353
|
-
return this.http.request("
|
|
2992
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
3354
2993
|
})).pipe(mergeMap((response_) => {
|
|
3355
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
2994
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductVariantDocuments(r));
|
|
3356
2995
|
})).pipe(catchError((response_) => {
|
|
3357
2996
|
if (response_ instanceof HttpResponseBase) {
|
|
3358
2997
|
try {
|
|
3359
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
2998
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductVariantDocuments(r));
|
|
3360
2999
|
}
|
|
3361
3000
|
catch (e) {
|
|
3362
3001
|
return throwError(e);
|
|
@@ -3366,7 +3005,7 @@ class ProductsApiClient extends ApiClientBase {
|
|
|
3366
3005
|
return throwError(response_);
|
|
3367
3006
|
}));
|
|
3368
3007
|
}
|
|
3369
|
-
|
|
3008
|
+
processGetProductVariantDocuments(response) {
|
|
3370
3009
|
const status = response.status;
|
|
3371
3010
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
3372
3011
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -3378,7 +3017,9 @@ class ProductsApiClient extends ApiClientBase {
|
|
|
3378
3017
|
}
|
|
3379
3018
|
if (status === 200) {
|
|
3380
3019
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3381
|
-
|
|
3020
|
+
let result200 = null;
|
|
3021
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3022
|
+
return of(result200);
|
|
3382
3023
|
}));
|
|
3383
3024
|
}
|
|
3384
3025
|
else if (status === 404) {
|
|
@@ -3413,15 +3054,14 @@ class ProductsApiClient extends ApiClientBase {
|
|
|
3413
3054
|
return of(null);
|
|
3414
3055
|
}
|
|
3415
3056
|
/**
|
|
3416
|
-
*
|
|
3057
|
+
* Updates product variant resources.
|
|
3417
3058
|
* @param id Product identifier.
|
|
3418
3059
|
* @param productVersionId (optional) Product version identifier.
|
|
3419
3060
|
* @param tenantId (optional) Tenant identifier.
|
|
3420
|
-
* @param body (optional) Set product variant price operation parameters.
|
|
3421
3061
|
* @return Success
|
|
3422
3062
|
*/
|
|
3423
|
-
|
|
3424
|
-
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/
|
|
3063
|
+
updateProductVariantResources(id, productVersionId, tenantId) {
|
|
3064
|
+
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/update-variant-resources?";
|
|
3425
3065
|
if (id === undefined || id === null)
|
|
3426
3066
|
throw new Error("The parameter 'id' must be defined.");
|
|
3427
3067
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
@@ -3430,23 +3070,19 @@ class ProductsApiClient extends ApiClientBase {
|
|
|
3430
3070
|
if (tenantId !== undefined && tenantId !== null)
|
|
3431
3071
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3432
3072
|
url_ = url_.replace(/[?&]$/, "");
|
|
3433
|
-
const content_ = JSON.stringify(body);
|
|
3434
3073
|
let options_ = {
|
|
3435
|
-
body: content_,
|
|
3436
3074
|
observe: "response",
|
|
3437
3075
|
responseType: "blob",
|
|
3438
|
-
headers: new HttpHeaders({
|
|
3439
|
-
"Content-Type": "application/json",
|
|
3440
|
-
})
|
|
3076
|
+
headers: new HttpHeaders({})
|
|
3441
3077
|
};
|
|
3442
3078
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
3443
3079
|
return this.http.request("post", url_, transformedOptions_);
|
|
3444
3080
|
})).pipe(mergeMap((response_) => {
|
|
3445
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
3081
|
+
return this.transformResult(url_, response_, (r) => this.processUpdateProductVariantResources(r));
|
|
3446
3082
|
})).pipe(catchError((response_) => {
|
|
3447
3083
|
if (response_ instanceof HttpResponseBase) {
|
|
3448
3084
|
try {
|
|
3449
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
3085
|
+
return this.transformResult(url_, response_, (r) => this.processUpdateProductVariantResources(r));
|
|
3450
3086
|
}
|
|
3451
3087
|
catch (e) {
|
|
3452
3088
|
return throwError(e);
|
|
@@ -3456,7 +3092,7 @@ class ProductsApiClient extends ApiClientBase {
|
|
|
3456
3092
|
return throwError(response_);
|
|
3457
3093
|
}));
|
|
3458
3094
|
}
|
|
3459
|
-
|
|
3095
|
+
processUpdateProductVariantResources(response) {
|
|
3460
3096
|
const status = response.status;
|
|
3461
3097
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
3462
3098
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -3925,86 +3561,6 @@ class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
3925
3561
|
}
|
|
3926
3562
|
return of(null);
|
|
3927
3563
|
}
|
|
3928
|
-
/**
|
|
3929
|
-
* Returns a product personalization workflow configuration by product specification identifier.
|
|
3930
|
-
* @param id Product specification identifier.
|
|
3931
|
-
* @param tenantId (optional) Tenant identifier.
|
|
3932
|
-
* @return Success
|
|
3933
|
-
* @deprecated
|
|
3934
|
-
*/
|
|
3935
|
-
getConfiguration(id, tenantId) {
|
|
3936
|
-
let url_ = this.baseUrl + "/api/storefront/v1/product-specifications/{id}/config?";
|
|
3937
|
-
if (id === undefined || id === null)
|
|
3938
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
3939
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3940
|
-
if (tenantId !== undefined && tenantId !== null)
|
|
3941
|
-
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3942
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
3943
|
-
let options_ = {
|
|
3944
|
-
observe: "response",
|
|
3945
|
-
responseType: "blob",
|
|
3946
|
-
headers: new HttpHeaders({
|
|
3947
|
-
"Accept": "text/plain"
|
|
3948
|
-
})
|
|
3949
|
-
};
|
|
3950
|
-
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
3951
|
-
return this.http.request("get", url_, transformedOptions_);
|
|
3952
|
-
})).pipe(mergeMap((response_) => {
|
|
3953
|
-
return this.transformResult(url_, response_, (r) => this.processGetConfiguration(r));
|
|
3954
|
-
})).pipe(catchError((response_) => {
|
|
3955
|
-
if (response_ instanceof HttpResponseBase) {
|
|
3956
|
-
try {
|
|
3957
|
-
return this.transformResult(url_, response_, (r) => this.processGetConfiguration(r));
|
|
3958
|
-
}
|
|
3959
|
-
catch (e) {
|
|
3960
|
-
return throwError(e);
|
|
3961
|
-
}
|
|
3962
|
-
}
|
|
3963
|
-
else
|
|
3964
|
-
return throwError(response_);
|
|
3965
|
-
}));
|
|
3966
|
-
}
|
|
3967
|
-
processGetConfiguration(response) {
|
|
3968
|
-
const status = response.status;
|
|
3969
|
-
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
3970
|
-
response.error instanceof Blob ? response.error : undefined;
|
|
3971
|
-
let _headers = {};
|
|
3972
|
-
if (response.headers) {
|
|
3973
|
-
for (let key of response.headers.keys()) {
|
|
3974
|
-
_headers[key] = response.headers.get(key);
|
|
3975
|
-
}
|
|
3976
|
-
}
|
|
3977
|
-
if (status === 200) {
|
|
3978
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3979
|
-
let result200 = null;
|
|
3980
|
-
result200 = _responseText === "" ? null : _responseText;
|
|
3981
|
-
return of(result200);
|
|
3982
|
-
}));
|
|
3983
|
-
}
|
|
3984
|
-
else if (status === 404) {
|
|
3985
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3986
|
-
let result404 = null;
|
|
3987
|
-
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3988
|
-
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3989
|
-
}));
|
|
3990
|
-
}
|
|
3991
|
-
else if (status === 401) {
|
|
3992
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3993
|
-
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3994
|
-
}));
|
|
3995
|
-
}
|
|
3996
|
-
else if (status === 403) {
|
|
3997
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3998
|
-
return throwException("Forbidden", status, _responseText, _headers);
|
|
3999
|
-
}));
|
|
4000
|
-
}
|
|
4001
|
-
else if (status !== 200 && status !== 204) {
|
|
4002
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
4003
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4004
|
-
}));
|
|
4005
|
-
}
|
|
4006
|
-
return of(null);
|
|
4007
|
-
}
|
|
4008
3564
|
}
|
|
4009
3565
|
ProductSpecificationsApiClient.ɵprov = ɵɵdefineInjectable({ factory: function ProductSpecificationsApiClient_Factory() { return new ProductSpecificationsApiClient(ɵɵinject(ApiClientConfiguration), ɵɵinject(HttpClient), ɵɵinject(API_BASE_URL, 8)); }, token: ProductSpecificationsApiClient, providedIn: "root" });
|
|
4010
3566
|
ProductSpecificationsApiClient.decorators = [
|
|
@@ -5331,195 +4887,6 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
5331
4887
|
}
|
|
5332
4888
|
return of(null);
|
|
5333
4889
|
}
|
|
5334
|
-
/**
|
|
5335
|
-
* Returns an url to download project print file.
|
|
5336
|
-
* @param id Project identifier.
|
|
5337
|
-
* @param designUserId Design owner identifier.
|
|
5338
|
-
* @param designId Design identifier.
|
|
5339
|
-
* @param tenantId (optional) Tenant identifier.
|
|
5340
|
-
* @return Success
|
|
5341
|
-
* @deprecated
|
|
5342
|
-
*/
|
|
5343
|
-
getProjectPdfUrl(id, designUserId, designId, tenantId) {
|
|
5344
|
-
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/project-pdf?";
|
|
5345
|
-
if (id === undefined || id === null)
|
|
5346
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
5347
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
5348
|
-
if (designUserId === undefined || designUserId === null)
|
|
5349
|
-
throw new Error("The parameter 'designUserId' must be defined and cannot be null.");
|
|
5350
|
-
else
|
|
5351
|
-
url_ += "designUserId=" + encodeURIComponent("" + designUserId) + "&";
|
|
5352
|
-
if (designId === undefined || designId === null)
|
|
5353
|
-
throw new Error("The parameter 'designId' must be defined and cannot be null.");
|
|
5354
|
-
else
|
|
5355
|
-
url_ += "designId=" + encodeURIComponent("" + designId) + "&";
|
|
5356
|
-
if (tenantId !== undefined && tenantId !== null)
|
|
5357
|
-
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
5358
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
5359
|
-
let options_ = {
|
|
5360
|
-
observe: "response",
|
|
5361
|
-
responseType: "blob",
|
|
5362
|
-
headers: new HttpHeaders({
|
|
5363
|
-
"Accept": "application/json"
|
|
5364
|
-
})
|
|
5365
|
-
};
|
|
5366
|
-
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
5367
|
-
return this.http.request("get", url_, transformedOptions_);
|
|
5368
|
-
})).pipe(mergeMap((response_) => {
|
|
5369
|
-
return this.transformResult(url_, response_, (r) => this.processGetProjectPdfUrl(r));
|
|
5370
|
-
})).pipe(catchError((response_) => {
|
|
5371
|
-
if (response_ instanceof HttpResponseBase) {
|
|
5372
|
-
try {
|
|
5373
|
-
return this.transformResult(url_, response_, (r) => this.processGetProjectPdfUrl(r));
|
|
5374
|
-
}
|
|
5375
|
-
catch (e) {
|
|
5376
|
-
return throwError(e);
|
|
5377
|
-
}
|
|
5378
|
-
}
|
|
5379
|
-
else
|
|
5380
|
-
return throwError(response_);
|
|
5381
|
-
}));
|
|
5382
|
-
}
|
|
5383
|
-
processGetProjectPdfUrl(response) {
|
|
5384
|
-
const status = response.status;
|
|
5385
|
-
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
5386
|
-
response.error instanceof Blob ? response.error : undefined;
|
|
5387
|
-
let _headers = {};
|
|
5388
|
-
if (response.headers) {
|
|
5389
|
-
for (let key of response.headers.keys()) {
|
|
5390
|
-
_headers[key] = response.headers.get(key);
|
|
5391
|
-
}
|
|
5392
|
-
}
|
|
5393
|
-
if (status === 200) {
|
|
5394
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
5395
|
-
let result200 = null;
|
|
5396
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
5397
|
-
return of(result200);
|
|
5398
|
-
}));
|
|
5399
|
-
}
|
|
5400
|
-
else if (status === 409) {
|
|
5401
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
5402
|
-
let result409 = null;
|
|
5403
|
-
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
5404
|
-
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
5405
|
-
}));
|
|
5406
|
-
}
|
|
5407
|
-
else if (status === 401) {
|
|
5408
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
5409
|
-
return throwException("Unauthorized", status, _responseText, _headers);
|
|
5410
|
-
}));
|
|
5411
|
-
}
|
|
5412
|
-
else if (status === 403) {
|
|
5413
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
5414
|
-
return throwException("Forbidden", status, _responseText, _headers);
|
|
5415
|
-
}));
|
|
5416
|
-
}
|
|
5417
|
-
else if (status !== 200 && status !== 204) {
|
|
5418
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
5419
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5420
|
-
}));
|
|
5421
|
-
}
|
|
5422
|
-
return of(null);
|
|
5423
|
-
}
|
|
5424
|
-
/**
|
|
5425
|
-
* Returns an archive file, which contains all project print files.
|
|
5426
|
-
* @param id Project identifier.
|
|
5427
|
-
* @param designUserId Design owner identifier.
|
|
5428
|
-
* @param designId Design identifier.
|
|
5429
|
-
* @param attachment (optional) If set to 'true', the requested file will be provided as an attachment with proper filename supplied (default value is 'false').
|
|
5430
|
-
* @param tenantId (optional) Tenant identifier.
|
|
5431
|
-
* @return Success
|
|
5432
|
-
* @deprecated
|
|
5433
|
-
*/
|
|
5434
|
-
getProjectPdfZip(id, designUserId, designId, attachment, tenantId) {
|
|
5435
|
-
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/project-pdf-zip?";
|
|
5436
|
-
if (id === undefined || id === null)
|
|
5437
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
5438
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
5439
|
-
if (designUserId === undefined || designUserId === null)
|
|
5440
|
-
throw new Error("The parameter 'designUserId' must be defined and cannot be null.");
|
|
5441
|
-
else
|
|
5442
|
-
url_ += "designUserId=" + encodeURIComponent("" + designUserId) + "&";
|
|
5443
|
-
if (designId === undefined || designId === null)
|
|
5444
|
-
throw new Error("The parameter 'designId' must be defined and cannot be null.");
|
|
5445
|
-
else
|
|
5446
|
-
url_ += "designId=" + encodeURIComponent("" + designId) + "&";
|
|
5447
|
-
if (attachment !== undefined && attachment !== null)
|
|
5448
|
-
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
5449
|
-
if (tenantId !== undefined && tenantId !== null)
|
|
5450
|
-
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
5451
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
5452
|
-
let options_ = {
|
|
5453
|
-
observe: "response",
|
|
5454
|
-
responseType: "blob",
|
|
5455
|
-
headers: new HttpHeaders({
|
|
5456
|
-
"Accept": "application/octet-stream"
|
|
5457
|
-
})
|
|
5458
|
-
};
|
|
5459
|
-
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
5460
|
-
return this.http.request("get", url_, transformedOptions_);
|
|
5461
|
-
})).pipe(mergeMap((response_) => {
|
|
5462
|
-
return this.transformResult(url_, response_, (r) => this.processGetProjectPdfZip(r));
|
|
5463
|
-
})).pipe(catchError((response_) => {
|
|
5464
|
-
if (response_ instanceof HttpResponseBase) {
|
|
5465
|
-
try {
|
|
5466
|
-
return this.transformResult(url_, response_, (r) => this.processGetProjectPdfZip(r));
|
|
5467
|
-
}
|
|
5468
|
-
catch (e) {
|
|
5469
|
-
return throwError(e);
|
|
5470
|
-
}
|
|
5471
|
-
}
|
|
5472
|
-
else
|
|
5473
|
-
return throwError(response_);
|
|
5474
|
-
}));
|
|
5475
|
-
}
|
|
5476
|
-
processGetProjectPdfZip(response) {
|
|
5477
|
-
const status = response.status;
|
|
5478
|
-
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
5479
|
-
response.error instanceof Blob ? response.error : undefined;
|
|
5480
|
-
let _headers = {};
|
|
5481
|
-
if (response.headers) {
|
|
5482
|
-
for (let key of response.headers.keys()) {
|
|
5483
|
-
_headers[key] = response.headers.get(key);
|
|
5484
|
-
}
|
|
5485
|
-
}
|
|
5486
|
-
if (status === 200 || status === 206) {
|
|
5487
|
-
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
5488
|
-
const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
5489
|
-
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
5490
|
-
return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
5491
|
-
}
|
|
5492
|
-
else if (status === 404) {
|
|
5493
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
5494
|
-
let result404 = null;
|
|
5495
|
-
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
5496
|
-
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
5497
|
-
}));
|
|
5498
|
-
}
|
|
5499
|
-
else if (status === 409) {
|
|
5500
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
5501
|
-
let result409 = null;
|
|
5502
|
-
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
5503
|
-
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
5504
|
-
}));
|
|
5505
|
-
}
|
|
5506
|
-
else if (status === 401) {
|
|
5507
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
5508
|
-
return throwException("Unauthorized", status, _responseText, _headers);
|
|
5509
|
-
}));
|
|
5510
|
-
}
|
|
5511
|
-
else if (status === 403) {
|
|
5512
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
5513
|
-
return throwException("Forbidden", status, _responseText, _headers);
|
|
5514
|
-
}));
|
|
5515
|
-
}
|
|
5516
|
-
else if (status !== 200 && status !== 204) {
|
|
5517
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
5518
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5519
|
-
}));
|
|
5520
|
-
}
|
|
5521
|
-
return of(null);
|
|
5522
|
-
}
|
|
5523
4890
|
/**
|
|
5524
4891
|
* Returns a project processing results.
|
|
5525
4892
|
* @param id Project identifier.
|