@aurigma/ng-design-atoms-api-client 2.46.1 → 2.50.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.
@@ -32,4 +32,4 @@ DesignAtomsApiModule.decorators = [
32
32
  exports: []
33
33
  },] }
34
34
  ];
35
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVzaWduLWF0b21zLWFwaS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiL2hvbWUvYXVyaWdtYS9hZ2VudHMvQ0NIMDEvX3dvcmsvOC9zL0F1cmlnbWEuRGVzaWduQXRvbXNBcGkuVHlwZVNjcmlwdEFwaUNsaWVudC9Bbmd1bGFyL2FwaS1jbGllbnQvcHJvamVjdHMvY2xpZW50L3NyYy8iLCJzb3VyY2VzIjpbImxpYi9kZXNpZ24tYXRvbXMtYXBpLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQXNCLFFBQVEsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUM1RCxPQUFPLEtBQUssb0JBQW9CLE1BQU0sMkJBQTJCLENBQUM7QUFFbEUsV0FBVztBQUNYLE1BQU0sVUFBVSw0QkFBNEIsQ0FBQyxLQUFhLEVBQUUsTUFBYyxFQUFFLFNBQWlCLFFBQVE7SUFDbkcsTUFBTSxPQUFPLEdBQUcsSUFBSSxvQkFBb0IsQ0FBQyxzQkFBc0IsRUFBRSxDQUFDO0lBQ2xFLE9BQU8sQ0FBQyxNQUFNLEdBQUcsTUFBTSxDQUFDO0lBQ3hCLE9BQU8sQ0FBQyxNQUFNLEdBQUcsTUFBTSxDQUFDO0lBQ3hCLE9BQU8sQ0FBQyxxQkFBcUIsQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUNyQyxPQUFPLE9BQU8sQ0FBQztBQUNqQixDQUFDO0FBUUQsTUFBTSxPQUFPLG9CQUFvQjtJQUMvQixNQ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BhcGlDb25mLmFwaUtleSA9IGFwaUtleTtcbiAgYXBpQ29uZi5hcGlVcmwgPSBhcGlVcmw7XG4gIGFwaUNvbmYuc2V0QXV0aG9yaXphdGlvblRva2VuKHRva2VuKTtcbiAgcmV0dXJuIGFwaUNvbmY7XG59XG5cbkBOZ01vZHVsZSh7XG4gIGRlY2xhcmF0aW9uczogW10sXG4gIGltcG9ydHM6IFtcbiAgXSxcbiAgZXhwb3J0czogW11cbn0pXG5leHBvcnQgY2xhc3MgRGVzaWduQXRvbXNBcGlNb2R1bGUge1xuICBzdGF0aWMgZm9yUm9vdCh0b2tlbjogc3RyaW5nLCBhcGlVcmw6IHN0cmluZywgYXBpS2V5OiBzdHJpbmcgPSAnQXBpS2V5Jyk6IE1vZHVsZVdpdGhQcm92aWRlcnM8RGVzaWduQXRvbXNBcGlNb2R1bGU+IHtcbiAgICByZXR1cm4ge1xuICAgICAgbmdNb2R1bGU6IERlc2lnbkF0b21zQXBpTW9kdWxlLFxuICAgICAgcHJvdmlkZXJzOiBbXG4gICAgICAgIHtcbiAgICAgICAgICBwcm92aWRlOiBEZXNpZ25BdG9tc0FwaUNsaWVudC5BUElfQkFTRV9VUkwsXG4gICAgICAgICAgdXNlVmFsdWU6IGFwaVVybFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgcHJvdmlkZTogRGVzaWduQXRvbXNBcGlDbGllbnQuQXBpQ2xpZW50Q29uZmlndXJhdGlvbixcbiAgICAgICAgICB1c2VGYWN0b3J5OiBDcmVhdGVBcGlDbGllbnRDb25maWd1cmF0aW9uLmJpbmQodGhpcywgdG9rZW4gLCBhcGlVcmwsIGFwaUtleSlcbiAgICAgICAgfSxcbiAgICAgIF1cbiAgICB9O1xuICB9XG59XG4iXX0=
35
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVzaWduLWF0b21zLWFwaS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiL2hvbWUvYXVya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R1bGUge1xuICBzdGF0aWMgZm9yUm9vdCh0b2tlbjogc3RyaW5nLCBhcGlVcmw6IHN0cmluZywgYXBpS2V5OiBzdHJpbmcgPSAnQXBpS2V5Jyk6IE1vZHVsZVdpdGhQcm92aWRlcnM8RGVzaWduQXRvbXNBcGlNb2R1bGU+IHtcbiAgICByZXR1cm4ge1xuICAgICAgbmdNb2R1bGU6IERlc2lnbkF0b21zQXBpTW9kdWxlLFxuICAgICAgcHJvdmlkZXJzOiBbXG4gICAgICAgIHtcbiAgICAgICAgICBwcm92aWRlOiBEZXNpZ25BdG9tc0FwaUNsaWVudC5BUElfQkFTRV9VUkwsXG4gICAgICAgICAgdXNlVmFsdWU6IGFwaVVybFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgcHJvdmlkZTogRGVzaWduQXRvbXNBcGlDbGllbnQuQXBpQ2xpZW50Q29uZmlndXJhdGlvbixcbiAgICAgICAgICB1c2VGYWN0b3J5OiBDcmVhdGVBcGlDbGllbnRDb25maWd1cmF0aW9uLmJpbmQodGhpcywgdG9rZW4gLCBhcGlVcmwsIGFwaUtleSlcbiAgICAgICAgfSxcbiAgICAgIF1cbiAgICB9O1xuICB9XG59XG4iXX0=
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIvaG9tZS9hdXJpZ21hL2FnZW50cy9DQ0gwMS9fd29yay84L3MvQXVyaWdtYS5EZXNpZ25BdG9tc0FwaS5UeXBlU2NyaXB0QXBpQ2xpZW50L0FuZ3VsYXIvYXBpLWNsaWVudC9wcm9qZWN0cy9jbGllbnQvc3JjLyIsInNvdXJjZXMiOlsicHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsK0JBQStCLENBQUM7QUFDOUMsY0FBYywrQkFBK0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2YgY2xpZW50XG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvZGVzaWduLWF0b21zLWFwaS5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZGVzaWduLWF0b21zLWFwaS1jbGllbnQnO1xuIl19
6
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIvaG9tZS9hdXJpZ21hL2FnZW50cy9DQ0gwMy9fd29yay80L3MvQXVyaWdtYS5EZXNpZ25BdG9tc0FwaS5UeXBlU2NyaXB0QXBpQ2xpZW50L0FuZ3VsYXIvYXBpLWNsaWVudC9wcm9qZWN0cy9jbGllbnQvc3JjLyIsInNvdXJjZXMiOlsicHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsK0JBQStCLENBQUM7QUFDOUMsY0FBYywrQkFBK0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2YgY2xpZW50XG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvZGVzaWduLWF0b21zLWFwaS5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZGVzaWduLWF0b21zLWFwaS1jbGllbnQnO1xuIl19
@@ -53,7 +53,7 @@ class BuildInfoApiClient extends ApiClientBase {
53
53
  this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
54
54
  }
