@aurigma/ng-design-atoms-api-client 2.34.1 → 2.35.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-design-atoms-api-client.metadata.json +1 -1
- package/bundles/aurigma-ng-design-atoms-api-client.umd.js +198 -78
- package/bundles/aurigma-ng-design-atoms-api-client.umd.js.map +1 -1
- package/bundles/aurigma-ng-design-atoms-api-client.umd.min.js +1 -1
- package/bundles/aurigma-ng-design-atoms-api-client.umd.min.js.map +1 -1
- package/esm2015/aurigma-ng-design-atoms-api-client.js +1 -1
- package/esm2015/lib/design-atoms-api-client.js +118 -9
- package/esm2015/lib/design-atoms-api.module.js +1 -1
- package/esm2015/public-api.js +1 -1
- package/fesm2015/aurigma-ng-design-atoms-api-client.js +118 -9
- package/fesm2015/aurigma-ng-design-atoms-api-client.js.map +1 -1
- package/lib/design-atoms-api-client.d.ts +29 -3
- package/package.json +1 -1
|
@@ -32,4 +32,4 @@ DesignAtomsApiModule.decorators = [
|
|
|
32
32
|
exports: []
|
|
33
33
|
},] }
|
|
34
34
|
];
|
|
35
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVzaWduLWF0b21zLWFwaS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiL2hvbWUvYXVyaWdtYS9hZ2VudHMvMDIvX3dvcmsvODMvcy9BdXJpZ21hLkRlc2lnbkF0b21zQXBpLlR5cGVTY3JpcHRBcGlDbGllbnQvQW5ndWxhci9hcGktY2xpZW50L3Byb2plY3RzL2NsaWVudC9zcmMvIiwic291cmNlcyI6WyJsaWIvZGVzaWduLWF0b21zLWFwaS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFzQixRQUFRLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDNUQsT0FBTyxLQUFL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VJMLFxuICAgICAgICAgIHVzZVZhbHVlOiBhcGlVcmxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIHByb3ZpZGU6IERlc2lnbkF0b21zQXBpQ2xpZW50LkFwaUNsaWVudENvbmZpZ3VyYXRpb24sXG4gICAgICAgICAgdXNlRmFjdG9yeTogQ3JlYXRlQXBpQ2xpZW50Q29uZmlndXJhdGlvbi5iaW5kKHRoaXMsIHRva2VuICwgYXBpVXJsLCBhcGlLZXkpXG4gICAgICAgIH0sXG4gICAgICBdXG4gICAgfTtcbiAgfVxufVxuIl19
|
package/esm2015/public-api.js
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export * from './lib/design-atoms-api.module';
|
|
5
5
|
export * from './lib/design-atoms-api-client';
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIvaG9tZS9hdXJpZ21hL2FnZW50cy8wMi9fd29yay84My9zL0F1cmlnbWEuRGVzaWduQXRvbXNBcGkuVHlwZVNjcmlwdEFwaUNsaWVudC9Bbmd1bGFyL2FwaS1jbGllbnQvcHJvamVjdHMvY2xpZW50L3NyYy8iLCJzb3VyY2VzIjpbInB1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLCtCQUErQixDQUFDO0FBQzlDLGNBQWMsK0JBQStCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIGNsaWVudFxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL2Rlc2lnbi1hdG9tcy1hcGkubW9kdWxlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2Rlc2lnbi1hdG9tcy1hcGktY2xpZW50JztcbiJdfQ==
|
|
@@ -3793,6 +3793,107 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3793
3793
|
}
|
|
3794
3794
|
return of(null);
|
|
3795
3795
|
}
|
|
3796
|
+
/**
|
|
3797
|
+
* Loads product (design model) from resource file taken from storage
|
|
3798
|
+
* @param id Resource identifier
|
|
3799
|
+
* @param privateStorage (optional) If set to 'true' resource will be taken from private storage
|
|
3800
|
+
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3801
|
+
* @param tenantId (optional) Tenant identifier
|
|
3802
|
+
* @return Success
|
|
3803
|
+
*/
|
|
3804
|
+
loadProductFromResource(id, privateStorage, privateStorageOwner, tenantId) {
|
|
3805
|
+
let url_ = this.baseUrl + "/api/atoms/v1/resources/{id}/as-design/model?";
|
|
3806
|
+
if (id === undefined || id === null)
|
|
3807
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3808
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3809
|
+
if (privateStorage !== undefined && privateStorage !== null)
|
|
3810
|
+
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3811
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3812
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3813
|
+
if (tenantId === null)
|
|
3814
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3815
|
+
else if (tenantId !== undefined)
|
|
3816
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3817
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3818
|
+
let options_ = {
|
|
3819
|
+
observe: "response",
|
|
3820
|
+
responseType: "blob",
|
|
3821
|
+
headers: new HttpHeaders({
|
|
3822
|
+
"Accept": "application/json"
|
|
3823
|
+
})
|
|
3824
|
+
};
|
|
3825
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
3826
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
3827
|
+
})).pipe(mergeMap((response_) => {
|
|
3828
|
+
return this.transformResult(url_, response_, (r) => this.processLoadProductFromResource(r));
|
|
3829
|
+
})).pipe(catchError((response_) => {
|
|
3830
|
+
if (response_ instanceof HttpResponseBase) {
|
|
3831
|
+
try {
|
|
3832
|
+
return this.transformResult(url_, response_, (r) => this.processLoadProductFromResource(r));
|
|
3833
|
+
}
|
|
3834
|
+
catch (e) {
|
|
3835
|
+
return throwError(e);
|
|
3836
|
+
}
|
|
3837
|
+
}
|
|
3838
|
+
else
|
|
3839
|
+
return throwError(response_);
|
|
3840
|
+
}));
|
|
3841
|
+
}
|
|
3842
|
+
processLoadProductFromResource(response) {
|
|
3843
|
+
const status = response.status;
|
|
3844
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
3845
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
3846
|
+
let _headers = {};
|
|
3847
|
+
if (response.headers) {
|
|
3848
|
+
for (let key of response.headers.keys()) {
|
|
3849
|
+
_headers[key] = response.headers.get(key);
|
|
3850
|
+
}
|
|
3851
|
+
}
|
|
3852
|
+
if (status === 200) {
|
|
3853
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3854
|
+
let result200 = null;
|
|
3855
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3856
|
+
return of(result200);
|
|
3857
|
+
}));
|
|
3858
|
+
}
|
|
3859
|
+
else if (status === 404) {
|
|
3860
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3861
|
+
let result404 = null;
|
|
3862
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3863
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3864
|
+
}));
|
|
3865
|
+
}
|
|
3866
|
+
else if (status === 422) {
|
|
3867
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3868
|
+
let result422 = null;
|
|
3869
|
+
result422 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3870
|
+
return throwException("Client Error", status, _responseText, _headers, result422);
|
|
3871
|
+
}));
|
|
3872
|
+
}
|
|
3873
|
+
else if (status === 401) {
|
|
3874
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3875
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3876
|
+
}));
|
|
3877
|
+
}
|
|
3878
|
+
else if (status === 403) {
|
|
3879
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3880
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3881
|
+
}));
|
|
3882
|
+
}
|
|
3883
|
+
else if (status === 500) {
|
|
3884
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3885
|
+
let result500 = null;
|
|
3886
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3887
|
+
return throwException("Internal server error", status, _responseText, _headers, result500);
|
|
3888
|
+
}));
|
|
3889
|
+
}
|
|
3890
|
+
else if (status !== 200 && status !== 204) {
|
|
3891
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3892
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3893
|
+
}));
|
|
3894
|
+
}
|
|
3895
|
+
return of(null);
|
|
3896
|
+
}
|
|
3796
3897
|
}
|
|
3797
3898
|
DesignAtomsServiceApiClient.ɵprov = ɵɵdefineInjectable({ factory: function DesignAtomsServiceApiClient_Factory() { return new DesignAtomsServiceApiClient(ɵɵinject(ApiClientConfiguration), ɵɵinject(HttpClient), ɵɵinject(API_BASE_URL, 8)); }, token: DesignAtomsServiceApiClient, providedIn: "root" });
|
|
3798
3899
|
DesignAtomsServiceApiClient.decorators = [
|
|
@@ -5595,14 +5696,14 @@ DesignAtomsViewerApiClient.ctorParameters = () => [
|
|
|
5595
5696
|
{ type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
|
|
5596
5697
|
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
|
|
5597
5698
|
];
|
|
5598
|
-
/**
|
|
5599
|
-
var
|
|
5600
|
-
(function (
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
})(
|
|
5699
|
+
/** Image preview file format. */
|
|
5700
|
+
var ImagePreviewFormat;
|
|
5701
|
+
(function (ImagePreviewFormat) {
|
|
5702
|
+
ImagePreviewFormat["Jpeg"] = "Jpeg";
|
|
5703
|
+
ImagePreviewFormat["Png"] = "Png";
|
|
5704
|
+
ImagePreviewFormat["Tiff"] = "Tiff";
|
|
5705
|
+
ImagePreviewFormat["Pdf"] = "Pdf";
|
|
5706
|
+
})(ImagePreviewFormat || (ImagePreviewFormat = {}));
|
|
5606
5707
|
var DesignElementType;
|
|
5607
5708
|
(function (DesignElementType) {
|
|
5608
5709
|
DesignElementType["Product"] = "Product";
|
|
@@ -5638,6 +5739,14 @@ var ItemSourceType;
|
|
|
5638
5739
|
ItemSourceType["ImageStorage"] = "ImageStorage";
|
|
5639
5740
|
ItemSourceType["PrivateImageStorage"] = "PrivateImageStorage";
|
|
5640
5741
|
})(ItemSourceType || (ItemSourceType = {}));
|
|
5742
|
+
/** Product preview file format. */
|
|
5743
|
+
var ProductPreviewFormat;
|
|
5744
|
+
(function (ProductPreviewFormat) {
|
|
5745
|
+
ProductPreviewFormat["Jpeg"] = "Jpeg";
|
|
5746
|
+
ProductPreviewFormat["Png"] = "Png";
|
|
5747
|
+
ProductPreviewFormat["Tiff"] = "Tiff";
|
|
5748
|
+
ProductPreviewFormat["Pdf"] = "Pdf";
|
|
5749
|
+
})(ProductPreviewFormat || (ProductPreviewFormat = {}));
|
|
5641
5750
|
var ProductProofFormat;
|
|
5642
5751
|
(function (ProductProofFormat) {
|
|
5643
5752
|
ProductProofFormat["Jpeg"] = "Jpeg";
|
|
@@ -5737,5 +5846,5 @@ DesignAtomsApiModule.decorators = [
|
|
|
5737
5846
|
* Generated bundle index. Do not edit.
|
|
5738
5847
|
*/
|
|
5739
5848
|
|
|
5740
|
-
export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, BuildInfoApiClient, CreateApiClientConfiguration, DesignAtomsApiModule, DesignAtomsCompatibilityApiClient, DesignAtomsImagesApiClient, DesignAtomsServiceApiClient, DesignAtomsViewerApiClient, DesignElementType, ItemSourceType, ItemType, PlaceholderItemContentType, ProductPatchType, ProductPreviewFormat, ProductProofFormat, ProductProofInterpolationMode };
|
|
5849
|
+
export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, BuildInfoApiClient, CreateApiClientConfiguration, DesignAtomsApiModule, DesignAtomsCompatibilityApiClient, DesignAtomsImagesApiClient, DesignAtomsServiceApiClient, DesignAtomsViewerApiClient, DesignElementType, ImagePreviewFormat, ItemSourceType, ItemType, PlaceholderItemContentType, ProductPatchType, ProductPreviewFormat, ProductProofFormat, ProductProofInterpolationMode };
|
|
5741
5850
|
//# sourceMappingURL=aurigma-ng-design-atoms-api-client.js.map
|