@aurigma/axios-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/dist/cjs/storefront-api-client.d.ts +133 -10
- package/dist/cjs/storefront-api-client.js +434 -12
- package/dist/cjs/storefront-api-client.js.map +1 -1
- package/dist/esm/storefront-api-client.d.ts +133 -10
- package/dist/esm/storefront-api-client.js +433 -11
- package/dist/esm/storefront-api-client.js.map +1 -1
- package/package.json +1 -1
|
@@ -478,6 +478,89 @@ export class ProductBundlesApiClient extends ApiClientBase {
|
|
|
478
478
|
}
|
|
479
479
|
return Promise.resolve(null);
|
|
480
480
|
}
|
|
481
|
+
/**
|
|
482
|
+
* Returns a product bundle personalization parameters by product identifier.
|
|
483
|
+
* @param id Product bundle identifier.
|
|
484
|
+
* @param productBundleVersionId (optional) Product bundle version identifier.
|
|
485
|
+
* @param tenantId (optional) Tenant identifier.
|
|
486
|
+
* @return Success
|
|
487
|
+
*/
|
|
488
|
+
getProductBundlePersonalizationParameters(id, productBundleVersionId, tenantId, cancelToken) {
|
|
489
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-bundles/{id}/personalization-parameters?";
|
|
490
|
+
if (id === undefined || id === null)
|
|
491
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
492
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
493
|
+
if (productBundleVersionId !== undefined && productBundleVersionId !== null)
|
|
494
|
+
url_ += "productBundleVersionId=" + encodeURIComponent("" + productBundleVersionId) + "&";
|
|
495
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
496
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
497
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
498
|
+
let options_ = {
|
|
499
|
+
method: "GET",
|
|
500
|
+
url: url_,
|
|
501
|
+
headers: {
|
|
502
|
+
"Accept": "application/json"
|
|
503
|
+
},
|
|
504
|
+
cancelToken
|
|
505
|
+
};
|
|
506
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
507
|
+
return this.instance.request(transformedOptions_);
|
|
508
|
+
}).catch((_error) => {
|
|
509
|
+
if (isAxiosError(_error) && _error.response) {
|
|
510
|
+
return _error.response;
|
|
511
|
+
}
|
|
512
|
+
else {
|
|
513
|
+
throw _error;
|
|
514
|
+
}
|
|
515
|
+
}).then((_response) => {
|
|
516
|
+
return this.transformResult(url_, _response, (_response) => this.processGetProductBundlePersonalizationParameters(_response));
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
processGetProductBundlePersonalizationParameters(response) {
|
|
520
|
+
const status = response.status;
|
|
521
|
+
let _headers = {};
|
|
522
|
+
if (response.headers && typeof response.headers === "object") {
|
|
523
|
+
for (let k in response.headers) {
|
|
524
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
525
|
+
_headers[k] = response.headers[k];
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
if (status === 200) {
|
|
530
|
+
const _responseText = response.data;
|
|
531
|
+
let result200 = null;
|
|
532
|
+
let resultData200 = _responseText;
|
|
533
|
+
result200 = JSON.parse(resultData200);
|
|
534
|
+
return Promise.resolve(result200);
|
|
535
|
+
}
|
|
536
|
+
else if (status === 404) {
|
|
537
|
+
const _responseText = response.data;
|
|
538
|
+
let result404 = null;
|
|
539
|
+
let resultData404 = _responseText;
|
|
540
|
+
result404 = JSON.parse(resultData404);
|
|
541
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
542
|
+
}
|
|
543
|
+
else if (status === 409) {
|
|
544
|
+
const _responseText = response.data;
|
|
545
|
+
let result409 = null;
|
|
546
|
+
let resultData409 = _responseText;
|
|
547
|
+
result409 = JSON.parse(resultData409);
|
|
548
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
549
|
+
}
|
|
550
|
+
else if (status === 401) {
|
|
551
|
+
const _responseText = response.data;
|
|
552
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
553
|
+
}
|
|
554
|
+
else if (status === 403) {
|
|
555
|
+
const _responseText = response.data;
|
|
556
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
557
|
+
}
|
|
558
|
+
else if (status !== 200 && status !== 204) {
|
|
559
|
+
const _responseText = response.data;
|
|
560
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
561
|
+
}
|
|
562
|
+
return Promise.resolve(null);
|
|
563
|
+
}
|
|
481
564
|
/**
|
|
482
565
|
* Returns a product bundle summary by product bundle identifier.
|
|
483
566
|
* @param id Product bundle identifier.
|
|
@@ -820,6 +903,89 @@ export class ProductLinksApiClient extends ApiClientBase {
|
|
|
820
903
|
}
|
|
821
904
|
return Promise.resolve(null);
|
|
822
905
|
}
|
|
906
|
+
/**
|
|
907
|
+
* Returns a product link personalization parameters by product identifier.
|
|
908
|
+
* @param id Product link identifier.
|
|
909
|
+
* @param productLinkVersionId (optional) Product link version identifier.
|
|
910
|
+
* @param tenantId (optional) Tenant identifier.
|
|
911
|
+
* @return Success
|
|
912
|
+
*/
|
|
913
|
+
getProductLinkPersonalizationParameters(id, productLinkVersionId, tenantId, cancelToken) {
|
|
914
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-links/{id}/personalization-parameters?";
|
|
915
|
+
if (id === undefined || id === null)
|
|
916
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
917
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
918
|
+
if (productLinkVersionId !== undefined && productLinkVersionId !== null)
|
|
919
|
+
url_ += "productLinkVersionId=" + encodeURIComponent("" + productLinkVersionId) + "&";
|
|
920
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
921
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
922
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
923
|
+
let options_ = {
|
|
924
|
+
method: "GET",
|
|
925
|
+
url: url_,
|
|
926
|
+
headers: {
|
|
927
|
+
"Accept": "application/json"
|
|
928
|
+
},
|
|
929
|
+
cancelToken
|
|
930
|
+
};
|
|
931
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
932
|
+
return this.instance.request(transformedOptions_);
|
|
933
|
+
}).catch((_error) => {
|
|
934
|
+
if (isAxiosError(_error) && _error.response) {
|
|
935
|
+
return _error.response;
|
|
936
|
+
}
|
|
937
|
+
else {
|
|
938
|
+
throw _error;
|
|
939
|
+
}
|
|
940
|
+
}).then((_response) => {
|
|
941
|
+
return this.transformResult(url_, _response, (_response) => this.processGetProductLinkPersonalizationParameters(_response));
|
|
942
|
+
});
|
|
943
|
+
}
|
|
944
|
+
processGetProductLinkPersonalizationParameters(response) {
|
|
945
|
+
const status = response.status;
|
|
946
|
+
let _headers = {};
|
|
947
|
+
if (response.headers && typeof response.headers === "object") {
|
|
948
|
+
for (let k in response.headers) {
|
|
949
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
950
|
+
_headers[k] = response.headers[k];
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
if (status === 200) {
|
|
955
|
+
const _responseText = response.data;
|
|
956
|
+
let result200 = null;
|
|
957
|
+
let resultData200 = _responseText;
|
|
958
|
+
result200 = JSON.parse(resultData200);
|
|
959
|
+
return Promise.resolve(result200);
|
|
960
|
+
}
|
|
961
|
+
else if (status === 404) {
|
|
962
|
+
const _responseText = response.data;
|
|
963
|
+
let result404 = null;
|
|
964
|
+
let resultData404 = _responseText;
|
|
965
|
+
result404 = JSON.parse(resultData404);
|
|
966
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
967
|
+
}
|
|
968
|
+
else if (status === 409) {
|
|
969
|
+
const _responseText = response.data;
|
|
970
|
+
let result409 = null;
|
|
971
|
+
let resultData409 = _responseText;
|
|
972
|
+
result409 = JSON.parse(resultData409);
|
|
973
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
974
|
+
}
|
|
975
|
+
else if (status === 401) {
|
|
976
|
+
const _responseText = response.data;
|
|
977
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
978
|
+
}
|
|
979
|
+
else if (status === 403) {
|
|
980
|
+
const _responseText = response.data;
|
|
981
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
982
|
+
}
|
|
983
|
+
else if (status !== 200 && status !== 204) {
|
|
984
|
+
const _responseText = response.data;
|
|
985
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
986
|
+
}
|
|
987
|
+
return Promise.resolve(null);
|
|
988
|
+
}
|
|
823
989
|
/**
|
|
824
990
|
* Returns a product link summary by product link identifier.
|
|
825
991
|
* @param id Product link identifier.
|
|
@@ -1651,6 +1817,91 @@ export class ProductReferencesApiClient extends ApiClientBase {
|
|
|
1651
1817
|
}
|
|
1652
1818
|
return Promise.resolve(null);
|
|
1653
1819
|
}
|
|
1820
|
+
/**
|
|
1821
|
+
* Returns a personalization parameters by the storefront product reference.
|
|
1822
|
+
* @param reference Product reference - external reference to Customer's Canvas product, e.g online store product identifier.
|
|
1823
|
+
* @param storefrontId Storefront identifier.
|
|
1824
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1825
|
+
* @return Success
|
|
1826
|
+
*/
|
|
1827
|
+
getPersonalizationParameters(reference, storefrontId, tenantId, cancelToken) {
|
|
1828
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/personalization-parameters?";
|
|
1829
|
+
if (reference === undefined || reference === null)
|
|
1830
|
+
throw new Error("The parameter 'reference' must be defined.");
|
|
1831
|
+
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
1832
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
1833
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
1834
|
+
else
|
|
1835
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1836
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1837
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1838
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1839
|
+
let options_ = {
|
|
1840
|
+
method: "GET",
|
|
1841
|
+
url: url_,
|
|
1842
|
+
headers: {
|
|
1843
|
+
"Accept": "application/json"
|
|
1844
|
+
},
|
|
1845
|
+
cancelToken
|
|
1846
|
+
};
|
|
1847
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
1848
|
+
return this.instance.request(transformedOptions_);
|
|
1849
|
+
}).catch((_error) => {
|
|
1850
|
+
if (isAxiosError(_error) && _error.response) {
|
|
1851
|
+
return _error.response;
|
|
1852
|
+
}
|
|
1853
|
+
else {
|
|
1854
|
+
throw _error;
|
|
1855
|
+
}
|
|
1856
|
+
}).then((_response) => {
|
|
1857
|
+
return this.transformResult(url_, _response, (_response) => this.processGetPersonalizationParameters(_response));
|
|
1858
|
+
});
|
|
1859
|
+
}
|
|
1860
|
+
processGetPersonalizationParameters(response) {
|
|
1861
|
+
const status = response.status;
|
|
1862
|
+
let _headers = {};
|
|
1863
|
+
if (response.headers && typeof response.headers === "object") {
|
|
1864
|
+
for (let k in response.headers) {
|
|
1865
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
1866
|
+
_headers[k] = response.headers[k];
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
if (status === 200) {
|
|
1871
|
+
const _responseText = response.data;
|
|
1872
|
+
let result200 = null;
|
|
1873
|
+
let resultData200 = _responseText;
|
|
1874
|
+
result200 = JSON.parse(resultData200);
|
|
1875
|
+
return Promise.resolve(result200);
|
|
1876
|
+
}
|
|
1877
|
+
else if (status === 404) {
|
|
1878
|
+
const _responseText = response.data;
|
|
1879
|
+
let result404 = null;
|
|
1880
|
+
let resultData404 = _responseText;
|
|
1881
|
+
result404 = JSON.parse(resultData404);
|
|
1882
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
1883
|
+
}
|
|
1884
|
+
else if (status === 409) {
|
|
1885
|
+
const _responseText = response.data;
|
|
1886
|
+
let result409 = null;
|
|
1887
|
+
let resultData409 = _responseText;
|
|
1888
|
+
result409 = JSON.parse(resultData409);
|
|
1889
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
1890
|
+
}
|
|
1891
|
+
else if (status === 401) {
|
|
1892
|
+
const _responseText = response.data;
|
|
1893
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1894
|
+
}
|
|
1895
|
+
else if (status === 403) {
|
|
1896
|
+
const _responseText = response.data;
|
|
1897
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1898
|
+
}
|
|
1899
|
+
else if (status !== 200 && status !== 204) {
|
|
1900
|
+
const _responseText = response.data;
|
|
1901
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1902
|
+
}
|
|
1903
|
+
return Promise.resolve(null);
|
|
1904
|
+
}
|
|
1654
1905
|
/**
|
|
1655
1906
|
* Returns a product specification by the storefront product reference.
|
|
1656
1907
|
* @param reference Product reference - external reference to Customer's Canvas product, e.g online store product identifier.
|
|
@@ -2444,6 +2695,89 @@ export class ProductsApiClient extends ApiClientBase {
|
|
|
2444
2695
|
}
|
|
2445
2696
|
return Promise.resolve(null);
|
|
2446
2697
|
}
|
|
2698
|
+
/**
|
|
2699
|
+
* Returns a product personalization parameters by product identifier.
|
|
2700
|
+
* @param id Product identifier.
|
|
2701
|
+
* @param productVersionId (optional) Product version identifier.
|
|
2702
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2703
|
+
* @return Success
|
|
2704
|
+
*/
|
|
2705
|
+
getProductSummary(id, productVersionId, tenantId, cancelToken) {
|
|
2706
|
+
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/personalization-parameters?";
|
|
2707
|
+
if (id === undefined || id === null)
|
|
2708
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
2709
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2710
|
+
if (productVersionId !== undefined && productVersionId !== null)
|
|
2711
|
+
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
2712
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
2713
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2714
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2715
|
+
let options_ = {
|
|
2716
|
+
method: "GET",
|
|
2717
|
+
url: url_,
|
|
2718
|
+
headers: {
|
|
2719
|
+
"Accept": "application/json"
|
|
2720
|
+
},
|
|
2721
|
+
cancelToken
|
|
2722
|
+
};
|
|
2723
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2724
|
+
return this.instance.request(transformedOptions_);
|
|
2725
|
+
}).catch((_error) => {
|
|
2726
|
+
if (isAxiosError(_error) && _error.response) {
|
|
2727
|
+
return _error.response;
|
|
2728
|
+
}
|
|
2729
|
+
else {
|
|
2730
|
+
throw _error;
|
|
2731
|
+
}
|
|
2732
|
+
}).then((_response) => {
|
|
2733
|
+
return this.transformResult(url_, _response, (_response) => this.processGetProductSummary(_response));
|
|
2734
|
+
});
|
|
2735
|
+
}
|
|
2736
|
+
processGetProductSummary(response) {
|
|
2737
|
+
const status = response.status;
|
|
2738
|
+
let _headers = {};
|
|
2739
|
+
if (response.headers && typeof response.headers === "object") {
|
|
2740
|
+
for (let k in response.headers) {
|
|
2741
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
2742
|
+
_headers[k] = response.headers[k];
|
|
2743
|
+
}
|
|
2744
|
+
}
|
|
2745
|
+
}
|
|
2746
|
+
if (status === 200) {
|
|
2747
|
+
const _responseText = response.data;
|
|
2748
|
+
let result200 = null;
|
|
2749
|
+
let resultData200 = _responseText;
|
|
2750
|
+
result200 = JSON.parse(resultData200);
|
|
2751
|
+
return Promise.resolve(result200);
|
|
2752
|
+
}
|
|
2753
|
+
else if (status === 404) {
|
|
2754
|
+
const _responseText = response.data;
|
|
2755
|
+
let result404 = null;
|
|
2756
|
+
let resultData404 = _responseText;
|
|
2757
|
+
result404 = JSON.parse(resultData404);
|
|
2758
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2759
|
+
}
|
|
2760
|
+
else if (status === 409) {
|
|
2761
|
+
const _responseText = response.data;
|
|
2762
|
+
let result409 = null;
|
|
2763
|
+
let resultData409 = _responseText;
|
|
2764
|
+
result409 = JSON.parse(resultData409);
|
|
2765
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2766
|
+
}
|
|
2767
|
+
else if (status === 401) {
|
|
2768
|
+
const _responseText = response.data;
|
|
2769
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2770
|
+
}
|
|
2771
|
+
else if (status === 403) {
|
|
2772
|
+
const _responseText = response.data;
|
|
2773
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2774
|
+
}
|
|
2775
|
+
else if (status !== 200 && status !== 204) {
|
|
2776
|
+
const _responseText = response.data;
|
|
2777
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2778
|
+
}
|
|
2779
|
+
return Promise.resolve(null);
|
|
2780
|
+
}
|
|
2447
2781
|
/**
|
|
2448
2782
|
* Returns a product summary by product identifier.
|
|
2449
2783
|
* @param id Product identifier.
|
|
@@ -2454,7 +2788,7 @@ export class ProductsApiClient extends ApiClientBase {
|
|
|
2454
2788
|
* @param tenantId (optional) Tenant identifier.
|
|
2455
2789
|
* @return Success
|
|
2456
2790
|
*/
|
|
2457
|
-
|
|
2791
|
+
getProductSummary2(id, productVersionId, productLinkId, productVariantId, sku, tenantId, cancelToken) {
|
|
2458
2792
|
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/summary?";
|
|
2459
2793
|
if (id === undefined || id === null)
|
|
2460
2794
|
throw new Error("The parameter 'id' must be defined.");
|
|
@@ -2488,10 +2822,10 @@ export class ProductsApiClient extends ApiClientBase {
|
|
|
2488
2822
|
throw _error;
|
|
2489
2823
|
}
|
|
2490
2824
|
}).then((_response) => {
|
|
2491
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
2825
|
+
return this.transformResult(url_, _response, (_response) => this.processGetProductSummary2(_response));
|
|
2492
2826
|
});
|
|
2493
2827
|
}
|
|
2494
|
-
|
|
2828
|
+
processGetProductSummary2(response) {
|
|
2495
2829
|
const status = response.status;
|
|
2496
2830
|
let _headers = {};
|
|
2497
2831
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -3779,6 +4113,86 @@ export class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
3779
4113
|
}
|
|
3780
4114
|
return Promise.resolve(null);
|
|
3781
4115
|
}
|
|
4116
|
+
/**
|
|
4117
|
+
* Returns a product specification personalization parameters by product identifier.
|
|
4118
|
+
* @param id Product specification identifier.
|
|
4119
|
+
* @param tenantId (optional) Tenant identifier.
|
|
4120
|
+
* @return Success
|
|
4121
|
+
*/
|
|
4122
|
+
getProductSpecificationSummary(id, tenantId, cancelToken) {
|
|
4123
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-specifications/{id}/personalization-parameters?";
|
|
4124
|
+
if (id === undefined || id === null)
|
|
4125
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
4126
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4127
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
4128
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
4129
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4130
|
+
let options_ = {
|
|
4131
|
+
method: "GET",
|
|
4132
|
+
url: url_,
|
|
4133
|
+
headers: {
|
|
4134
|
+
"Accept": "application/json"
|
|
4135
|
+
},
|
|
4136
|
+
cancelToken
|
|
4137
|
+
};
|
|
4138
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4139
|
+
return this.instance.request(transformedOptions_);
|
|
4140
|
+
}).catch((_error) => {
|
|
4141
|
+
if (isAxiosError(_error) && _error.response) {
|
|
4142
|
+
return _error.response;
|
|
4143
|
+
}
|
|
4144
|
+
else {
|
|
4145
|
+
throw _error;
|
|
4146
|
+
}
|
|
4147
|
+
}).then((_response) => {
|
|
4148
|
+
return this.transformResult(url_, _response, (_response) => this.processGetProductSpecificationSummary(_response));
|
|
4149
|
+
});
|
|
4150
|
+
}
|
|
4151
|
+
processGetProductSpecificationSummary(response) {
|
|
4152
|
+
const status = response.status;
|
|
4153
|
+
let _headers = {};
|
|
4154
|
+
if (response.headers && typeof response.headers === "object") {
|
|
4155
|
+
for (let k in response.headers) {
|
|
4156
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
4157
|
+
_headers[k] = response.headers[k];
|
|
4158
|
+
}
|
|
4159
|
+
}
|
|
4160
|
+
}
|
|
4161
|
+
if (status === 200) {
|
|
4162
|
+
const _responseText = response.data;
|
|
4163
|
+
let result200 = null;
|
|
4164
|
+
let resultData200 = _responseText;
|
|
4165
|
+
result200 = JSON.parse(resultData200);
|
|
4166
|
+
return Promise.resolve(result200);
|
|
4167
|
+
}
|
|
4168
|
+
else if (status === 404) {
|
|
4169
|
+
const _responseText = response.data;
|
|
4170
|
+
let result404 = null;
|
|
4171
|
+
let resultData404 = _responseText;
|
|
4172
|
+
result404 = JSON.parse(resultData404);
|
|
4173
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
4174
|
+
}
|
|
4175
|
+
else if (status === 409) {
|
|
4176
|
+
const _responseText = response.data;
|
|
4177
|
+
let result409 = null;
|
|
4178
|
+
let resultData409 = _responseText;
|
|
4179
|
+
result409 = JSON.parse(resultData409);
|
|
4180
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
4181
|
+
}
|
|
4182
|
+
else if (status === 401) {
|
|
4183
|
+
const _responseText = response.data;
|
|
4184
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
4185
|
+
}
|
|
4186
|
+
else if (status === 403) {
|
|
4187
|
+
const _responseText = response.data;
|
|
4188
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
4189
|
+
}
|
|
4190
|
+
else if (status !== 200 && status !== 204) {
|
|
4191
|
+
const _responseText = response.data;
|
|
4192
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4193
|
+
}
|
|
4194
|
+
return Promise.resolve(null);
|
|
4195
|
+
}
|
|
3782
4196
|
/**
|
|
3783
4197
|
* Returns a product personalization workflow description by product specification identifier.
|
|
3784
4198
|
* @param id Product specification identifier.
|
|
@@ -6438,6 +6852,22 @@ export var ConflictType;
|
|
|
6438
6852
|
ConflictType["IdConflict"] = "IdConflict";
|
|
6439
6853
|
ConflictType["GeneralConflict"] = "GeneralConflict";
|
|
6440
6854
|
})(ConflictType || (ConflictType = {}));
|
|
6855
|
+
/** Customer's Canvas product type. */
|
|
6856
|
+
export var ProductType;
|
|
6857
|
+
(function (ProductType) {
|
|
6858
|
+
ProductType["ProductSpecification"] = "ProductSpecification";
|
|
6859
|
+
ProductType["Product"] = "Product";
|
|
6860
|
+
ProductType["ProductLink"] = "ProductLink";
|
|
6861
|
+
ProductType["ProductBundle"] = "ProductBundle";
|
|
6862
|
+
})(ProductType || (ProductType = {}));
|
|
6863
|
+
/** Type of editor that should be configured by workflow. */
|
|
6864
|
+
export var WorkflowType;
|
|
6865
|
+
(function (WorkflowType) {
|
|
6866
|
+
WorkflowType["UIFramework"] = "UIFramework";
|
|
6867
|
+
WorkflowType["SimpleEditor"] = "SimpleEditor";
|
|
6868
|
+
WorkflowType["DesignEditor"] = "DesignEditor";
|
|
6869
|
+
WorkflowType["WorkflowElements"] = "WorkflowElements";
|
|
6870
|
+
})(WorkflowType || (WorkflowType = {}));
|
|
6441
6871
|
/** Available appearance types. */
|
|
6442
6872
|
export var AppearanceDataType;
|
|
6443
6873
|
(function (AppearanceDataType) {
|
|
@@ -6449,14 +6879,6 @@ export var AppearanceDataType;
|
|
|
6449
6879
|
AppearanceDataType["ImageGrid"] = "ImageGrid";
|
|
6450
6880
|
AppearanceDataType["ImageList"] = "ImageList";
|
|
6451
6881
|
})(AppearanceDataType || (AppearanceDataType = {}));
|
|
6452
|
-
/** Type of editor that should be configured by workflow. */
|
|
6453
|
-
export var WorkflowType;
|
|
6454
|
-
(function (WorkflowType) {
|
|
6455
|
-
WorkflowType["UIFramework"] = "UIFramework";
|
|
6456
|
-
WorkflowType["SimpleEditor"] = "SimpleEditor";
|
|
6457
|
-
WorkflowType["DesignEditor"] = "DesignEditor";
|
|
6458
|
-
WorkflowType["WorkflowElements"] = "WorkflowElements";
|
|
6459
|
-
})(WorkflowType || (WorkflowType = {}));
|
|
6460
6882
|
/** Product link resource type. */
|
|
6461
6883
|
export var ProductLinkResourceType;
|
|
6462
6884
|
(function (ProductLinkResourceType) {
|