@aurigma/ng-design-atoms-api-client 2.73.1 → 2.76.4
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 +440 -303
- 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 +131 -7
- 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 +131 -7
- package/fesm2015/aurigma-ng-design-atoms-api-client.js.map +1 -1
- package/lib/design-atoms-api-client.d.ts +68 -4
- 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVzaWduLWF0b21zLWFwaS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiL2hvbWUvYXVyaWdtYS9hZ2VudHMvQ0NIMDEvX3dvcmsvOC9zL3NyYy9BdXJpZ21hLkRlc2lnbkF0b21zQXBpLlR5cGVTY3JpcHRBcGlDbGllbnQvQW5ndWxhci9hcGktY2xpZW50L3Byb2plY3RzL2NsaWVudC9zcmMvIiwic291cmNlcyI6WyJsaWIvZGVzaWduLWF0b21zLWFwaS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFzQixRQUFRLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDNUQsT0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JX0JBU0VfVVJMLFxuICAgICAgICAgIHVzZVZhbHVlOiBhcGlVcmxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIHByb3ZpZGU6IERlc2lnbkF0b21zQXBpQ2xpZW50LkFwaUNsaWVudENvbmZpZ3VyYXRpb24sXG4gICAgICAgICAgdXNlRmFjdG9yeTogQ3JlYXRlQXBpQ2xpZW50Q29uZmlndXJhdGlvbi5iaW5kKHRoaXMsIHRva2VuICwgYXBpVXJsLCBhcGlLZXkpXG4gICAgICAgIH0sXG4gICAgICBdXG4gICAgfTtcbiAgfVxufVxuIl19
|
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIvaG9tZS9hdXJpZ21hL2FnZW50cy9DQ0gwMS9fd29yay84L3Mvc3JjL0F1cmlnbWEuRGVzaWduQXRvbXNBcGkuVHlwZVNjcmlwdEFwaUNsaWVudC9Bbmd1bGFyL2FwaS1jbGllbnQvcHJvamVjdHMvY2xpZW50L3NyYy8iLCJzb3VyY2VzIjpbInB1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLCtCQUErQixDQUFDO0FBQzlDLGNBQWMsK0JBQStCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIGNsaWVudFxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL2Rlc2lnbi1hdG9tcy1hcGkubW9kdWxlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2Rlc2lnbi1hdG9tcy1hcGktY2xpZW50JztcbiJdfQ==
|
|
@@ -2730,6 +2730,116 @@ DesignAtomsImagesApiClient.ctorParameters = () => [
|
|
|
2730
2730
|
{ type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
|
|
2731
2731
|
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
|
|
2732
2732
|
];
|
|
2733
|
+
class DesignAtomsMockups2dApiClient extends ApiClientBase {
|
|
2734
|
+
constructor(configuration, http, baseUrl) {
|
|
2735
|
+
super(configuration);
|
|
2736
|
+
this.jsonParseReviver = undefined;
|
|
2737
|
+
this.http = http;
|
|
2738
|
+
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
2739
|
+
}
|
|
2740
|
+
/**
|
|
2741
|
+
* Renders a mockup preview with the specified parameters.
|
|
2742
|
+
* @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied
|
|
2743
|
+
(default value is 'false').
|
|
2744
|
+
* @param tenantId (optional) Tenant ID.
|
|
2745
|
+
* @param body (optional) Render model with preview parameters.
|
|
2746
|
+
* @return Success
|
|
2747
|
+
*/
|
|
2748
|
+
renderMockupPreview(attachment, tenantId, body) {
|
|
2749
|
+
let url_ = this.baseUrl + "/api/atoms/v1/mockups-2d/render-preview?";
|
|
2750
|
+
if (attachment !== undefined && attachment !== null)
|
|
2751
|
+
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
2752
|
+
if (tenantId === null)
|
|
2753
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2754
|
+
else if (tenantId !== undefined)
|
|
2755
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2756
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2757
|
+
const content_ = JSON.stringify(body);
|
|
2758
|
+
let options_ = {
|
|
2759
|
+
body: content_,
|
|
2760
|
+
observe: "response",
|
|
2761
|
+
responseType: "blob",
|
|
2762
|
+
headers: new HttpHeaders({
|
|
2763
|
+
"Content-Type": "application/json",
|
|
2764
|
+
"Accept": "application/octet-stream"
|
|
2765
|
+
})
|
|
2766
|
+
};
|
|
2767
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
2768
|
+
return this.http.request("post", url_, transformedOptions_);
|
|
2769
|
+
})).pipe(mergeMap((response_) => {
|
|
2770
|
+
return this.transformResult(url_, response_, (r) => this.processRenderMockupPreview(r));
|
|
2771
|
+
})).pipe(catchError((response_) => {
|
|
2772
|
+
if (response_ instanceof HttpResponseBase) {
|
|
2773
|
+
try {
|
|
2774
|
+
return this.transformResult(url_, response_, (r) => this.processRenderMockupPreview(r));
|
|
2775
|
+
}
|
|
2776
|
+
catch (e) {
|
|
2777
|
+
return throwError(e);
|
|
2778
|
+
}
|
|
2779
|
+
}
|
|
2780
|
+
else
|
|
2781
|
+
return throwError(response_);
|
|
2782
|
+
}));
|
|
2783
|
+
}
|
|
2784
|
+
processRenderMockupPreview(response) {
|
|
2785
|
+
const status = response.status;
|
|
2786
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2787
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
2788
|
+
let _headers = {};
|
|
2789
|
+
if (response.headers) {
|
|
2790
|
+
for (let key of response.headers.keys()) {
|
|
2791
|
+
_headers[key] = response.headers.get(key);
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
if (status === 200 || status === 206) {
|
|
2795
|
+
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
2796
|
+
const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
2797
|
+
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
2798
|
+
return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
2799
|
+
}
|
|
2800
|
+
else if (status === 404) {
|
|
2801
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2802
|
+
let result404 = null;
|
|
2803
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2804
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2805
|
+
}));
|
|
2806
|
+
}
|
|
2807
|
+
else if (status === 409) {
|
|
2808
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2809
|
+
let result409 = null;
|
|
2810
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2811
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2812
|
+
}));
|
|
2813
|
+
}
|
|
2814
|
+
else if (status === 401) {
|
|
2815
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2816
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2817
|
+
}));
|
|
2818
|
+
}
|
|
2819
|
+
else if (status === 403) {
|
|
2820
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2821
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2822
|
+
}));
|
|
2823
|
+
}
|
|
2824
|
+
else if (status !== 200 && status !== 204) {
|
|
2825
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2826
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2827
|
+
}));
|
|
2828
|
+
}
|
|
2829
|
+
return of(null);
|
|
2830
|
+
}
|
|
2831
|
+
}
|
|
2832
|
+
DesignAtomsMockups2dApiClient.ɵprov = ɵɵdefineInjectable({ factory: function DesignAtomsMockups2dApiClient_Factory() { return new DesignAtomsMockups2dApiClient(ɵɵinject(ApiClientConfiguration), ɵɵinject(HttpClient), ɵɵinject(API_BASE_URL, 8)); }, token: DesignAtomsMockups2dApiClient, providedIn: "root" });
|
|
2833
|
+
DesignAtomsMockups2dApiClient.decorators = [
|
|
2834
|
+
{ type: Injectable, args: [{
|
|
2835
|
+
providedIn: 'root'
|
|
2836
|
+
},] }
|
|
2837
|
+
];
|
|
2838
|
+
DesignAtomsMockups2dApiClient.ctorParameters = () => [
|
|
2839
|
+
{ type: ApiClientConfiguration, decorators: [{ type: Inject, args: [ApiClientConfiguration,] }] },
|
|
2840
|
+
{ type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
|
|
2841
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
|
|
2842
|
+
];
|
|
2733
2843
|
class DesignAtomsMockups3dApiClient extends ApiClientBase {
|
|
2734
2844
|
constructor(configuration, http, baseUrl) {
|
|
2735
2845
|
super(configuration);
|
|
@@ -9526,11 +9636,11 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
9526
9636
|
* @param resourceId (optional) Resource identifier.
|
|
9527
9637
|
* @param privateDesignId (optional) Private design identifier.
|
|
9528
9638
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
9529
|
-
* @param
|
|
9639
|
+
* @param tenantId (optional) Tenant ID.
|
|
9530
9640
|
* @return Created
|
|
9531
9641
|
* @deprecated
|
|
9532
9642
|
*/
|
|
9533
|
-
createPrivateDesignFromResource(resourceId, privateDesignId, privateStorageOwner,
|
|
9643
|
+
createPrivateDesignFromResource(resourceId, privateDesignId, privateStorageOwner, tenantId) {
|
|
9534
9644
|
let url_ = this.baseUrl + "/api/atoms/v1/private-designs/from-resource?";
|
|
9535
9645
|
if (resourceId !== undefined && resourceId !== null)
|
|
9536
9646
|
url_ += "resourceId=" + encodeURIComponent("" + resourceId) + "&";
|
|
@@ -9538,10 +9648,10 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
9538
9648
|
url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
|
|
9539
9649
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
9540
9650
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
9541
|
-
if (
|
|
9542
|
-
throw new Error("The parameter '
|
|
9543
|
-
else if (
|
|
9544
|
-
url_ += "tenantId=" + encodeURIComponent("" +
|
|
9651
|
+
if (tenantId === null)
|
|
9652
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
9653
|
+
else if (tenantId !== undefined)
|
|
9654
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
9545
9655
|
url_ = url_.replace(/[?&]$/, "");
|
|
9546
9656
|
let options_ = {
|
|
9547
9657
|
observe: "response",
|
|
@@ -11652,6 +11762,20 @@ var ItemType;
|
|
|
11652
11762
|
ItemType["Clipart"] = "Clipart";
|
|
11653
11763
|
ItemType["Group"] = "Group";
|
|
11654
11764
|
})(ItemType || (ItemType = {}));
|
|
11765
|
+
/** Mockup preview fitting mode. */
|
|
11766
|
+
var MockupPreviewFitMode;
|
|
11767
|
+
(function (MockupPreviewFitMode) {
|
|
11768
|
+
MockupPreviewFitMode["Fit"] = "Fit";
|
|
11769
|
+
MockupPreviewFitMode["Shrink"] = "Shrink";
|
|
11770
|
+
MockupPreviewFitMode["Resize"] = "Resize";
|
|
11771
|
+
MockupPreviewFitMode["Fill"] = "Fill";
|
|
11772
|
+
})(MockupPreviewFitMode || (MockupPreviewFitMode = {}));
|
|
11773
|
+
/** Mockup preview file format. */
|
|
11774
|
+
var MockupPreviewFormat;
|
|
11775
|
+
(function (MockupPreviewFormat) {
|
|
11776
|
+
MockupPreviewFormat["Jpeg"] = "Jpeg";
|
|
11777
|
+
MockupPreviewFormat["Png"] = "Png";
|
|
11778
|
+
})(MockupPreviewFormat || (MockupPreviewFormat = {}));
|
|
11655
11779
|
/** Placeholder item content type. */
|
|
11656
11780
|
var PlaceholderItemContentType;
|
|
11657
11781
|
(function (PlaceholderItemContentType) {
|
|
@@ -11784,5 +11908,5 @@ DesignAtomsApiModule.decorators = [
|
|
|
11784
11908
|
* Generated bundle index. Do not edit.
|
|
11785
11909
|
*/
|
|
11786
11910
|
|
|
11787
|
-
export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, BuildInfoApiClient, ConflictType, CreateApiClientConfiguration, DesignAtomsApiModule, DesignAtomsCompatibilityApiClient, DesignAtomsImagesApiClient, DesignAtomsMockups3dApiClient, DesignAtomsPalettesApiClient, DesignAtomsPrintProductApiClient, DesignAtomsPrintProductItemsApiClient, DesignAtomsServiceApiClient, DesignAtomsViewerApiClient, DesignElementType, ImageExtractionFormat, ImagePreviewFitMode, ImagePreviewFormat, ItemSourceType, ItemType, PlaceholderItemContentType, ProductPatchType, ProductPreviewFormat, ProductProofFormat, ProductProofInterpolationMode, TextAlignment, TextVerticalAlignment };
|
|
11911
|
+
export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, BuildInfoApiClient, ConflictType, CreateApiClientConfiguration, DesignAtomsApiModule, DesignAtomsCompatibilityApiClient, DesignAtomsImagesApiClient, DesignAtomsMockups2dApiClient, DesignAtomsMockups3dApiClient, DesignAtomsPalettesApiClient, DesignAtomsPrintProductApiClient, DesignAtomsPrintProductItemsApiClient, DesignAtomsServiceApiClient, DesignAtomsViewerApiClient, DesignElementType, ImageExtractionFormat, ImagePreviewFitMode, ImagePreviewFormat, ItemSourceType, ItemType, MockupPreviewFitMode, MockupPreviewFormat, PlaceholderItemContentType, ProductPatchType, ProductPreviewFormat, ProductProofFormat, ProductProofInterpolationMode, TextAlignment, TextVerticalAlignment };
|
|
11788
11912
|
//# sourceMappingURL=aurigma-ng-design-atoms-api-client.js.map
|