55
55
  /**
56
- * Gets assembly build info
56
+ * Get assembly build info.
57
57
  * @return Success
58
58
  */
59
59
  headInfo() {
@@ -111,7 +111,7 @@ class BuildInfoApiClient extends ApiClientBase {
111
111
  return of(null);
112
112
  }
113
113
  /**
114
- * Gets assembly build info
114
+ * Get assembly build info.
115
115
  * @return Success
116
116
  */
117
117
  getInfo() {
@@ -2210,6 +2210,87 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
2210
2210
  }
2211
2211
  return of(null);
2212
2212
  }
2213
+ /**
2214
+ * Renders a web image preview with the specified parameters and saves rendering result as resource.
2215
+ * @param tenantId (optional) Tenant identifier
2216
+ * @param body (optional) Render model with preview parameters.
2217
+ * @return Success
2218
+ */
2219
+ renderImagePreviewToResource(tenantId, body) {
2220
+ let url_ = this.baseUrl + "/api/atoms/v1/images/render-image-preview/to-resource?";
2221
+ if (tenantId === null)
2222
+ throw new Error("The parameter 'tenantId' cannot be null.");
2223
+ else if (tenantId !== undefined)
2224
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2225
+ url_ = url_.replace(/[?&]$/, "");
2226
+ const content_ = JSON.stringify(body);
2227
+ let options_ = {
2228
+ body: content_,
2229
+ observe: "response",
2230
+ responseType: "blob",
2231
+ headers: new HttpHeaders({
2232
+ "Content-Type": "application/json",
2233
+ "Accept": "application/json"
2234
+ })
2235
+ };
2236
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2237
+ return this.http.request("post", url_, transformedOptions_);
2238
+ })).pipe(mergeMap((response_) => {
2239
+ return this.transformResult(url_, response_, (r) => this.processRenderImagePreviewToResource(r));
2240
+ })).pipe(catchError((response_) => {
2241
+ if (response_ instanceof HttpResponseBase) {
2242
+ try {
2243
+ return this.transformResult(url_, response_, (r) => this.processRenderImagePreviewToResource(r));
2244
+ }
2245
+ catch (e) {
2246
+ return throwError(e);
2247
+ }
2248
+ }
2249
+ else
2250
+ return throwError(response_);
2251
+ }));
2252
+ }
2253
+ processRenderImagePreviewToResource(response) {
2254
+ const status = response.status;
2255
+ const responseBlob = response instanceof HttpResponse ? response.body :
2256
+ response.error instanceof Blob ? response.error : undefined;
2257
+ let _headers = {};
2258
+ if (response.headers) {
2259
+ for (let key of response.headers.keys()) {
2260
+ _headers[key] = response.headers.get(key);
2261
+ }
2262
+ }
2263
+ if (status === 200) {
2264
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2265
+ let result200 = null;
2266
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2267
+ return of(result200);
2268
+ }));
2269
+ }
2270
+ else if (status === 401) {
2271
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2272
+ return throwException("Unauthorized", status, _responseText, _headers);
2273
+ }));
2274
+ }
2275
+ else if (status === 403) {
2276
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2277
+ return throwException("Forbidden", status, _responseText, _headers);
2278
+ }));
2279
+ }
2280
+ else if (status === 500) {
2281
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2282
+ let result500 = null;
2283
+ result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2284
+ return throwException("Internal server error", status, _responseText, _headers, result500);
2285
+ }));
2286
+ }
2287
+ else if (status !== 200 && status !== 204) {
2288
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2289
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2290
+ }));
2291
+ }
2292
+ return of(null);
2293
+ }
2213
2294
  }
