@aurigma/ng-storefront-api-client 2.16.1 → 2.17.17
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 +193 -75
- 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 +108 -1
- package/esm2015/lib/storefront.module.js +1 -1
- package/esm2015/public-api.js +1 -1
- package/fesm2015/aurigma-ng-storefront-api-client.js +108 -1
- package/fesm2015/aurigma-ng-storefront-api-client.js.map +1 -1
- package/lib/storefront-api-client.d.ts +88 -1
- 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmVmcm9udC5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiL2hvbWUvYXVyaWdtYS9hZ2VudHMvMDEvX3dvcmsvMTM3L3MvQmFja2VuZC9zcmMvQmFja09mZmljZS5XZWIuUHVibGljQXBpLlR5cGVTY3JpcHRBcGlDbGllbnQvQW5ndWxhci9hcGktY2xpZW50L3N0b3JlZnJvbnQtY2xpZW50L3Byb2plY3RzL2NsaWVudC9zcmMvIiwic291cmNlcyI6WyJsaWIvc3RvcmVmcm9udC5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFzQixRQUFRLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDNUQsT0FBTyxLQUFLLG1CQU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HVlOiBhcGlVcmxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIHByb3ZpZGU6IFN0b3JlZnJvbnRBcGlDbGllbnQuQXBpQ2xpZW50Q29uZmlndXJhdGlvbixcbiAgICAgICAgICB1c2VGYWN0b3J5OiBDcmVhdGVBcGlDbGllbnRDb25maWd1cmF0aW9uLmJpbmQodGhpcywgdG9rZW4gLCBhcGlVcmwsIGFwaUtleSlcbiAgICAgICAgfSxcbiAgICAgIF1cbiAgICB9O1xuICB9XG59XG4iXX0=
|
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIvaG9tZS9hdXJpZ21hL2FnZW50cy8wMS9fd29yay8xMzcvcy9CYWNrZW5kL3NyYy9CYWNrT2ZmaWNlLldlYi5QdWJsaWNBcGkuVHlwZVNjcmlwdEFwaUNsaWVudC9Bbmd1bGFyL2FwaS1jbGllbnQvc3RvcmVmcm9udC1jbGllbnQvcHJvamVjdHMvY2xpZW50L3NyYy8iLCJzb3VyY2VzIjpbInB1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLHlCQUF5QixDQUFDO0FBQ3hDLGNBQWMsNkJBQTZCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIGNsaWVudFxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL3N0b3JlZnJvbnQubW9kdWxlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3N0b3JlZnJvbnQtYXBpLWNsaWVudCc7XG4iXX0=
|
|
@@ -684,6 +684,106 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
684
684
|
}
|
|
685
685
|
return of(null);
|
|
686
686
|
}
|
|
687
|
+
/**
|
|
688
|
+
* Returns a product cost details from ecommerce system.
|
|
689
|
+
* @param reference Product reference - external reference to Customer's Canvas product product specification, e.g online store product identifier.
|
|
690
|
+
* @param sku Product SKU.
|
|
691
|
+
* @param storefrontId Storefront identifier.
|
|
692
|
+
* @param storefrontUserId (optional) Storefront user identifier.
|
|
693
|
+
* @param currencyCode (optional) Product cost currency code.
|
|
694
|
+
* @param quantity (optional) Product quantity.
|
|
695
|
+
* @param tenantId (optional) Tenant identifier.
|
|
696
|
+
* @return Success
|
|
697
|
+
*/
|
|
698
|
+
getProductCostDetails(reference, sku, storefrontId, storefrontUserId, currencyCode, quantity, tenantId) {
|
|
699
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-cost-details?";
|
|
700
|
+
if (reference === undefined || reference === null)
|
|
701
|
+
throw new Error("The parameter 'reference' must be defined.");
|
|
702
|
+
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
703
|
+
if (sku === undefined || sku === null)
|
|
704
|
+
throw new Error("The parameter 'sku' must be defined and cannot be null.");
|
|
705
|
+
else
|
|
706
|
+
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
707
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
708
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
709
|
+
else
|
|
710
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
711
|
+
if (storefrontUserId !== undefined && storefrontUserId !== null)
|
|
712
|
+
url_ += "storefrontUserId=" + encodeURIComponent("" + storefrontUserId) + "&";
|
|
713
|
+
if (currencyCode !== undefined && currencyCode !== null)
|
|
714
|
+
url_ += "currencyCode=" + encodeURIComponent("" + currencyCode) + "&";
|
|
715
|
+
if (quantity === null)
|
|
716
|
+
throw new Error("The parameter 'quantity' cannot be null.");
|
|
717
|
+
else if (quantity !== undefined)
|
|
718
|
+
url_ += "quantity=" + encodeURIComponent("" + quantity) + "&";
|
|
719
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
720
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
721
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
722
|
+
let options_ = {
|
|
723
|
+
observe: "response",
|
|
724
|
+
responseType: "blob",
|
|
725
|
+
headers: new HttpHeaders({
|
|
726
|
+
"Accept": "text/plain"
|
|
727
|
+
})
|
|
728
|
+
};
|
|
729
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
730
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
731
|
+
})).pipe(mergeMap((response_) => {
|
|
732
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductCostDetails(r));
|
|
733
|
+
})).pipe(catchError((response_) => {
|
|
734
|
+
if (response_ instanceof HttpResponseBase) {
|
|
735
|
+
try {
|
|
736
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductCostDetails(r));
|
|
737
|
+
}
|
|
738
|
+
catch (e) {
|
|
739
|
+
return throwError(e);
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
else
|
|
743
|
+
return throwError(response_);
|
|
744
|
+
}));
|
|
745
|
+
}
|
|
746
|
+
processGetProductCostDetails(response) {
|
|
747
|
+
const status = response.status;
|
|
748
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
749
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
750
|
+
let _headers = {};
|
|
751
|
+
if (response.headers) {
|
|
752
|
+
for (let key of response.headers.keys()) {
|
|
753
|
+
_headers[key] = response.headers.get(key);
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
if (status === 200) {
|
|
757
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
758
|
+
let result200 = null;
|
|
759
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
760
|
+
return of(result200);
|
|
761
|
+
}));
|
|
762
|
+
}
|
|
763
|
+
else if (status === 404) {
|
|
764
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
765
|
+
let result404 = null;
|
|
766
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
767
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
768
|
+
}));
|
|
769
|
+
}
|
|
770
|
+
else if (status === 401) {
|
|
771
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
772
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
773
|
+
}));
|
|
774
|
+
}
|
|
775
|
+
else if (status === 403) {
|
|
776
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
777
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
778
|
+
}));
|
|
779
|
+
}
|
|
780
|
+
else if (status !== 200 && status !== 204) {
|
|
781
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
782
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
783
|
+
}));
|
|
784
|
+
}
|
|
785
|
+
return of(null);
|
|
786
|
+
}
|
|
687
787
|
}
|
|
688
788
|
ProductReferencesApiClient.ɵprov = ɵɵdefineInjectable({ factory: function ProductReferencesApiClient_Factory() { return new ProductReferencesApiClient(ɵɵinject(ApiClientConfiguration), ɵɵinject(HttpClient), ɵɵinject(API_BASE_URL, 8)); }, token: ProductReferencesApiClient, providedIn: "root" });
|
|
689
789
|
ProductReferencesApiClient.decorators = [
|
|
@@ -2853,6 +2953,13 @@ var DatePeriod;
|
|
|
2853
2953
|
DatePeriod["Last7Days"] = "Last7Days";
|
|
2854
2954
|
DatePeriod["Last30Days"] = "Last30Days";
|
|
2855
2955
|
})(DatePeriod || (DatePeriod = {}));
|
|
2956
|
+
/** Available product resource types */
|
|
2957
|
+
var ProjectProductResourceType;
|
|
2958
|
+
(function (ProjectProductResourceType) {
|
|
2959
|
+
ProjectProductResourceType[ProjectProductResourceType["_0"] = 0] = "_0";
|
|
2960
|
+
ProjectProductResourceType[ProjectProductResourceType["_1"] = 1] = "_1";
|
|
2961
|
+
ProjectProductResourceType[ProjectProductResourceType["_2"] = 2] = "_2";
|
|
2962
|
+
})(ProjectProductResourceType || (ProjectProductResourceType = {}));
|
|
2856
2963
|
/** Storefront types. */
|
|
2857
2964
|
var StorefrontType;
|
|
2858
2965
|
(function (StorefrontType) {
|
|
@@ -2939,5 +3046,5 @@ StorefrontModule.decorators = [
|
|
|
2939
3046
|
* Generated bundle index. Do not edit.
|
|
2940
3047
|
*/
|
|
2941
3048
|
|
|
2942
|
-
export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, BuildInfoApiClient, CreateApiClientConfiguration, DatePeriod, ProductReferencesApiClient, ProductSpecificationsApiClient, ProjectsApiClient, StorefrontModule, StorefrontType, StorefrontUsersApiClient, StorefrontsApiClient, TenantInfoApiClient };
|
|
3049
|
+
export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, BuildInfoApiClient, CreateApiClientConfiguration, DatePeriod, ProductReferencesApiClient, ProductSpecificationsApiClient, ProjectProductResourceType, ProjectsApiClient, StorefrontModule, StorefrontType, StorefrontUsersApiClient, StorefrontsApiClient, TenantInfoApiClient };
|
|
2943
3050
|
//# sourceMappingURL=aurigma-ng-storefront-api-client.js.map
|