2214
2295
  DesignAtomsImagesApiClient.ɵprov = ɵɵdefineInjectable({ factory: function DesignAtomsImagesApiClient_Factory() { return new DesignAtomsImagesApiClient(ɵɵinject(ApiClientConfiguration), ɵɵinject(HttpClient), ɵɵinject(API_BASE_URL, 8)); }, token: DesignAtomsImagesApiClient, providedIn: "root" });
2215
2296
  DesignAtomsImagesApiClient.decorators = [
@@ -3118,6 +3199,97 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3118
3199
  }
3119
3200
  return of(null);
3120
3201
  }
3202
+ /**
3203
+ * Returns design parameters stored in product model.
3204
+ * @param id Design identifier.
3205
+ * @param privateStorageOwner (optional) Private storage owner identifier.
3206
+ * @param tenantId (optional) Tenant identifier
3207
+ * @return Success
3208
+ */
3209
+ getDesignParameters(id, privateStorageOwner, tenantId) {
3210
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/parameters?";
3211
+ if (id === undefined || id === null)
3212
+ throw new Error("The parameter 'id' must be defined.");
3213
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
3214
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
3215
+ url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
3216
+ if (tenantId === null)
3217
+ throw new Error("The parameter 'tenantId' cannot be null.");
3218
+ else if (tenantId !== undefined)
3219
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3220
+ url_ = url_.replace(/[?&]$/, "");
3221
+ let options_ = {
3222
+ observe: "response",
3223
+ responseType: "blob",
3224
+ headers: new HttpHeaders({
3225
+ "Accept": "application/json"
3226
+ })
3227
+ };
3228
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3229
+ return this.http.request("get", url_, transformedOptions_);
3230
+ })).pipe(mergeMap((response_) => {
3231
+ return this.transformResult(url_, response_, (r) => this.processGetDesignParameters(r));
3232
+ })).pipe(catchError((response_) => {
3233
+ if (response_ instanceof HttpResponseBase) {
3234
+ try {
3235
+ return this.transformResult(url_, response_, (r) => this.processGetDesignParameters(r));
3236
+ }
3237
+ catch (e) {
3238
+ return throwError(e);
3239
+ }
3240
+ }
3241
+ else
3242
+ return throwError(response_);
3243
+ }));
3244
+ }
3245
+ processGetDesignParameters(response) {
3246
+ const status = response.status;
3247
+ const responseBlob = response instanceof HttpResponse ? response.body :
3248
+ response.error instanceof Blob ? response.error : undefined;
3249
+ let _headers = {};
3250
+ if (response.headers) {
3251
+ for (let key of response.headers.keys()) {
3252
+ _headers[key] = response.headers.get(key);
3253
+ }
3254
+ }
3255
+ if (status === 200) {
3256
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3257
+ let result200 = null;
3258
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3259
+ return of(result200);
3260
+ }));
3261
+ }
3262
+ else if (status === 404) {
3263
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3264
+ let result404 = null;
3265
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3266
+ return throwException("Not Found", status, _responseText, _headers, result404);
3267
+ }));
3268
+ }
3269
+ else if (status === 401) {
3270
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3271
+ return throwException("Unauthorized", status, _responseText, _headers);
3272
+ }));
3273
+ }
3274
+ else if (status === 403) {
3275
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3276
+ return throwException("Forbidden", status, _responseText, _headers);
3277
+ }));
3278
+ }
3279
+ else if (status === 500) {
3280
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3281
+ let result500 = null;
3282
+ result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3283
+ return throwException("Internal server error", status, _responseText, _headers, result500);
3284
+ }));
3285
+ }
3286
+ else if (status !== 200 && status !== 204) {
3287
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3288
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3289
+ }));
3290
+ }
3291
+ return of(null);
3292
+ }
3121
3293
  /**
3122
3294
  * Loads data schema from design file taken from storage
3123
3295
  * @param id Design identifier
@@ -3882,6 +4054,86 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3882
4054
  }
3883
4055
  return of(null);
3884
4056
  }
4057
+ /**
4058
+ * Extracts product item image.
4059
+ * @param tenantId (optional) Tenant identifier
4060
+ * @param body (optional) Extraction parameters.
4061
+ * @return Success
4062
+ */
4063
+ extractItemImage(tenantId, body) {
4064
+ let url_ = this.baseUrl + "/api/atoms/v1/itemExtractor?";
4065
+ if (tenantId === null)
4066
+ throw new Error("The parameter 'tenantId' cannot be null.");
4067
+ else if (tenantId !== undefined)
4068
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
4069
+ url_ = url_.replace(/[?&]$/, "");
4070
+ const content_ = JSON.stringify(body);
4071
+ let options_ = {
4072
+ body: content_,
4073
+ observe: "response",
4074
+ responseType: "blob",
4075
+ headers: new HttpHeaders({
4076
+ "Content-Type": "application/json",
4077
+ "Accept": "application/octet-stream"
4078
+ })
4079
+ };
4080
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
4081
+ return this.http.request("post", url_, transformedOptions_);
4082
+ })).pipe(mergeMap((response_) => {
4083
+ return this.transformResult(url_, response_, (r) => this.processExtractItemImage(r));
4084
+ })).pipe(catchError((response_) => {
4085
+ if (response_ instanceof HttpResponseBase) {
4086
+ try {
4087
+ return this.transformResult(url_, response_, (r) => this.processExtractItemImage(r));
4088
+ }
4089
+ catch (e) {
4090
+ return throwError(e);
4091
+ }
4092
+ }
4093
+ else
4094
+ return throwError(response_);
4095
+ }));
4096
+ }
4097
+ processExtractItemImage(response) {
4098
+ const status = response.status;
4099
+ const responseBlob = response instanceof HttpResponse ? response.body :
4100
+ response.error instanceof Blob ? response.error : undefined;
4101
+ let _headers = {};
4102
+ if (response.headers) {
4103
+ for (let key of response.headers.keys()) {
4104
+ _headers[key] = response.headers.get(key);
4105
+ }
4106
+ }
4107
+ if (status === 200 || status === 206) {
4108
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
4109
+ const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
4110
+ const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
4111
+ return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
4112
+ }
4113
+ else if (status === 401) {
4114
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4115
+ return throwException("Unauthorized", status, _responseText, _headers);
4116
+ }));
4117
+ }
4118
+ else if (status === 403) {
4119
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4120
+ return throwException("Forbidden", status, _responseText, _headers);
4121
+ }));
4122
+ }
4123
+ else if (status === 500) {
4124
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4125
+ let result500 = null;
4126
+ result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4127
+ return throwException("Internal server error", status, _responseText, _headers, result500);
4128
+ }));
4129
+ }
4130
+ else if (status !== 200 && status !== 204) {
4131
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4132
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
4133
+ }));
4134
+ }
4135
+ return of(null);
4136
+ }
3885
4137
  /**
3886
4138
  * Creates a private design from a public design.
3887
4139
  * @param designId (optional) Public design ID.
@@ -4130,6 +4382,87 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4130
4382
  }
4131
4383
  return of(null);
4132
4384
  }
4385
+ /**
4386
+ * Renders a design preview with the specified parameters and saves rendering result as resource.
4387
+ * @param tenantId (optional) Tenant identifier
4388
+ * @param body (optional) Render model with preview parameters.
4389
+ * @return Success
4390
+ */
4391
+ renderDesignPreviewToResource(tenantId, body) {
4392
+ let url_ = this.baseUrl + "/api/atoms/v1/render-design-preview/to-resource?";
4393
+ if (tenantId === null)
4394
+ throw new Error("The parameter 'tenantId' cannot be null.");
4395
+ else if (tenantId !== undefined)
4396
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
4397
+ url_ = url_.replace(/[?&]$/, "");
4398
+ const content_ = JSON.stringify(body);
4399
+ let options_ = {
4400
+ body: content_,
4401
+ observe: "response",
4402
+ responseType: "blob",
4403
+ headers: new HttpHeaders({
4404
+ "Content-Type": "application/json",
4405
+ "Accept": "application/json"
4406
+ })
4407
+ };
4408
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
4409
+ return this.http.request("post", url_, transformedOptions_);
4410
+ })).pipe(mergeMap((response_) => {
4411
+ return this.transformResult(url_, response_, (r) => this.processRenderDesignPreviewToResource(r));
4412
+ })).pipe(catchError((response_) => {
4413
+ if (response_ instanceof HttpResponseBase) {
4414
+ try {
4415
+ return this.transformResult(url_, response_, (r) => this.processRenderDesignPreviewToResource(r));
4416
+ }
4417
+ catch (e) {
4418
+ return throwError(e);
4419
+ }
4420
+ }
4421
+ else
4422
+ return throwError(response_);
4423
+ }));
4424
+ }
4425
+ processRenderDesignPreviewToResource(response) {
4426
+ const status = response.status;
4427
+ const responseBlob = response instanceof HttpResponse ? response.body :
4428
+ response.error instanceof Blob ? response.error : undefined;
4429
+ let _headers = {};
4430
+ if (response.headers) {
4431
+ for (let key of response.headers.keys()) {
4432
+ _headers[key] = response.headers.get(key);
4433
+ }
4434
+ }
4435
+ if (status === 200) {
4436
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4437
+ let result200 = null;
4438
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4439
+ return of(result200);
4440
+ }));
4441
+ }
4442
+ else if (status === 401) {
4443
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4444
+ return throwException("Unauthorized", status, _responseText, _headers);
4445
+ }));
4446
+ }
4447
+ else if (status === 403) {
4448
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4449
+ return throwException("Forbidden", status, _responseText, _headers);
4450
+ }));
4451
+ }
4452
+ else if (status === 500) {
4453
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4454
+ let result500 = null;
4455
+ result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4456
+ return throwException("Internal server error", status, _responseText, _headers, result500);
4457
+ }));
4458
+ }
4459
+ else if (status !== 200 && status !== 204) {
4460
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4461
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
4462
+ }));
4463
+ }
4464
+ return of(null);
4465
+ }
4133
4466
  /**
4134
4467
  * Renders a design proof with the specified parameters.
4135
4468
  * @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied
@@ -4214,6 +4547,87 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4214
4547
  }
4215
4548
  return of(null);
4216
4549
  }
4550
+ /**
4551
+ * Renders a design proof with the specified parameters and saves rendering result as resource.
4552
+ * @param tenantId (optional) Tenant identifier
4553
+ * @param body (optional) Render model with preview parameters.
4554
+ * @return Success
4555
+ */
4556
+ renderDesignProofToResource(tenantId, body) {
4557
+ let url_ = this.baseUrl + "/api/atoms/v1/render-design-proof/to-resource?";
4558
+ if (tenantId === null)
4559
+ throw new Error("The parameter 'tenantId' cannot be null.");
4560
+ else if (tenantId !== undefined)
4561
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
4562
+ url_ = url_.replace(/[?&]$/, "");
4563
+ const content_ = JSON.stringify(body);
4564
+ let options_ = {
4565
+ body: content_,
4566
+ observe: "response",
4567
+ responseType: "blob",
4568
+ headers: new HttpHeaders({
4569
+ "Content-Type": "application/json",
4570
+ "Accept": "application/json"
4571
+ })
4572
+ };
4573
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
4574
+ return this.http.request("post", url_, transformedOptions_);
4575
+ })).pipe(mergeMap((response_) => {
4576
+ return this.transformResult(url_, response_, (r) => this.processRenderDesignProofToResource(r));
4577
+ })).pipe(catchError((response_) => {
4578
+ if (response_ instanceof HttpResponseBase) {
4579
+ try {
4580
+ return this.transformResult(url_, response_, (r) => this.processRenderDesignProofToResource(r));
4581
+ }
4582
+ catch (e) {
4583
+ return throwError(e);
4584
+ }
4585
+ }
4586
+ else
4587
+ return throwError(response_);
4588
+ }));
4589
+ }
4590
+ processRenderDesignProofToResource(response) {
4591
+ const status = response.status;
4592
+ const responseBlob = response instanceof HttpResponse ? response.body :
4593
+ response.error instanceof Blob ? response.error : undefined;
4594
+ let _headers = {};
4595
+ if (response.headers) {
4596
+ for (let key of response.headers.keys()) {
4597
+ _headers[key] = response.headers.get(key);
4598
+ }
4599
+ }
4600
+ if (status === 200) {
4601
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4602
+ let result200 = null;
4603
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4604
+ return of(result200);
4605
+ }));
4606
+ }
4607
+ else if (status === 401) {
4608
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4609
+ return throwException("Unauthorized", status, _responseText, _headers);
4610
+ }));
4611
+ }
4612
+ else if (status === 403) {
4613
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4614
+ return throwException("Forbidden", status, _responseText, _headers);
4615
+ }));
4616
+ }
4617
+ else if (status === 500) {
4618
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4619
+ let result500 = null;
4620
+ result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4621
+ return throwException("Internal server error", status, _responseText, _headers, result500);
4622
+ }));
4623
+ }
4624
+ else if (status !== 200 && status !== 204) {
4625
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4626
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
4627
+ }));
4628
+ }
4629
+ return of(null);
4630
+ }
4217
4631
  /**
4218
4632
  * Render product proof image with specified parameters.
4219
4633
  * @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied (default value is 'false').
@@ -6411,6 +6825,14 @@ var ImagePreviewFormat;
6411
6825
  ImagePreviewFormat["Jpeg"] = "Jpeg";
6412
6826
  ImagePreviewFormat["Png"] = "Png";
6413
6827
  })(ImagePreviewFormat || (ImagePreviewFormat = {}));
6828
+ /** Image preview fit mode. */
6829
+ var ImagePreviewFitMode;
6830
+ (function (ImagePreviewFitMode) {
6831
+ ImagePreviewFitMode["Fit"] = "Fit";
6832
+ ImagePreviewFitMode["Shrink"] = "Shrink";
6833
+ ImagePreviewFitMode["Resize"] = "Resize";
6834
+ ImagePreviewFitMode["Fill"] = "Fill";
6835
+ })(ImagePreviewFitMode || (ImagePreviewFitMode = {}));
6414
6836
  var DesignElementType;
6415
6837
  (function (DesignElementType) {
6416
6838
  DesignElementType["Product"] = "Product";
@@ -6551,5 +6973,5 @@ DesignAtomsApiModule.decorators = [
6551
6973
  * Generated bundle index. Do not edit.
6552
6974
  */
6553
6975
 
6554
- export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, BuildInfoApiClient, ColorSpace, CreateApiClientConfiguration, DesignAtomsApiModule, DesignAtomsCompatibilityApiClient, DesignAtomsImagesApiClient, DesignAtomsMockups3dApiClient, DesignAtomsServiceApiClient, DesignAtomsViewerApiClient, DesignElementType, ImagePreviewFormat, ItemSourceType, ItemType, PlaceholderItemContentType, ProductPatchType, ProductPreviewFormat, ProductProofFormat, ProductProofInterpolationMode };
6976
+ export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, BuildInfoApiClient, ColorSpace, CreateApiClientConfiguration, DesignAtomsApiModule, DesignAtomsCompatibilityApiClient, DesignAtomsImagesApiClient, DesignAtomsMockups3dApiClient, DesignAtomsServiceApiClient, DesignAtomsViewerApiClient, DesignElementType, ImagePreviewFitMode, ImagePreviewFormat, ItemSourceType, ItemType, PlaceholderItemContentType, ProductPatchType, ProductPreviewFormat, ProductProofFormat, ProductProofInterpolationMode };
6555
6977
  //# sourceMappingURL=aurigma-ng-design-atoms-api-client.js.map