@aurigma/ng-design-atoms-api-client 2.62.6 → 2.64.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.
@@ -475,9 +475,7 @@ class DesignAtomsCompatibilityApiClient extends ApiClientBase {
475
475
  if (tenantId === undefined || tenantId === null)
476
476
  throw new Error("The parameter 'tenantId' must be defined.");
477
477
  url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
478
- if (fontKey === null)
479
- throw new Error("The parameter 'fontKey' cannot be null.");
480
- else if (fontKey !== undefined)
478
+ if (fontKey !== undefined && fontKey !== null)
481
479
  url_ += "fontKey=" + encodeURIComponent("" + fontKey) + "&";
482
480
  url_ = url_.replace(/[?&]$/, "");
483
481
  let options_ = {
@@ -850,77 +848,41 @@ class DesignAtomsCompatibilityApiClient extends ApiClientBase {
850
848
  if (tenantId === undefined || tenantId === null)
851
849
  throw new Error("The parameter 'tenantId' must be defined.");
852
850
  url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
853
- if (f === null)
854
- throw new Error("The parameter 'f' cannot be null.");
855
- else if (f !== undefined)
851
+ if (f !== undefined && f !== null)
856
852
  url_ += "f=" + encodeURIComponent("" + f) + "&";
857
- if (w === null)
858
- throw new Error("The parameter 'w' cannot be null.");
859
- else if (w !== undefined)
853
+ if (w !== undefined && w !== null)
860
854
  url_ += "w=" + encodeURIComponent("" + w) + "&";
861
- if (h === null)
862
- throw new Error("The parameter 'h' cannot be null.");
863
- else if (h !== undefined)
855
+ if (h !== undefined && h !== null)
864
856
  url_ += "h=" + encodeURIComponent("" + h) + "&";
865
- if (cmyk === null)
866
- throw new Error("The parameter 'cmyk' cannot be null.");
867
- else if (cmyk !== undefined)
857
+ if (cmyk !== undefined && cmyk !== null)
868
858
  url_ += "cmyk=" + encodeURIComponent("" + cmyk) + "&";
869
- if (rgb === null)
870
- throw new Error("The parameter 'rgb' cannot be null.");
871
- else if (rgb !== undefined)
859
+ if (rgb !== undefined && rgb !== null)
872
860
  url_ += "rgb=" + encodeURIComponent("" + rgb) + "&";
873
- if (grayscale === null)
874
- throw new Error("The parameter 'grayscale' cannot be null.");
875
- else if (grayscale !== undefined)
861
+ if (grayscale !== undefined && grayscale !== null)
876
862
  url_ += "grayscale=" + encodeURIComponent("" + grayscale) + "&";
877
- if (target === null)
878
- throw new Error("The parameter 'target' cannot be null.");
879
- else if (target !== undefined)
863
+ if (target !== undefined && target !== null)
880
864
  url_ += "target=" + encodeURIComponent("" + target) + "&";
881
- if (sq === null)
882
- throw new Error("The parameter 'sq' cannot be null.");
883
- else if (sq !== undefined)
865
+ if (sq !== undefined && sq !== null)
884
866
  url_ += "sq=" + encodeURIComponent("" + sq) + "&";
885
- if (effect === null)
886
- throw new Error("The parameter 'effect' cannot be null.");
887
- else if (effect !== undefined)
867
+ if (effect !== undefined && effect !== null)
888
868
  url_ += "effect=" + encodeURIComponent("" + effect) + "&";
889
- if (kp === null)
890
- throw new Error("The parameter 'kp' cannot be null.");
891
- else if (kp !== undefined)
869
+ if (kp !== undefined && kp !== null)
892
870
  url_ += "kp=" + encodeURIComponent("" + kp) + "&";
893
- if (color === null)
894
- throw new Error("The parameter 'color' cannot be null.");
895
- else if (color !== undefined)
871
+ if (color !== undefined && color !== null)
896
872
  url_ += "color=" + encodeURIComponent("" + color) + "&";
897
- if (obm === null)
898
- throw new Error("The parameter 'obm' cannot be null.");
899
- else if (obm !== undefined)
873
+ if (obm !== undefined && obm !== null)
900
874
  url_ += "obm=" + encodeURIComponent("" + obm) + "&";
901
- if (oo === null)
902
- throw new Error("The parameter 'oo' cannot be null.");
903
- else if (oo !== undefined)
875
+ if (oo !== undefined && oo !== null)
904
876
  url_ += "oo=" + encodeURIComponent("" + oo) + "&";
905
- if (alphaMask === null)
906
- throw new Error("The parameter 'alphaMask' cannot be null.");
907
- else if (alphaMask !== undefined)
877
+ if (alphaMask !== undefined && alphaMask !== null)
908
878
  url_ += "alphaMask=" + encodeURIComponent("" + alphaMask) + "&";
909
- if (page === null)
910
- throw new Error("The parameter 'page' cannot be null.");
911
- else if (page !== undefined)
879
+ if (page !== undefined && page !== null)
912
880
  url_ += "page=" + encodeURIComponent("" + page) + "&";
913
- if (colorizeColor === null)
914
- throw new Error("The parameter 'colorizeColor' cannot be null.");
915
- else if (colorizeColor !== undefined)
881
+ if (colorizeColor !== undefined && colorizeColor !== null)
916
882
  url_ += "colorizeColor=" + encodeURIComponent("" + colorizeColor) + "&";
917
- if (rw === null)
918
- throw new Error("The parameter 'rw' cannot be null.");
919
- else if (rw !== undefined)
883
+ if (rw !== undefined && rw !== null)
920
884
  url_ += "rw=" + encodeURIComponent("" + rw) + "&";
921
- if (rh === null)
922
- throw new Error("The parameter 'rh' cannot be null.");
923
- else if (rh !== undefined)
885
+ if (rh !== undefined && rh !== null)
924
886
  url_ += "rh=" + encodeURIComponent("" + rh) + "&";
925
887
  url_ = url_.replace(/[?&]$/, "");
926
888
  let options_ = {
@@ -1068,9 +1030,7 @@ class DesignAtomsCompatibilityApiClient extends ApiClientBase {
1068
1030
  if (tenantId === undefined || tenantId === null)
1069
1031
  throw new Error("The parameter 'tenantId' must be defined.");
1070
1032
  url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
1071
- if (f === null)
1072
- throw new Error("The parameter 'f' cannot be null.");
1073
- else if (f !== undefined)
1033
+ if (f !== undefined && f !== null)
1074
1034
  url_ += "f=" + encodeURIComponent("" + f) + "&";
1075
1035
  url_ = url_.replace(/[?&]$/, "");
1076
1036
  let options_ = {
@@ -1151,9 +1111,7 @@ class DesignAtomsCompatibilityApiClient extends ApiClientBase {
1151
1111
  if (tenantId === undefined || tenantId === null)
1152
1112
  throw new Error("The parameter 'tenantId' must be defined.");
1153
1113
  url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
1154
- if (image === null)
1155
- throw new Error("The parameter 'image' cannot be null.");
1156
- else if (image !== undefined)
1114
+ if (image !== undefined && image !== null)
1157
1115
  url_ += "image=" + encodeURIComponent("" + image) + "&";
1158
1116
  url_ = url_.replace(/[?&]$/, "");
1159
1117
  let options_ = {
@@ -1246,77 +1204,41 @@ class DesignAtomsCompatibilityApiClient extends ApiClientBase {
1246
1204
  if (tenantId === undefined || tenantId === null)
1247
1205
  throw new Error("The parameter 'tenantId' must be defined.");
1248
1206
  url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
1249
- if (f === null)
1250
- throw new Error("The parameter 'f' cannot be null.");
1251
- else if (f !== undefined)
1207
+ if (f !== undefined && f !== null)
1252
1208
  url_ += "f=" + encodeURIComponent("" + f) + "&";
1253
- if (w === null)
1254
- throw new Error("The parameter 'w' cannot be null.");
1255
- else if (w !== undefined)
1209
+ if (w !== undefined && w !== null)
1256
1210
  url_ += "w=" + encodeURIComponent("" + w) + "&";
1257
- if (h === null)
1258
- throw new Error("The parameter 'h' cannot be null.");
1259
- else if (h !== undefined)
1211
+ if (h !== undefined && h !== null)
1260
1212
  url_ += "h=" + encodeURIComponent("" + h) + "&";
1261
- if (cmyk === null)
1262
- throw new Error("The parameter 'cmyk' cannot be null.");
1263
- else if (cmyk !== undefined)
1213
+ if (cmyk !== undefined && cmyk !== null)
1264
1214
  url_ += "cmyk=" + encodeURIComponent("" + cmyk) + "&";
1265
- if (rgb === null)
1266
- throw new Error("The parameter 'rgb' cannot be null.");
1267
- else if (rgb !== undefined)
1215
+ if (rgb !== undefined && rgb !== null)
1268
1216
  url_ += "rgb=" + encodeURIComponent("" + rgb) + "&";
1269
- if (grayscale === null)
1270
- throw new Error("The parameter 'grayscale' cannot be null.");
1271
- else if (grayscale !== undefined)
1217
+ if (grayscale !== undefined && grayscale !== null)
1272
1218
  url_ += "grayscale=" + encodeURIComponent("" + grayscale) + "&";
1273
- if (target === null)
1274
- throw new Error("The parameter 'target' cannot be null.");
1275
- else if (target !== undefined)
1219
+ if (target !== undefined && target !== null)
1276
1220
  url_ += "target=" + encodeURIComponent("" + target) + "&";
1277
- if (sq === null)
1278
- throw new Error("The parameter 'sq' cannot be null.");
1279
- else if (sq !== undefined)
1221
+ if (sq !== undefined && sq !== null)
1280
1222
  url_ += "sq=" + encodeURIComponent("" + sq) + "&";
1281
- if (effect === null)
1282
- throw new Error("The parameter 'effect' cannot be null.");
1283
- else if (effect !== undefined)
1223
+ if (effect !== undefined && effect !== null)
1284
1224
  url_ += "effect=" + encodeURIComponent("" + effect) + "&";
1285
- if (kp === null)
1286
- throw new Error("The parameter 'kp' cannot be null.");
1287
- else if (kp !== undefined)
1225
+ if (kp !== undefined && kp !== null)
1288
1226
  url_ += "kp=" + encodeURIComponent("" + kp) + "&";
1289
- if (color === null)
1290
- throw new Error("The parameter 'color' cannot be null.");
1291
- else if (color !== undefined)
1227
+ if (color !== undefined && color !== null)
1292
1228
  url_ += "color=" + encodeURIComponent("" + color) + "&";
1293
- if (obm === null)
1294
- throw new Error("The parameter 'obm' cannot be null.");
1295
- else if (obm !== undefined)
1229
+ if (obm !== undefined && obm !== null)
1296
1230
  url_ += "obm=" + encodeURIComponent("" + obm) + "&";
1297
- if (oo === null)
1298
- throw new Error("The parameter 'oo' cannot be null.");
1299
- else if (oo !== undefined)
1231
+ if (oo !== undefined && oo !== null)
1300
1232
  url_ += "oo=" + encodeURIComponent("" + oo) + "&";
1301
- if (alphaMask === null)
1302
- throw new Error("The parameter 'alphaMask' cannot be null.");
1303
- else if (alphaMask !== undefined)
1233
+ if (alphaMask !== undefined && alphaMask !== null)
1304
1234
  url_ += "alphaMask=" + encodeURIComponent("" + alphaMask) + "&";
1305
- if (page === null)
1306
- throw new Error("The parameter 'page' cannot be null.");
1307
- else if (page !== undefined)
1235
+ if (page !== undefined && page !== null)
1308
1236
  url_ += "page=" + encodeURIComponent("" + page) + "&";
1309
- if (colorizeColor === null)
1310
- throw new Error("The parameter 'colorizeColor' cannot be null.");
1311
- else if (colorizeColor !== undefined)
1237
+ if (colorizeColor !== undefined && colorizeColor !== null)
1312
1238
  url_ += "colorizeColor=" + encodeURIComponent("" + colorizeColor) + "&";
1313
- if (rw === null)
1314
- throw new Error("The parameter 'rw' cannot be null.");
1315
- else if (rw !== undefined)
1239
+ if (rw !== undefined && rw !== null)
1316
1240
  url_ += "rw=" + encodeURIComponent("" + rw) + "&";
1317
- if (rh === null)
1318
- throw new Error("The parameter 'rh' cannot be null.");
1319
- else if (rh !== undefined)
1241
+ if (rh !== undefined && rh !== null)
1320
1242
  url_ += "rh=" + encodeURIComponent("" + rh) + "&";
1321
1243
  url_ = url_.replace(/[?&]$/, "");
1322
1244
  let options_ = {
@@ -1397,9 +1319,7 @@ class DesignAtomsCompatibilityApiClient extends ApiClientBase {
1397
1319
  if (tenantId === undefined || tenantId === null)
1398
1320
  throw new Error("The parameter 'tenantId' must be defined.");
1399
1321
  url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
1400
- if (f === null)
1401
- throw new Error("The parameter 'f' cannot be null.");
1402
- else if (f !== undefined)
1322
+ if (f !== undefined && f !== null)
1403
1323
  url_ += "f=" + encodeURIComponent("" + f) + "&";
1404
1324
  url_ = url_.replace(/[?&]$/, "");
1405
1325
  let options_ = {
@@ -2272,7 +2192,7 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
2272
2192
  this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
2273
2193
  }
2274
2194
  /**
2275
- * Renders a web image preview with the specified parameters.
2195
+ * Renders a preview of an image with the specified parameters.
2276
2196
  * @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied
2277
2197
  (default value is 'false').
2278
2198
  * @param tenantId (optional) Tenant identifier
@@ -2281,9 +2201,7 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
2281
2201
  */
2282
2202
  renderImagePreview(attachment, tenantId, body) {
2283
2203
  let url_ = this.baseUrl + "/api/atoms/v1/images/render-preview?";
2284
- if (attachment === null)
2285
- throw new Error("The parameter 'attachment' cannot be null.");
2286
- else if (attachment !== undefined)
2204
+ if (attachment !== undefined && attachment !== null)
2287
2205
  url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
2288
2206
  if (tenantId === null)
2289
2207
  throw new Error("The parameter 'tenantId' cannot be null.");
@@ -2351,36 +2269,699 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
2351
2269
  return of(null);
2352
2270
  }
2353
2271
  /**
2354
- * Renders a web image preview with the specified parameters and saves rendering result as resource.
2272
+ * Renders a preview of an uploaded image with the specified parameters.
2273
+ * @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied
2274
+ (default value is 'false').
2275
+ * @param tenantId (optional) Tenant identifier
2276
+ * @param sourceFile (optional)
2277
+ * @param mockupOwnerId (optional)
2278
+ * @param mockupId (optional)
2279
+ * @param width (optional)
2280
+ * @param height (optional)
2281
+ * @param fileFormat (optional)
2282
+ * @param fitMode (optional)
2283
+ * @return Success
2284
+ */
2285
+ renderImagePreviewFromFile(attachment, tenantId, sourceFile, mockupOwnerId, mockupId, width, height, fileFormat, fitMode) {
2286
+ let url_ = this.baseUrl + "/api/atoms/v1/images/render-preview/from-file?";
2287
+ if (attachment !== undefined && attachment !== null)
2288
+ url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
2289
+ if (tenantId === null)
2290
+ throw new Error("The parameter 'tenantId' cannot be null.");
2291
+ else if (tenantId !== undefined)
2292
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2293
+ url_ = url_.replace(/[?&]$/, "");
2294
+ const content_ = new FormData();
2295
+ if (sourceFile !== null && sourceFile !== undefined)
2296
+ content_.append("sourceFile", sourceFile.data, sourceFile.fileName ? sourceFile.fileName : "sourceFile");
2297
+ if (mockupOwnerId !== null && mockupOwnerId !== undefined)
2298
+ content_.append("mockupOwnerId", mockupOwnerId.toString());
2299
+ if (mockupId !== null && mockupId !== undefined)
2300
+ content_.append("mockupId", mockupId.toString());
2301
+ if (width !== null && width !== undefined)
2302
+ content_.append("width", width.toString());
2303
+ if (height !== null && height !== undefined)
2304
+ content_.append("height", height.toString());
2305
+ if (fileFormat !== null && fileFormat !== undefined)
2306
+ content_.append("fileFormat", fileFormat.toString());
2307
+ if (fitMode !== null && fitMode !== undefined)
2308
+ content_.append("fitMode", fitMode.toString());
2309
+ let options_ = {
2310
+ body: content_,
2311
+ observe: "response",
2312
+ responseType: "blob",
2313
+ headers: new HttpHeaders({
2314
+ "Accept": "application/octet-stream"
2315
+ })
2316
+ };
2317
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2318
+ return this.http.request("post", url_, transformedOptions_);
2319
+ })).pipe(mergeMap((response_) => {
2320
+ return this.transformResult(url_, response_, (r) => this.processRenderImagePreviewFromFile(r));
2321
+ })).pipe(catchError((response_) => {
2322
+ if (response_ instanceof HttpResponseBase) {
2323
+ try {
2324
+ return this.transformResult(url_, response_, (r) => this.processRenderImagePreviewFromFile(r));
2325
+ }
2326
+ catch (e) {
2327
+ return throwError(e);
2328
+ }
2329
+ }
2330
+ else
2331
+ return throwError(response_);
2332
+ }));
2333
+ }
2334
+ processRenderImagePreviewFromFile(response) {
2335
+ const status = response.status;
2336
+ const responseBlob = response instanceof HttpResponse ? response.body :
2337
+ response.error instanceof Blob ? response.error : undefined;
2338
+ let _headers = {};
2339
+ if (response.headers) {
2340
+ for (let key of response.headers.keys()) {
2341
+ _headers[key] = response.headers.get(key);
2342
+ }
2343
+ }
2344
+ if (status === 200 || status === 206) {
2345
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
2346
+ const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
2347
+ const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
2348
+ return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
2349
+ }
2350
+ else if (status === 401) {
2351
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2352
+ return throwException("Unauthorized", status, _responseText, _headers);
2353
+ }));
2354
+ }
2355
+ else if (status === 403) {
2356
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2357
+ return throwException("Forbidden", status, _responseText, _headers);
2358
+ }));
2359
+ }
2360
+ else if (status !== 200 && status !== 204) {
2361
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2362
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2363
+ }));
2364
+ }
2365
+ return of(null);
2366
+ }
2367
+ /**
2368
+ * Renders a preview of an uploaded image with the specified parameters and saves rendering result as resource.
2369
+ * @param tenantId (optional) Tenant identifier
2370
+ * @param resourceOwnerId (optional)
2371
+ * @param resourceNamespace (optional)
2372
+ * @param resourceName (optional)
2373
+ * @param resourceSourceId (optional)
2374
+ * @param resourceType (optional)
2375
+ * @param anonymousAccess (optional)
2376
+ * @param overwriteExistingResource (optional)
2377
+ * @param sourceFile (optional)
2378
+ * @param mockupOwnerId (optional)
2379
+ * @param mockupId (optional)
2380
+ * @param width (optional)
2381
+ * @param height (optional)
2382
+ * @param fileFormat (optional)
2383
+ * @param fitMode (optional)
2384
+ * @return Success
2385
+ */
2386
+ renderImagePreviewFromFileToResource(tenantId, resourceOwnerId, resourceNamespace, resourceName, resourceSourceId, resourceType, anonymousAccess, overwriteExistingResource, sourceFile, mockupOwnerId, mockupId, width, height, fileFormat, fitMode) {
2387
+ let url_ = this.baseUrl + "/api/atoms/v1/images/render-preview/from-file/to-resource?";
2388
+ if (tenantId === null)
2389
+ throw new Error("The parameter 'tenantId' cannot be null.");
2390
+ else if (tenantId !== undefined)
2391
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2392
+ url_ = url_.replace(/[?&]$/, "");
2393
+ const content_ = new FormData();
2394
+ if (resourceOwnerId !== null && resourceOwnerId !== undefined)
2395
+ content_.append("resourceOwnerId", resourceOwnerId.toString());
2396
+ if (resourceNamespace !== null && resourceNamespace !== undefined)
2397
+ content_.append("resourceNamespace", resourceNamespace.toString());
2398
+ if (resourceName !== null && resourceName !== undefined)
2399
+ content_.append("resourceName", resourceName.toString());
2400
+ if (resourceSourceId !== null && resourceSourceId !== undefined)
2401
+ content_.append("resourceSourceId", resourceSourceId.toString());
2402
+ if (resourceType !== null && resourceType !== undefined)
2403
+ content_.append("resourceType", resourceType.toString());
2404
+ if (anonymousAccess === null || anonymousAccess === undefined)
2405
+ throw new Error("The parameter 'anonymousAccess' cannot be null.");
2406
+ else
2407
+ content_.append("anonymousAccess", anonymousAccess.toString());
2408
+ if (overwriteExistingResource === null || overwriteExistingResource === undefined)
2409
+ throw new Error("The parameter 'overwriteExistingResource' cannot be null.");
2410
+ else
2411
+ content_.append("overwriteExistingResource", overwriteExistingResource.toString());
2412
+ if (sourceFile !== null && sourceFile !== undefined)
2413
+ content_.append("sourceFile", sourceFile.data, sourceFile.fileName ? sourceFile.fileName : "sourceFile");
2414
+ if (mockupOwnerId !== null && mockupOwnerId !== undefined)
2415
+ content_.append("mockupOwnerId", mockupOwnerId.toString());
2416
+ if (mockupId !== null && mockupId !== undefined)
2417
+ content_.append("mockupId", mockupId.toString());
2418
+ if (width !== null && width !== undefined)
2419
+ content_.append("width", width.toString());
2420
+ if (height !== null && height !== undefined)
2421
+ content_.append("height", height.toString());
2422
+ if (fileFormat !== null && fileFormat !== undefined)
2423
+ content_.append("fileFormat", fileFormat.toString());
2424
+ if (fitMode !== null && fitMode !== undefined)
2425
+ content_.append("fitMode", fitMode.toString());
2426
+ let options_ = {
2427
+ body: content_,
2428
+ observe: "response",
2429
+ responseType: "blob",
2430
+ headers: new HttpHeaders({
2431
+ "Accept": "application/json"
2432
+ })
2433
+ };
2434
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2435
+ return this.http.request("post", url_, transformedOptions_);
2436
+ })).pipe(mergeMap((response_) => {
2437
+ return this.transformResult(url_, response_, (r) => this.processRenderImagePreviewFromFileToResource(r));
2438
+ })).pipe(catchError((response_) => {
2439
+ if (response_ instanceof HttpResponseBase) {
2440
+ try {
2441
+ return this.transformResult(url_, response_, (r) => this.processRenderImagePreviewFromFileToResource(r));
2442
+ }
2443
+ catch (e) {
2444
+ return throwError(e);
2445
+ }
2446
+ }
2447
+ else
2448
+ return throwError(response_);
2449
+ }));
2450
+ }
2451
+ processRenderImagePreviewFromFileToResource(response) {
2452
+ const status = response.status;
2453
+ const responseBlob = response instanceof HttpResponse ? response.body :
2454
+ response.error instanceof Blob ? response.error : undefined;
2455
+ let _headers = {};
2456
+ if (response.headers) {
2457
+ for (let key of response.headers.keys()) {
2458
+ _headers[key] = response.headers.get(key);
2459
+ }
2460
+ }
2461
+ if (status === 200) {
2462
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2463
+ let result200 = null;
2464
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2465
+ return of(result200);
2466
+ }));
2467
+ }
2468
+ else if (status === 409) {
2469
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2470
+ let result409 = null;
2471
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2472
+ return throwException("Conflict", status, _responseText, _headers, result409);
2473
+ }));
2474
+ }
2475
+ else if (status === 401) {
2476
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2477
+ return throwException("Unauthorized", status, _responseText, _headers);
2478
+ }));
2479
+ }
2480
+ else if (status === 403) {
2481
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2482
+ return throwException("Forbidden", status, _responseText, _headers);
2483
+ }));
2484
+ }
2485
+ else if (status !== 200 && status !== 204) {
2486
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2487
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2488
+ }));
2489
+ }
2490
+ return of(null);
2491
+ }
2492
+ /**
2493
+ * Renders a preview of a web image with the specified parameters.
2494
+ * @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied
2495
+ (default value is 'false').
2496
+ * @param tenantId (optional) Tenant identifier
2497
+ * @param body (optional) Render model with preview parameters.
2498
+ * @return Success
2499
+ */
2500
+ renderImagePreviewFromUrl(attachment, tenantId, body) {
2501
+ let url_ = this.baseUrl + "/api/atoms/v1/images/render-preview/from-url?";
2502
+ if (attachment !== undefined && attachment !== null)
2503
+ url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
2504
+ if (tenantId === null)
2505
+ throw new Error("The parameter 'tenantId' cannot be null.");
2506
+ else if (tenantId !== undefined)
2507
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2508
+ url_ = url_.replace(/[?&]$/, "");
2509
+ const content_ = JSON.stringify(body);
2510
+ let options_ = {
2511
+ body: content_,
2512
+ observe: "response",
2513
+ responseType: "blob",
2514
+ headers: new HttpHeaders({
2515
+ "Content-Type": "application/json",
2516
+ "Accept": "application/octet-stream"
2517
+ })
2518
+ };
2519
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2520
+ return this.http.request("post", url_, transformedOptions_);
2521
+ })).pipe(mergeMap((response_) => {
2522
+ return this.transformResult(url_, response_, (r) => this.processRenderImagePreviewFromUrl(r));
2523
+ })).pipe(catchError((response_) => {
2524
+ if (response_ instanceof HttpResponseBase) {
2525
+ try {
2526
+ return this.transformResult(url_, response_, (r) => this.processRenderImagePreviewFromUrl(r));
2527
+ }
2528
+ catch (e) {
2529
+ return throwError(e);
2530
+ }
2531
+ }
2532
+ else
2533
+ return throwError(response_);
2534
+ }));
2535
+ }
2536
+ processRenderImagePreviewFromUrl(response) {
2537
+ const status = response.status;
2538
+ const responseBlob = response instanceof HttpResponse ? response.body :
2539
+ response.error instanceof Blob ? response.error : undefined;
2540
+ let _headers = {};
2541
+ if (response.headers) {
2542
+ for (let key of response.headers.keys()) {
2543
+ _headers[key] = response.headers.get(key);
2544
+ }
2545
+ }
2546
+ if (status === 200 || status === 206) {
2547
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
2548
+ const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
2549
+ const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
2550
+ return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
2551
+ }
2552
+ else if (status === 401) {
2553
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2554
+ return throwException("Unauthorized", status, _responseText, _headers);
2555
+ }));
2556
+ }
2557
+ else if (status === 403) {
2558
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2559
+ return throwException("Forbidden", status, _responseText, _headers);
2560
+ }));
2561
+ }
2562
+ else if (status !== 200 && status !== 204) {
2563
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2564
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2565
+ }));
2566
+ }
2567
+ return of(null);
2568
+ }
2569
+ /**
2570
+ * Renders a preview of a web image with the specified parameters and saves rendering result as resource.
2571
+ * @param tenantId (optional) Tenant identifier
2572
+ * @param body (optional) Render model with preview parameters.
2573
+ * @return Success
2574
+ */
2575
+ renderImagePreviewFromUrlToResource(tenantId, body) {
2576
+ let url_ = this.baseUrl + "/api/atoms/v1/images/render-preview/from-url/to-resource?";
2577
+ if (tenantId === null)
2578
+ throw new Error("The parameter 'tenantId' cannot be null.");
2579
+ else if (tenantId !== undefined)
2580
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2581
+ url_ = url_.replace(/[?&]$/, "");
2582
+ const content_ = JSON.stringify(body);
2583
+ let options_ = {
2584
+ body: content_,
2585
+ observe: "response",
2586
+ responseType: "blob",
2587
+ headers: new HttpHeaders({
2588
+ "Content-Type": "application/json",
2589
+ "Accept": "application/json"
2590
+ })
2591
+ };
2592
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2593
+ return this.http.request("post", url_, transformedOptions_);
2594
+ })).pipe(mergeMap((response_) => {
2595
+ return this.transformResult(url_, response_, (r) => this.processRenderImagePreviewFromUrlToResource(r));
2596
+ })).pipe(catchError((response_) => {
2597
+ if (response_ instanceof HttpResponseBase) {
2598
+ try {
2599
+ return this.transformResult(url_, response_, (r) => this.processRenderImagePreviewFromUrlToResource(r));
2600
+ }
2601
+ catch (e) {
2602
+ return throwError(e);
2603
+ }
2604
+ }
2605
+ else
2606
+ return throwError(response_);
2607
+ }));
2608
+ }
2609
+ processRenderImagePreviewFromUrlToResource(response) {
2610
+ const status = response.status;
2611
+ const responseBlob = response instanceof HttpResponse ? response.body :
2612
+ response.error instanceof Blob ? response.error : undefined;
2613
+ let _headers = {};
2614
+ if (response.headers) {
2615
+ for (let key of response.headers.keys()) {
2616
+ _headers[key] = response.headers.get(key);
2617
+ }
2618
+ }
2619
+ if (status === 200) {
2620
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2621
+ let result200 = null;
2622
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2623
+ return of(result200);
2624
+ }));
2625
+ }
2626
+ else if (status === 409) {
2627
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2628
+ let result409 = null;
2629
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2630
+ return throwException("Conflict", status, _responseText, _headers, result409);
2631
+ }));
2632
+ }
2633
+ else if (status === 401) {
2634
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2635
+ return throwException("Unauthorized", status, _responseText, _headers);
2636
+ }));
2637
+ }
2638
+ else if (status === 403) {
2639
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2640
+ return throwException("Forbidden", status, _responseText, _headers);
2641
+ }));
2642
+ }
2643
+ else if (status !== 200 && status !== 204) {
2644
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2645
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2646
+ }));
2647
+ }
2648
+ return of(null);
2649
+ }
2650
+ /**
2651
+ * Renders a preview of an image with the specified parameters and saves rendering result as resource.
2652
+ * @param tenantId (optional) Tenant identifier
2653
+ * @param body (optional) Render model with preview parameters.
2654
+ * @return Success
2655
+ */
2656
+ renderImagePreviewToResource(tenantId, body) {
2657
+ let url_ = this.baseUrl + "/api/atoms/v1/images/render-preview/to-resource?";
2658
+ if (tenantId === null)
2659
+ throw new Error("The parameter 'tenantId' cannot be null.");
2660
+ else if (tenantId !== undefined)
2661
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2662
+ url_ = url_.replace(/[?&]$/, "");
2663
+ const content_ = JSON.stringify(body);
2664
+ let options_ = {
2665
+ body: content_,
2666
+ observe: "response",
2667
+ responseType: "blob",
2668
+ headers: new HttpHeaders({
2669
+ "Content-Type": "application/json",
2670
+ "Accept": "application/json"
2671
+ })
2672
+ };
2673
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2674
+ return this.http.request("post", url_, transformedOptions_);
2675
+ })).pipe(mergeMap((response_) => {
2676
+ return this.transformResult(url_, response_, (r) => this.processRenderImagePreviewToResource(r));
2677
+ })).pipe(catchError((response_) => {
2678
+ if (response_ instanceof HttpResponseBase) {
2679
+ try {
2680
+ return this.transformResult(url_, response_, (r) => this.processRenderImagePreviewToResource(r));
2681
+ }
2682
+ catch (e) {
2683
+ return throwError(e);
2684
+ }
2685
+ }
2686
+ else
2687
+ return throwError(response_);
2688
+ }));
2689
+ }
2690
+ processRenderImagePreviewToResource(response) {
2691
+ const status = response.status;
2692
+ const responseBlob = response instanceof HttpResponse ? response.body :
2693
+ response.error instanceof Blob ? response.error : undefined;
2694
+ let _headers = {};
2695
+ if (response.headers) {
2696
+ for (let key of response.headers.keys()) {
2697
+ _headers[key] = response.headers.get(key);
2698
+ }
2699
+ }
2700
+ if (status === 200) {
2701
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2702
+ let result200 = null;
2703
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2704
+ return of(result200);
2705
+ }));
2706
+ }
2707
+ else if (status === 409) {
2708
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2709
+ let result409 = null;
2710
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2711
+ return throwException("Conflict", status, _responseText, _headers, result409);
2712
+ }));
2713
+ }
2714
+ else if (status === 401) {
2715
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2716
+ return throwException("Unauthorized", status, _responseText, _headers);
2717
+ }));
2718
+ }
2719
+ else if (status === 403) {
2720
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2721
+ return throwException("Forbidden", status, _responseText, _headers);
2722
+ }));
2723
+ }
2724
+ else if (status !== 200 && status !== 204) {
2725
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2726
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2727
+ }));
2728
+ }
2729
+ return of(null);
2730
+ }
2731
+ }
2732
+ DesignAtomsImagesApiClient.ɵprov = ɵɵdefineInjectable({ factory: function DesignAtomsImagesApiClient_Factory() { return new DesignAtomsImagesApiClient(ɵɵinject(ApiClientConfiguration), ɵɵinject(HttpClient), ɵɵinject(API_BASE_URL, 8)); }, token: DesignAtomsImagesApiClient, providedIn: "root" });
2733
+ DesignAtomsImagesApiClient.decorators = [
2734
+ { type: Injectable, args: [{
2735
+ providedIn: 'root'
2736
+ },] }
2737
+ ];
2738
+ DesignAtomsImagesApiClient.ctorParameters = () => [
2739
+ { type: ApiClientConfiguration, decorators: [{ type: Inject, args: [ApiClientConfiguration,] }] },
2740
+ { type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
2741
+ { type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
2742
+ ];
2743
+ class DesignAtomsMockups3dApiClient extends ApiClientBase {
2744
+ constructor(configuration, http, baseUrl) {
2745
+ super(configuration);
2746
+ this.jsonParseReviver = undefined;
2747
+ this.http = http;
2748
+ this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
2749
+ }
2750
+ /**
2751
+ * Returns a 3D-Mockup attributes.
2752
+ * @param id 3D-Mockup identifier.
2753
+ * @param ownerId (optional) Private mockup owner identifier.
2754
+ * @param tenantId (optional) Tenant identifier
2755
+ * @return Success
2756
+ */
2757
+ getAttributes(id, ownerId, tenantId) {
2758
+ let url_ = this.baseUrl + "/api/atoms/v1/mockups-3d/{id}/attributes?";
2759
+ if (id === undefined || id === null)
2760
+ throw new Error("The parameter 'id' must be defined.");
2761
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
2762
+ if (ownerId !== undefined && ownerId !== null)
2763
+ url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
2764
+ if (tenantId === null)
2765
+ throw new Error("The parameter 'tenantId' cannot be null.");
2766
+ else if (tenantId !== undefined)
2767
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2768
+ url_ = url_.replace(/[?&]$/, "");
2769
+ let options_ = {
2770
+ observe: "response",
2771
+ responseType: "blob",
2772
+ headers: new HttpHeaders({
2773
+ "Accept": "application/json"
2774
+ })
2775
+ };
2776
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2777
+ return this.http.request("get", url_, transformedOptions_);
2778
+ })).pipe(mergeMap((response_) => {
2779
+ return this.transformResult(url_, response_, (r) => this.processGetAttributes(r));
2780
+ })).pipe(catchError((response_) => {
2781
+ if (response_ instanceof HttpResponseBase) {
2782
+ try {
2783
+ return this.transformResult(url_, response_, (r) => this.processGetAttributes(r));
2784
+ }
2785
+ catch (e) {
2786
+ return throwError(e);
2787
+ }
2788
+ }
2789
+ else
2790
+ return throwError(response_);
2791
+ }));
2792
+ }
2793
+ processGetAttributes(response) {
2794
+ const status = response.status;
2795
+ const responseBlob = response instanceof HttpResponse ? response.body :
2796
+ response.error instanceof Blob ? response.error : undefined;
2797
+ let _headers = {};
2798
+ if (response.headers) {
2799
+ for (let key of response.headers.keys()) {
2800
+ _headers[key] = response.headers.get(key);
2801
+ }
2802
+ }
2803
+ if (status === 200) {
2804
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2805
+ let result200 = null;
2806
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2807
+ return of(result200);
2808
+ }));
2809
+ }
2810
+ else if (status === 404) {
2811
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2812
+ let result404 = null;
2813
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2814
+ return throwException("Not Found", status, _responseText, _headers, result404);
2815
+ }));
2816
+ }
2817
+ else if (status === 422) {
2818
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2819
+ let result422 = null;
2820
+ result422 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2821
+ return throwException("Client Error", status, _responseText, _headers, result422);
2822
+ }));
2823
+ }
2824
+ else if (status === 401) {
2825
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2826
+ return throwException("Unauthorized", status, _responseText, _headers);
2827
+ }));
2828
+ }
2829
+ else if (status === 403) {
2830
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2831
+ return throwException("Forbidden", status, _responseText, _headers);
2832
+ }));
2833
+ }
2834
+ else if (status !== 200 && status !== 204) {
2835
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2836
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2837
+ }));
2838
+ }
2839
+ return of(null);
2840
+ }
2841
+ /**
2842
+ * Returns a 3D-Mockup content as protobuf binary stream.
2843
+ * @param id 3D-Mockup identifier.
2844
+ * @param ownerId (optional) Private mockup owner identifier.
2845
+ * @param tenantId (optional) Tenant identifier
2846
+ * @return Success
2847
+ */
2848
+ getContentAsProtobuf(id, ownerId, tenantId) {
2849
+ let url_ = this.baseUrl + "/api/atoms/v1/mockups-3d/{id}/content/as-protobuf?";
2850
+ if (id === undefined || id === null)
2851
+ throw new Error("The parameter 'id' must be defined.");
2852
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
2853
+ if (ownerId !== undefined && ownerId !== null)
2854
+ url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
2855
+ if (tenantId === null)
2856
+ throw new Error("The parameter 'tenantId' cannot be null.");
2857
+ else if (tenantId !== undefined)
2858
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2859
+ url_ = url_.replace(/[?&]$/, "");
2860
+ let options_ = {
2861
+ observe: "response",
2862
+ responseType: "blob",
2863
+ headers: new HttpHeaders({
2864
+ "Accept": "application/json"
2865
+ })
2866
+ };
2867
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2868
+ return this.http.request("get", url_, transformedOptions_);
2869
+ })).pipe(mergeMap((response_) => {
2870
+ return this.transformResult(url_, response_, (r) => this.processGetContentAsProtobuf(r));
2871
+ })).pipe(catchError((response_) => {
2872
+ if (response_ instanceof HttpResponseBase) {
2873
+ try {
2874
+ return this.transformResult(url_, response_, (r) => this.processGetContentAsProtobuf(r));
2875
+ }
2876
+ catch (e) {
2877
+ return throwError(e);
2878
+ }
2879
+ }
2880
+ else
2881
+ return throwError(response_);
2882
+ }));
2883
+ }
2884
+ processGetContentAsProtobuf(response) {
2885
+ const status = response.status;
2886
+ const responseBlob = response instanceof HttpResponse ? response.body :
2887
+ response.error instanceof Blob ? response.error : undefined;
2888
+ let _headers = {};
2889
+ if (response.headers) {
2890
+ for (let key of response.headers.keys()) {
2891
+ _headers[key] = response.headers.get(key);
2892
+ }
2893
+ }
2894
+ if (status === 200 || status === 206) {
2895
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
2896
+ const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
2897
+ const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
2898
+ return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
2899
+ }
2900
+ else if (status === 404) {
2901
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2902
+ let result404 = null;
2903
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2904
+ return throwException("Not Found", status, _responseText, _headers, result404);
2905
+ }));
2906
+ }
2907
+ else if (status === 422) {
2908
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2909
+ let result422 = null;
2910
+ result422 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2911
+ return throwException("Client Error", status, _responseText, _headers, result422);
2912
+ }));
2913
+ }
2914
+ else if (status === 401) {
2915
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2916
+ return throwException("Unauthorized", status, _responseText, _headers);
2917
+ }));
2918
+ }
2919
+ else if (status === 403) {
2920
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2921
+ return throwException("Forbidden", status, _responseText, _headers);
2922
+ }));
2923
+ }
2924
+ else if (status !== 200 && status !== 204) {
2925
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2926
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2927
+ }));
2928
+ }
2929
+ return of(null);
2930
+ }
2931
+ /**
2932
+ * Returns a 3D-Mockup geometry as binary stream.
2933
+ * @param id 3D-Mockup identifier.
2934
+ * @param ownerId (optional) Private mockup owner identifier.
2355
2935
  * @param tenantId (optional) Tenant identifier
2356
- * @param body (optional) Render model with preview parameters.
2357
2936
  * @return Success
2358
2937
  */
2359
- renderImagePreviewToResource(tenantId, body) {
2360
- let url_ = this.baseUrl + "/api/atoms/v1/images/render-preview/to-resource?";
2938
+ getGeometryFile(id, ownerId, tenantId) {
2939
+ let url_ = this.baseUrl + "/api/atoms/v1/mockups-3d/{id}/geometry/file?";
2940
+ if (id === undefined || id === null)
2941
+ throw new Error("The parameter 'id' must be defined.");
2942
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
2943
+ if (ownerId !== undefined && ownerId !== null)
2944
+ url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
2361
2945
  if (tenantId === null)
2362
2946
  throw new Error("The parameter 'tenantId' cannot be null.");
2363
2947
  else if (tenantId !== undefined)
2364
2948
  url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2365
2949
  url_ = url_.replace(/[?&]$/, "");
2366
- const content_ = JSON.stringify(body);
2367
2950
  let options_ = {
2368
- body: content_,
2369
2951
  observe: "response",
2370
2952
  responseType: "blob",
2371
2953
  headers: new HttpHeaders({
2372
- "Content-Type": "application/json",
2373
2954
  "Accept": "application/json"
2374
2955
  })
2375
2956
  };
2376
2957
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2377
- return this.http.request("post", url_, transformedOptions_);
2958
+ return this.http.request("get", url_, transformedOptions_);
2378
2959
  })).pipe(mergeMap((response_) => {
2379
- return this.transformResult(url_, response_, (r) => this.processRenderImagePreviewToResource(r));
2960
+ return this.transformResult(url_, response_, (r) => this.processGetGeometryFile(r));
2380
2961
  })).pipe(catchError((response_) => {
2381
2962
  if (response_ instanceof HttpResponseBase) {
2382
2963
  try {
2383
- return this.transformResult(url_, response_, (r) => this.processRenderImagePreviewToResource(r));
2964
+ return this.transformResult(url_, response_, (r) => this.processGetGeometryFile(r));
2384
2965
  }
2385
2966
  catch (e) {
2386
2967
  return throwError(e);
@@ -2390,7 +2971,7 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
2390
2971
  return throwError(response_);
2391
2972
  }));
2392
2973
  }
2393
- processRenderImagePreviewToResource(response) {
2974
+ processGetGeometryFile(response) {
2394
2975
  const status = response.status;
2395
2976
  const responseBlob = response instanceof HttpResponse ? response.body :
2396
2977
  response.error instanceof Blob ? response.error : undefined;
@@ -2400,11 +2981,24 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
2400
2981
  _headers[key] = response.headers.get(key);
2401
2982
  }
2402
2983
  }
2403
- if (status === 200) {
2984
+ if (status === 200 || status === 206) {
2985
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
2986
+ const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
2987
+ const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
2988
+ return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
2989
+ }
2990
+ else if (status === 404) {
2404
2991
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2405
- let result200 = null;
2406
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2407
- return of(result200);
2992
+ let result404 = null;
2993
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2994
+ return throwException("Not Found", status, _responseText, _headers, result404);
2995
+ }));
2996
+ }
2997
+ else if (status === 422) {
2998
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2999
+ let result422 = null;
3000
+ result422 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3001
+ return throwException("Client Error", status, _responseText, _headers, result422);
2408
3002
  }));
2409
3003
  }
2410
3004
  else if (status === 401) {
@@ -2425,18 +3019,18 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
2425
3019
  return of(null);
2426
3020
  }
2427
3021
  }
2428
- DesignAtomsImagesApiClient.ɵprov = ɵɵdefineInjectable({ factory: function DesignAtomsImagesApiClient_Factory() { return new DesignAtomsImagesApiClient(ɵɵinject(ApiClientConfiguration), ɵɵinject(HttpClient), ɵɵinject(API_BASE_URL, 8)); }, token: DesignAtomsImagesApiClient, providedIn: "root" });
2429
- DesignAtomsImagesApiClient.decorators = [
3022
+ DesignAtomsMockups3dApiClient.ɵprov = ɵɵdefineInjectable({ factory: function DesignAtomsMockups3dApiClient_Factory() { return new DesignAtomsMockups3dApiClient(ɵɵinject(ApiClientConfiguration), ɵɵinject(HttpClient), ɵɵinject(API_BASE_URL, 8)); }, token: DesignAtomsMockups3dApiClient, providedIn: "root" });
3023
+ DesignAtomsMockups3dApiClient.decorators = [
2430
3024
  { type: Injectable, args: [{
2431
3025
  providedIn: 'root'
2432
3026
  },] }
2433
3027
  ];
2434
- DesignAtomsImagesApiClient.ctorParameters = () => [
3028
+ DesignAtomsMockups3dApiClient.ctorParameters = () => [
2435
3029
  { type: ApiClientConfiguration, decorators: [{ type: Inject, args: [ApiClientConfiguration,] }] },
2436
3030
  { type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
2437
3031
  { type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
2438
3032
  ];
2439
- class DesignAtomsMockups3dApiClient extends ApiClientBase {
3033
+ class DesignAtomsServiceApiClient extends ApiClientBase {
2440
3034
  constructor(configuration, http, baseUrl) {
2441
3035
  super(configuration);
2442
3036
  this.jsonParseReviver = undefined;
@@ -2444,21 +3038,99 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
2444
3038
  this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
2445
3039
  }
2446
3040
  /**
2447
- * Returns a 3D-Mockup attributes.
2448
- * @param id 3D-Mockup identifier.
2449
- * @param ownerId (optional) Private mockup owner identifier.
3041
+ * Creates new design file with specified parameters and saves it in storage.
3042
+ * @param privateStorageOwner (optional) Private storage owner identifier.
3043
+ * @param tenantId (optional) Tenant identifier
3044
+ * @param body (optional) Design creation parameters.
3045
+ * @return Created
3046
+ */
3047
+ createDesign(privateStorageOwner, tenantId, body) {
3048
+ let url_ = this.baseUrl + "/api/atoms/v1/designs?";
3049
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
3050
+ url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
3051
+ if (tenantId === null)
3052
+ throw new Error("The parameter 'tenantId' cannot be null.");
3053
+ else if (tenantId !== undefined)
3054
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3055
+ url_ = url_.replace(/[?&]$/, "");
3056
+ const content_ = JSON.stringify(body);
3057
+ let options_ = {
3058
+ body: content_,
3059
+ observe: "response",
3060
+ responseType: "blob",
3061
+ headers: new HttpHeaders({
3062
+ "Content-Type": "application/json",
3063
+ "Accept": "application/json"
3064
+ })
3065
+ };
3066
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3067
+ return this.http.request("post", url_, transformedOptions_);
3068
+ })).pipe(mergeMap((response_) => {
3069
+ return this.transformResult(url_, response_, (r) => this.processCreateDesign(r));
3070
+ })).pipe(catchError((response_) => {
3071
+ if (response_ instanceof HttpResponseBase) {
3072
+ try {
3073
+ return this.transformResult(url_, response_, (r) => this.processCreateDesign(r));
3074
+ }
3075
+ catch (e) {
3076
+ return throwError(e);
3077
+ }
3078
+ }
3079
+ else
3080
+ return throwError(response_);
3081
+ }));
3082
+ }
3083
+ processCreateDesign(response) {
3084
+ const status = response.status;
3085
+ const responseBlob = response instanceof HttpResponse ? response.body :
3086
+ response.error instanceof Blob ? response.error : undefined;
3087
+ let _headers = {};
3088
+ if (response.headers) {
3089
+ for (let key of response.headers.keys()) {
3090
+ _headers[key] = response.headers.get(key);
3091
+ }
3092
+ }
3093
+ if (status === 201) {
3094
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3095
+ let result201 = null;
3096
+ result201 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3097
+ return of(result201);
3098
+ }));
3099
+ }
3100
+ else if (status === 401) {
3101
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3102
+ return throwException("Unauthorized", status, _responseText, _headers);
3103
+ }));
3104
+ }
3105
+ else if (status === 403) {
3106
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3107
+ return throwException("Forbidden", status, _responseText, _headers);
3108
+ }));
3109
+ }
3110
+ else if (status !== 200 && status !== 204) {
3111
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3112
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3113
+ }));
3114
+ }
3115
+ return of(null);
3116
+ }
3117
+ /**
3118
+ * Returns content of the background.
3119
+ * @param id Design identifier.
3120
+ * @param surfaceIndex (optional) Surface index.
3121
+ * @param privateStorageOwner (optional) Private storage owner identifier.
2450
3122
  * @param tenantId (optional) Tenant identifier
2451
3123
  * @return Success
2452
3124
  */
2453
- getAttributes(id, ownerId, tenantId) {
2454
- let url_ = this.baseUrl + "/api/atoms/v1/mockups-3d/{id}/attributes?";
3125
+ extractBackground(id, surfaceIndex, privateStorageOwner, tenantId) {
3126
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/background?";
2455
3127
  if (id === undefined || id === null)
2456
3128
  throw new Error("The parameter 'id' must be defined.");
2457
3129
  url_ = url_.replace("{id}", encodeURIComponent("" + id));
2458
- if (ownerId === null)
2459
- throw new Error("The parameter 'ownerId' cannot be null.");
2460
- else if (ownerId !== undefined)
2461
- url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
3130
+ if (surfaceIndex !== undefined && surfaceIndex !== null)
3131
+ url_ += "surfaceIndex=" + encodeURIComponent("" + surfaceIndex) + "&";
3132
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
3133
+ url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
2462
3134
  if (tenantId === null)
2463
3135
  throw new Error("The parameter 'tenantId' cannot be null.");
2464
3136
  else if (tenantId !== undefined)
@@ -2468,17 +3140,17 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
2468
3140
  observe: "response",
2469
3141
  responseType: "blob",
2470
3142
  headers: new HttpHeaders({
2471
- "Accept": "application/json"
3143
+ "Accept": "application/octet-stream"
2472
3144
  })
2473
3145
  };
2474
3146
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2475
3147
  return this.http.request("get", url_, transformedOptions_);
2476
3148
  })).pipe(mergeMap((response_) => {
2477
- return this.transformResult(url_, response_, (r) => this.processGetAttributes(r));
3149
+ return this.transformResult(url_, response_, (r) => this.processExtractBackground(r));
2478
3150
  })).pipe(catchError((response_) => {
2479
3151
  if (response_ instanceof HttpResponseBase) {
2480
3152
  try {
2481
- return this.transformResult(url_, response_, (r) => this.processGetAttributes(r));
3153
+ return this.transformResult(url_, response_, (r) => this.processExtractBackground(r));
2482
3154
  }
2483
3155
  catch (e) {
2484
3156
  return throwError(e);
@@ -2488,7 +3160,7 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
2488
3160
  return throwError(response_);
2489
3161
  }));
2490
3162
  }
2491
- processGetAttributes(response) {
3163
+ processExtractBackground(response) {
2492
3164
  const status = response.status;
2493
3165
  const responseBlob = response instanceof HttpResponse ? response.body :
2494
3166
  response.error instanceof Blob ? response.error : undefined;
@@ -2498,12 +3170,11 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
2498
3170
  _headers[key] = response.headers.get(key);
2499
3171
  }
2500
3172
  }
2501
- if (status === 200) {
2502
- return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2503
- let result200 = null;
2504
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2505
- return of(result200);
2506
- }));
3173
+ if (status === 200 || status === 206) {
3174
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
3175
+ const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
3176
+ const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
3177
+ return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
2507
3178
  }
2508
3179
  else if (status === 404) {
2509
3180
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
@@ -2514,9 +3185,93 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
2514
3185
  }
2515
3186
  else if (status === 422) {
2516
3187
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2517
- let result422 = null;
2518
- result422 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2519
- return throwException("Client Error", status, _responseText, _headers, result422);
3188
+ let result422 = null;
3189
+ result422 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3190
+ return throwException("Client Error", status, _responseText, _headers, result422);
3191
+ }));
3192
+ }
3193
+ else if (status === 401) {
3194
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3195
+ return throwException("Unauthorized", status, _responseText, _headers);
3196
+ }));
3197
+ }
3198
+ else if (status === 403) {
3199
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3200
+ return throwException("Forbidden", status, _responseText, _headers);
3201
+ }));
3202
+ }
3203
+ else if (status !== 200 && status !== 204) {
3204
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3205
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3206
+ }));
3207
+ }
3208
+ return of(null);
3209
+ }
3210
+ /**
3211
+ * Loads product (design model) from design file taken from storage.
3212
+ * @param id Design identifier.
3213
+ * @param privateStorageOwner (optional) Private storage owner identifier.
3214
+ * @param tenantId (optional) Tenant identifier
3215
+ * @return Success
3216
+ */
3217
+ loadProduct(id, privateStorageOwner, tenantId) {
3218
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/model?";
3219
+ if (id === undefined || id === null)
3220
+ throw new Error("The parameter 'id' must be defined.");
3221
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
3222
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
3223
+ url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
3224
+ if (tenantId === null)
3225
+ throw new Error("The parameter 'tenantId' cannot be null.");
3226
+ else if (tenantId !== undefined)
3227
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3228
+ url_ = url_.replace(/[?&]$/, "");
3229
+ let options_ = {
3230
+ observe: "response",
3231
+ responseType: "blob",
3232
+ headers: new HttpHeaders({
3233
+ "Accept": "application/json"
3234
+ })
3235
+ };
3236
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3237
+ return this.http.request("get", url_, transformedOptions_);
3238
+ })).pipe(mergeMap((response_) => {
3239
+ return this.transformResult(url_, response_, (r) => this.processLoadProduct(r));
3240
+ })).pipe(catchError((response_) => {
3241
+ if (response_ instanceof HttpResponseBase) {
3242
+ try {
3243
+ return this.transformResult(url_, response_, (r) => this.processLoadProduct(r));
3244
+ }
3245
+ catch (e) {
3246
+ return throwError(e);
3247
+ }
3248
+ }
3249
+ else
3250
+ return throwError(response_);
3251
+ }));
3252
+ }
3253
+ processLoadProduct(response) {
3254
+ const status = response.status;
3255
+ const responseBlob = response instanceof HttpResponse ? response.body :
3256
+ response.error instanceof Blob ? response.error : undefined;
3257
+ let _headers = {};
3258
+ if (response.headers) {
3259
+ for (let key of response.headers.keys()) {
3260
+ _headers[key] = response.headers.get(key);
3261
+ }
3262
+ }
3263
+ if (status === 200) {
3264
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3265
+ let result200 = null;
3266
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3267
+ return of(result200);
3268
+ }));
3269
+ }
3270
+ else if (status === 404) {
3271
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3272
+ let result404 = null;
3273
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3274
+ return throwException("Not Found", status, _responseText, _headers, result404);
2520
3275
  }));
2521
3276
  }
2522
3277
  else if (status === 401) {
@@ -2537,41 +3292,42 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
2537
3292
  return of(null);
2538
3293
  }
2539
3294
  /**
2540
- * Returns a 3D-Mockup content as protobuf binary stream.
2541
- * @param id 3D-Mockup identifier.
2542
- * @param ownerId (optional) Private mockup owner identifier.
3295
+ * Saves product (design model) to design file and updates design in storage.
3296
+ * @param id Design identifier.
3297
+ * @param privateStorageOwner (optional) Private storage owner identifier.
2543
3298
  * @param tenantId (optional) Tenant identifier
3299
+ * @param body (optional) Serialized product description.
2544
3300
  * @return Success
2545
3301
  */
2546
- getContentAsProtobuf(id, ownerId, tenantId) {
2547
- let url_ = this.baseUrl + "/api/atoms/v1/mockups-3d/{id}/content/as-protobuf?";
3302
+ saveProduct(id, privateStorageOwner, tenantId, body) {
3303
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/model?";
2548
3304
  if (id === undefined || id === null)
2549
3305
  throw new Error("The parameter 'id' must be defined.");
2550
3306
  url_ = url_.replace("{id}", encodeURIComponent("" + id));
2551
- if (ownerId === null)
2552
- throw new Error("The parameter 'ownerId' cannot be null.");
2553
- else if (ownerId !== undefined)
2554
- url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
3307
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
3308
+ url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
2555
3309
  if (tenantId === null)
2556
3310
  throw new Error("The parameter 'tenantId' cannot be null.");
2557
3311
  else if (tenantId !== undefined)
2558
3312
  url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2559
3313
  url_ = url_.replace(/[?&]$/, "");
3314
+ const content_ = JSON.stringify(body);
2560
3315
  let options_ = {
3316
+ body: content_,
2561
3317
  observe: "response",
2562
3318
  responseType: "blob",
2563
3319
  headers: new HttpHeaders({
2564
- "Accept": "application/json"
3320
+ "Content-Type": "application/json",
2565
3321
  })
2566
3322
  };
2567
3323
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2568
- return this.http.request("get", url_, transformedOptions_);
3324
+ return this.http.request("put", url_, transformedOptions_);
2569
3325
  })).pipe(mergeMap((response_) => {
2570
- return this.transformResult(url_, response_, (r) => this.processGetContentAsProtobuf(r));
3326
+ return this.transformResult(url_, response_, (r) => this.processSaveProduct(r));
2571
3327
  })).pipe(catchError((response_) => {
2572
3328
  if (response_ instanceof HttpResponseBase) {
2573
3329
  try {
2574
- return this.transformResult(url_, response_, (r) => this.processGetContentAsProtobuf(r));
3330
+ return this.transformResult(url_, response_, (r) => this.processSaveProduct(r));
2575
3331
  }
2576
3332
  catch (e) {
2577
3333
  return throwError(e);
@@ -2581,7 +3337,7 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
2581
3337
  return throwError(response_);
2582
3338
  }));
2583
3339
  }
2584
- processGetContentAsProtobuf(response) {
3340
+ processSaveProduct(response) {
2585
3341
  const status = response.status;
2586
3342
  const responseBlob = response instanceof HttpResponse ? response.body :
2587
3343
  response.error instanceof Blob ? response.error : undefined;
@@ -2591,11 +3347,10 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
2591
3347
  _headers[key] = response.headers.get(key);
2592
3348
  }
2593
3349
  }
2594
- if (status === 200 || status === 206) {
2595
- const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
2596
- const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
2597
- const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
2598
- return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
3350
+ if (status === 200) {
3351
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3352
+ return of(null);
3353
+ }));
2599
3354
  }
2600
3355
  else if (status === 404) {
2601
3356
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
@@ -2604,13 +3359,6 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
2604
3359
  return throwException("Not Found", status, _responseText, _headers, result404);
2605
3360
  }));
2606
3361
  }
2607
- else if (status === 422) {
2608
- return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2609
- let result422 = null;
2610
- result422 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2611
- return throwException("Client Error", status, _responseText, _headers, result422);
2612
- }));
2613
- }
2614
3362
  else if (status === 401) {
2615
3363
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2616
3364
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -2629,41 +3377,61 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
2629
3377
  return of(null);
2630
3378
  }
2631
3379
  /**
2632
- * Returns a 3D-Mockup geometry as binary stream.
2633
- * @param id 3D-Mockup identifier.
2634
- * @param ownerId (optional) Private mockup owner identifier.
3380
+ * Patches product (design model) in design file.
3381
+ * @param id Design identifier.
3382
+ * @param privateStorageOwner (optional) Private storage owner identifier.
2635
3383
  * @param tenantId (optional) Tenant identifier
3384
+ * @param patchType (optional)
3385
+ * @param replaceImageItemFileInfo_itemName (optional)
3386
+ * @param replaceImageItemFileInfo_sourceFile (optional)
3387
+ * @param replacePlaceholderItemContentInfo_placeholderItemName (optional)
3388
+ * @param replacePlaceholderItemContentInfo_newContentType (optional)
3389
+ * @param replacePlaceholderItemContentInfo_sourceFile (optional)
2636
3390
  * @return Success
2637
3391
  */
2638
- getGeometryFile(id, ownerId, tenantId) {
2639
- let url_ = this.baseUrl + "/api/atoms/v1/mockups-3d/{id}/geometry/file?";
3392
+ patchProduct(id, privateStorageOwner, tenantId, patchType, replaceImageItemFileInfo_itemName, replaceImageItemFileInfo_sourceFile, replacePlaceholderItemContentInfo_placeholderItemName, replacePlaceholderItemContentInfo_newContentType, replacePlaceholderItemContentInfo_sourceFile) {
3393
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/model?";
2640
3394
  if (id === undefined || id === null)
2641
3395
  throw new Error("The parameter 'id' must be defined.");
2642
3396
  url_ = url_.replace("{id}", encodeURIComponent("" + id));
2643
- if (ownerId === null)
2644
- throw new Error("The parameter 'ownerId' cannot be null.");
2645
- else if (ownerId !== undefined)
2646
- url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
3397
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
3398
+ url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
2647
3399
  if (tenantId === null)
2648
3400
  throw new Error("The parameter 'tenantId' cannot be null.");
2649
3401
  else if (tenantId !== undefined)
2650
3402
  url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2651
3403
  url_ = url_.replace(/[?&]$/, "");
3404
+ const content_ = new FormData();
3405
+ if (patchType === null || patchType === undefined)
3406
+ throw new Error("The parameter 'patchType' cannot be null.");
3407
+ else
3408
+ content_.append("patchType", patchType.toString());
3409
+ if (replaceImageItemFileInfo_itemName !== null && replaceImageItemFileInfo_itemName !== undefined)
3410
+ content_.append("replaceImageItemFileInfo.itemName", replaceImageItemFileInfo_itemName.toString());
3411
+ if (replaceImageItemFileInfo_sourceFile !== null && replaceImageItemFileInfo_sourceFile !== undefined)
3412
+ content_.append("replaceImageItemFileInfo.sourceFile", replaceImageItemFileInfo_sourceFile.data, replaceImageItemFileInfo_sourceFile.fileName ? replaceImageItemFileInfo_sourceFile.fileName : "replaceImageItemFileInfo.sourceFile");
3413
+ if (replacePlaceholderItemContentInfo_placeholderItemName !== null && replacePlaceholderItemContentInfo_placeholderItemName !== undefined)
3414
+ content_.append("replacePlaceholderItemContentInfo.placeholderItemName", replacePlaceholderItemContentInfo_placeholderItemName.toString());
3415
+ if (replacePlaceholderItemContentInfo_newContentType === null || replacePlaceholderItemContentInfo_newContentType === undefined)
3416
+ throw new Error("The parameter 'replacePlaceholderItemContentInfo_newContentType' cannot be null.");
3417
+ else
3418
+ content_.append("replacePlaceholderItemContentInfo.newContentType", replacePlaceholderItemContentInfo_newContentType.toString());
3419
+ if (replacePlaceholderItemContentInfo_sourceFile !== null && replacePlaceholderItemContentInfo_sourceFile !== undefined)
3420
+ content_.append("replacePlaceholderItemContentInfo.sourceFile", replacePlaceholderItemContentInfo_sourceFile.data, replacePlaceholderItemContentInfo_sourceFile.fileName ? replacePlaceholderItemContentInfo_sourceFile.fileName : "replacePlaceholderItemContentInfo.sourceFile");
2652
3421
  let options_ = {
3422
+ body: content_,
2653
3423
  observe: "response",
2654
3424
  responseType: "blob",
2655
- headers: new HttpHeaders({
2656
- "Accept": "application/json"
2657
- })
3425
+ headers: new HttpHeaders({})
2658
3426
  };
2659
3427
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2660
- return this.http.request("get", url_, transformedOptions_);
3428
+ return this.http.request("patch", url_, transformedOptions_);
2661
3429
  })).pipe(mergeMap((response_) => {
2662
- return this.transformResult(url_, response_, (r) => this.processGetGeometryFile(r));
3430
+ return this.transformResult(url_, response_, (r) => this.processPatchProduct(r));
2663
3431
  })).pipe(catchError((response_) => {
2664
3432
  if (response_ instanceof HttpResponseBase) {
2665
3433
  try {
2666
- return this.transformResult(url_, response_, (r) => this.processGetGeometryFile(r));
3434
+ return this.transformResult(url_, response_, (r) => this.processPatchProduct(r));
2667
3435
  }
2668
3436
  catch (e) {
2669
3437
  return throwError(e);
@@ -2673,7 +3441,7 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
2673
3441
  return throwError(response_);
2674
3442
  }));
2675
3443
  }
2676
- processGetGeometryFile(response) {
3444
+ processPatchProduct(response) {
2677
3445
  const status = response.status;
2678
3446
  const responseBlob = response instanceof HttpResponse ? response.body :
2679
3447
  response.error instanceof Blob ? response.error : undefined;
@@ -2683,11 +3451,10 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
2683
3451
  _headers[key] = response.headers.get(key);
2684
3452
  }
2685
3453
  }
2686
- if (status === 200 || status === 206) {
2687
- const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
2688
- const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
2689
- const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
2690
- return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
3454
+ if (status === 200) {
3455
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3456
+ return of(null);
3457
+ }));
2691
3458
  }
2692
3459
  else if (status === 404) {
2693
3460
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
@@ -2696,13 +3463,6 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
2696
3463
  return throwException("Not Found", status, _responseText, _headers, result404);
2697
3464
  }));
2698
3465
  }
2699
- else if (status === 422) {
2700
- return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2701
- let result422 = null;
2702
- result422 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2703
- return throwException("Client Error", status, _responseText, _headers, result422);
2704
- }));
2705
- }
2706
3466
  else if (status === 401) {
2707
3467
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2708
3468
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -2720,61 +3480,40 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
2720
3480
  }
2721
3481
  return of(null);
2722
3482
  }
2723
- }
2724
- DesignAtomsMockups3dApiClient.ɵprov = ɵɵdefineInjectable({ factory: function DesignAtomsMockups3dApiClient_Factory() { return new DesignAtomsMockups3dApiClient(ɵɵinject(ApiClientConfiguration), ɵɵinject(HttpClient), ɵɵinject(API_BASE_URL, 8)); }, token: DesignAtomsMockups3dApiClient, providedIn: "root" });
2725
- DesignAtomsMockups3dApiClient.decorators = [
2726
- { type: Injectable, args: [{
2727
- providedIn: 'root'
2728
- },] }
2729
- ];
2730
- DesignAtomsMockups3dApiClient.ctorParameters = () => [
2731
- { type: ApiClientConfiguration, decorators: [{ type: Inject, args: [ApiClientConfiguration,] }] },
2732
- { type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
2733
- { type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
2734
- ];
2735
- class DesignAtomsServiceApiClient extends ApiClientBase {
2736
- constructor(configuration, http, baseUrl) {
2737
- super(configuration);
2738
- this.jsonParseReviver = undefined;
2739
- this.http = http;
2740
- this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
2741
- }
2742
3483
  /**
2743
- * Creates new design file with specified parameters and saves it in storage.
3484
+ * Returns design parameters stored in product model.
3485
+ * @param id Design identifier.
2744
3486
  * @param privateStorageOwner (optional) Private storage owner identifier.
2745
3487
  * @param tenantId (optional) Tenant identifier
2746
- * @param body (optional) Design creation parameters.
2747
- * @return Created
3488
+ * @return Success
2748
3489
  */
2749
- createDesign(privateStorageOwner, tenantId, body) {
2750
- let url_ = this.baseUrl + "/api/atoms/v1/designs?";
2751
- if (privateStorageOwner === null)
2752
- throw new Error("The parameter 'privateStorageOwner' cannot be null.");
2753
- else if (privateStorageOwner !== undefined)
3490
+ getDesignParameters(id, privateStorageOwner, tenantId) {
3491
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/parameters?";
3492
+ if (id === undefined || id === null)
3493
+ throw new Error("The parameter 'id' must be defined.");
3494
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
3495
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
2754
3496
  url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
2755
3497
  if (tenantId === null)
2756
3498
  throw new Error("The parameter 'tenantId' cannot be null.");
2757
3499
  else if (tenantId !== undefined)
2758
3500
  url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2759
3501
  url_ = url_.replace(/[?&]$/, "");
2760
- const content_ = JSON.stringify(body);
2761
3502
  let options_ = {
2762
- body: content_,
2763
3503
  observe: "response",
2764
3504
  responseType: "blob",
2765
3505
  headers: new HttpHeaders({
2766
- "Content-Type": "application/json",
2767
3506
  "Accept": "application/json"
2768
3507
  })
2769
3508
  };
2770
3509
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2771
- return this.http.request("post", url_, transformedOptions_);
3510
+ return this.http.request("get", url_, transformedOptions_);
2772
3511
  })).pipe(mergeMap((response_) => {
2773
- return this.transformResult(url_, response_, (r) => this.processCreateDesign(r));
3512
+ return this.transformResult(url_, response_, (r) => this.processGetDesignParameters(r));
2774
3513
  })).pipe(catchError((response_) => {
2775
3514
  if (response_ instanceof HttpResponseBase) {
2776
3515
  try {
2777
- return this.transformResult(url_, response_, (r) => this.processCreateDesign(r));
3516
+ return this.transformResult(url_, response_, (r) => this.processGetDesignParameters(r));
2778
3517
  }
2779
3518
  catch (e) {
2780
3519
  return throwError(e);
@@ -2784,7 +3523,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
2784
3523
  return throwError(response_);
2785
3524
  }));
2786
3525
  }
2787
- processCreateDesign(response) {
3526
+ processGetDesignParameters(response) {
2788
3527
  const status = response.status;
2789
3528
  const responseBlob = response instanceof HttpResponse ? response.body :
2790
3529
  response.error instanceof Blob ? response.error : undefined;
@@ -2794,11 +3533,18 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
2794
3533
  _headers[key] = response.headers.get(key);
2795
3534
  }
2796
3535
  }
2797
- if (status === 201) {
3536
+ if (status === 200) {
2798
3537
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2799
- let result201 = null;
2800
- result201 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2801
- return of(result201);
3538
+ let result200 = null;
3539
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3540
+ return of(result200);
3541
+ }));
3542
+ }
3543
+ else if (status === 404) {
3544
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3545
+ let result404 = null;
3546
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3547
+ return throwException("Not Found", status, _responseText, _headers, result404);
2802
3548
  }));
2803
3549
  }
2804
3550
  else if (status === 401) {
@@ -2819,25 +3565,18 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
2819
3565
  return of(null);
2820
3566
  }
2821
3567
  /**
2822
- * Returns content of the background.
3568
+ * Loads data schema from design file taken from storage.
2823
3569
  * @param id Design identifier.
2824
- * @param surfaceIndex (optional) Surface index.
2825
3570
  * @param privateStorageOwner (optional) Private storage owner identifier.
2826
3571
  * @param tenantId (optional) Tenant identifier
2827
3572
  * @return Success
2828
3573
  */
2829
- extractBackground(id, surfaceIndex, privateStorageOwner, tenantId) {
2830
- let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/background?";
3574
+ loadDataSchema(id, privateStorageOwner, tenantId) {
3575
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/schema?";
2831
3576
  if (id === undefined || id === null)
2832
3577
  throw new Error("The parameter 'id' must be defined.");
2833
3578
  url_ = url_.replace("{id}", encodeURIComponent("" + id));
2834
- if (surfaceIndex === null)
2835
- throw new Error("The parameter 'surfaceIndex' cannot be null.");
2836
- else if (surfaceIndex !== undefined)
2837
- url_ += "surfaceIndex=" + encodeURIComponent("" + surfaceIndex) + "&";
2838
- if (privateStorageOwner === null)
2839
- throw new Error("The parameter 'privateStorageOwner' cannot be null.");
2840
- else if (privateStorageOwner !== undefined)
3579
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
2841
3580
  url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
2842
3581
  if (tenantId === null)
2843
3582
  throw new Error("The parameter 'tenantId' cannot be null.");
@@ -2854,11 +3593,11 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
2854
3593
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2855
3594
  return this.http.request("get", url_, transformedOptions_);
2856
3595
  })).pipe(mergeMap((response_) => {
2857
- return this.transformResult(url_, response_, (r) => this.processExtractBackground(r));
3596
+ return this.transformResult(url_, response_, (r) => this.processLoadDataSchema(r));
2858
3597
  })).pipe(catchError((response_) => {
2859
3598
  if (response_ instanceof HttpResponseBase) {
2860
3599
  try {
2861
- return this.transformResult(url_, response_, (r) => this.processExtractBackground(r));
3600
+ return this.transformResult(url_, response_, (r) => this.processLoadDataSchema(r));
2862
3601
  }
2863
3602
  catch (e) {
2864
3603
  return throwError(e);
@@ -2868,7 +3607,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
2868
3607
  return throwError(response_);
2869
3608
  }));
2870
3609
  }
2871
- processExtractBackground(response) {
3610
+ processLoadDataSchema(response) {
2872
3611
  const status = response.status;
2873
3612
  const responseBlob = response instanceof HttpResponse ? response.body :
2874
3613
  response.error instanceof Blob ? response.error : undefined;
@@ -2891,11 +3630,11 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
2891
3630
  return throwException("Not Found", status, _responseText, _headers, result404);
2892
3631
  }));
2893
3632
  }
2894
- else if (status === 422) {
3633
+ else if (status === 409) {
2895
3634
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2896
- let result422 = null;
2897
- result422 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2898
- return throwException("Client Error", status, _responseText, _headers, result422);
3635
+ let result409 = null;
3636
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3637
+ return throwException("Conflict", status, _responseText, _headers, result409);
2899
3638
  }));
2900
3639
  }
2901
3640
  else if (status === 401) {
@@ -2916,20 +3655,18 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
2916
3655
  return of(null);
2917
3656
  }
2918
3657
  /**
2919
- * Loads product (design model) from design file taken from storage.
3658
+ * Loads a toggle set from design file taken from storage.
2920
3659
  * @param id Design identifier.
2921
3660
  * @param privateStorageOwner (optional) Private storage owner identifier.
2922
3661
  * @param tenantId (optional) Tenant identifier
2923
3662
  * @return Success
2924
3663
  */
2925
- loadProduct(id, privateStorageOwner, tenantId) {
2926
- let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/model?";
3664
+ loadToggleSet(id, privateStorageOwner, tenantId) {
3665
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/toggle-set?";
2927
3666
  if (id === undefined || id === null)
2928
3667
  throw new Error("The parameter 'id' must be defined.");
2929
3668
  url_ = url_.replace("{id}", encodeURIComponent("" + id));
2930
- if (privateStorageOwner === null)
2931
- throw new Error("The parameter 'privateStorageOwner' cannot be null.");
2932
- else if (privateStorageOwner !== undefined)
3669
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
2933
3670
  url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
2934
3671
  if (tenantId === null)
2935
3672
  throw new Error("The parameter 'tenantId' cannot be null.");
@@ -2940,17 +3677,17 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
2940
3677
  observe: "response",
2941
3678
  responseType: "blob",
2942
3679
  headers: new HttpHeaders({
2943
- "Accept": "application/json"
3680
+ "Accept": "application/octet-stream"
2944
3681
  })
2945
3682
  };
2946
3683
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2947
3684
  return this.http.request("get", url_, transformedOptions_);
2948
3685
  })).pipe(mergeMap((response_) => {
2949
- return this.transformResult(url_, response_, (r) => this.processLoadProduct(r));
3686
+ return this.transformResult(url_, response_, (r) => this.processLoadToggleSet(r));
2950
3687
  })).pipe(catchError((response_) => {
2951
3688
  if (response_ instanceof HttpResponseBase) {
2952
3689
  try {
2953
- return this.transformResult(url_, response_, (r) => this.processLoadProduct(r));
3690
+ return this.transformResult(url_, response_, (r) => this.processLoadToggleSet(r));
2954
3691
  }
2955
3692
  catch (e) {
2956
3693
  return throwError(e);
@@ -2960,7 +3697,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
2960
3697
  return throwError(response_);
2961
3698
  }));
2962
3699
  }
2963
- processLoadProduct(response) {
3700
+ processLoadToggleSet(response) {
2964
3701
  const status = response.status;
2965
3702
  const responseBlob = response instanceof HttpResponse ? response.body :
2966
3703
  response.error instanceof Blob ? response.error : undefined;
@@ -2970,12 +3707,11 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
2970
3707
  _headers[key] = response.headers.get(key);
2971
3708
  }
2972
3709
  }
2973
- if (status === 200) {
2974
- return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2975
- let result200 = null;
2976
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2977
- return of(result200);
2978
- }));
3710
+ if (status === 200 || status === 206) {
3711
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
3712
+ const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
3713
+ const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
3714
+ return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
2979
3715
  }
2980
3716
  else if (status === 404) {
2981
3717
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
@@ -2984,6 +3720,13 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
2984
3720
  return throwException("Not Found", status, _responseText, _headers, result404);
2985
3721
  }));
2986
3722
  }
3723
+ else if (status === 409) {
3724
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3725
+ let result409 = null;
3726
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3727
+ return throwException("Conflict", status, _responseText, _headers, result409);
3728
+ }));
3729
+ }
2987
3730
  else if (status === 401) {
2988
3731
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2989
3732
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -3002,44 +3745,39 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3002
3745
  return of(null);
3003
3746
  }
3004
3747
  /**
3005
- * Saves product (design model) to design file and updates design in storage.
3748
+ * Gets variable items information for design file taken from storage.
3006
3749
  * @param id Design identifier.
3007
3750
  * @param privateStorageOwner (optional) Private storage owner identifier.
3008
3751
  * @param tenantId (optional) Tenant identifier
3009
- * @param body (optional) Serialized product description.
3010
3752
  * @return Success
3011
3753
  */
3012
- saveProduct(id, privateStorageOwner, tenantId, body) {
3013
- let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/model?";
3754
+ getVariables(id, privateStorageOwner, tenantId) {
3755
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/variables?";
3014
3756
  if (id === undefined || id === null)
3015
3757
  throw new Error("The parameter 'id' must be defined.");
3016
3758
  url_ = url_.replace("{id}", encodeURIComponent("" + id));
3017
- if (privateStorageOwner === null)
3018
- throw new Error("The parameter 'privateStorageOwner' cannot be null.");
3019
- else if (privateStorageOwner !== undefined)
3759
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
3020
3760
  url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
3021
3761
  if (tenantId === null)
3022
3762
  throw new Error("The parameter 'tenantId' cannot be null.");
3023
3763
  else if (tenantId !== undefined)
3024
3764
  url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3025
3765
  url_ = url_.replace(/[?&]$/, "");
3026
- const content_ = JSON.stringify(body);
3027
3766
  let options_ = {
3028
- body: content_,
3029
3767
  observe: "response",
3030
3768
  responseType: "blob",
3031
3769
  headers: new HttpHeaders({
3032
- "Content-Type": "application/json",
3770
+ "Accept": "application/json"
3033
3771
  })
3034
3772
  };
3035
3773
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3036
- return this.http.request("put", url_, transformedOptions_);
3774
+ return this.http.request("get", url_, transformedOptions_);
3037
3775
  })).pipe(mergeMap((response_) => {
3038
- return this.transformResult(url_, response_, (r) => this.processSaveProduct(r));
3776
+ return this.transformResult(url_, response_, (r) => this.processGetVariables(r));
3039
3777
  })).pipe(catchError((response_) => {
3040
3778
  if (response_ instanceof HttpResponseBase) {
3041
3779
  try {
3042
- return this.transformResult(url_, response_, (r) => this.processSaveProduct(r));
3780
+ return this.transformResult(url_, response_, (r) => this.processGetVariables(r));
3043
3781
  }
3044
3782
  catch (e) {
3045
3783
  return throwError(e);
@@ -3049,7 +3787,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3049
3787
  return throwError(response_);
3050
3788
  }));
3051
3789
  }
3052
- processSaveProduct(response) {
3790
+ processGetVariables(response) {
3053
3791
  const status = response.status;
3054
3792
  const responseBlob = response instanceof HttpResponse ? response.body :
3055
3793
  response.error instanceof Blob ? response.error : undefined;
@@ -3061,7 +3799,9 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3061
3799
  }
3062
3800
  if (status === 200) {
3063
3801
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3064
- return of(null);
3802
+ let result200 = null;
3803
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3804
+ return of(result200);
3065
3805
  }));
3066
3806
  }
3067
3807
  else if (status === 404) {
@@ -3089,63 +3829,42 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3089
3829
  return of(null);
3090
3830
  }
3091
3831
  /**
3092
- * Patches product (design model) in design file.
3093
- * @param id Design identifier.
3094
- * @param privateStorageOwner (optional) Private storage owner identifier.
3095
- * @param tenantId (optional) Tenant identifier
3096
- * @param patchType (optional)
3097
- * @param replaceImageItemFileInfo_itemName (optional)
3098
- * @param replaceImageItemFileInfo_sourceFile (optional)
3099
- * @param replacePlaceholderItemContentInfo_placeholderItemName (optional)
3100
- * @param replacePlaceholderItemContentInfo_newContentType (optional)
3101
- * @param replacePlaceholderItemContentInfo_sourceFile (optional)
3832
+ * Sets variable items values for design file taken from storage.
3833
+ * @param id Design identifier.
3834
+ * @param privateStorageOwner (optional) Private storage owner identifier.
3835
+ * @param tenantId (optional) Tenant identifier
3836
+ * @param body (optional) Design variable values.
3102
3837
  * @return Success
3103
3838
  */
3104
- patchProduct(id, privateStorageOwner, tenantId, patchType, replaceImageItemFileInfo_itemName, replaceImageItemFileInfo_sourceFile, replacePlaceholderItemContentInfo_placeholderItemName, replacePlaceholderItemContentInfo_newContentType, replacePlaceholderItemContentInfo_sourceFile) {
3105
- let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/model?";
3839
+ setVariables(id, privateStorageOwner, tenantId, body) {
3840
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/variables?";
3106
3841
  if (id === undefined || id === null)
3107
3842
  throw new Error("The parameter 'id' must be defined.");
3108
3843
  url_ = url_.replace("{id}", encodeURIComponent("" + id));
3109
- if (privateStorageOwner === null)
3110
- throw new Error("The parameter 'privateStorageOwner' cannot be null.");
3111
- else if (privateStorageOwner !== undefined)
3844
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
3112
3845
  url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
3113
3846
  if (tenantId === null)
3114
3847
  throw new Error("The parameter 'tenantId' cannot be null.");
3115
3848
  else if (tenantId !== undefined)
3116
3849
  url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3117
3850
  url_ = url_.replace(/[?&]$/, "");
3118
- const content_ = new FormData();
3119
- if (patchType === null || patchType === undefined)
3120
- throw new Error("The parameter 'patchType' cannot be null.");
3121
- else
3122
- content_.append("patchType", patchType.toString());
3123
- if (replaceImageItemFileInfo_itemName !== null && replaceImageItemFileInfo_itemName !== undefined)
3124
- content_.append("replaceImageItemFileInfo.itemName", replaceImageItemFileInfo_itemName.toString());
3125
- if (replaceImageItemFileInfo_sourceFile !== null && replaceImageItemFileInfo_sourceFile !== undefined)
3126
- content_.append("replaceImageItemFileInfo.sourceFile", replaceImageItemFileInfo_sourceFile.data, replaceImageItemFileInfo_sourceFile.fileName ? replaceImageItemFileInfo_sourceFile.fileName : "replaceImageItemFileInfo.sourceFile");
3127
- if (replacePlaceholderItemContentInfo_placeholderItemName !== null && replacePlaceholderItemContentInfo_placeholderItemName !== undefined)
3128
- content_.append("replacePlaceholderItemContentInfo.placeholderItemName", replacePlaceholderItemContentInfo_placeholderItemName.toString());
3129
- if (replacePlaceholderItemContentInfo_newContentType === null || replacePlaceholderItemContentInfo_newContentType === undefined)
3130
- throw new Error("The parameter 'replacePlaceholderItemContentInfo_newContentType' cannot be null.");
3131
- else
3132
- content_.append("replacePlaceholderItemContentInfo.newContentType", replacePlaceholderItemContentInfo_newContentType.toString());
3133
- if (replacePlaceholderItemContentInfo_sourceFile !== null && replacePlaceholderItemContentInfo_sourceFile !== undefined)
3134
- content_.append("replacePlaceholderItemContentInfo.sourceFile", replacePlaceholderItemContentInfo_sourceFile.data, replacePlaceholderItemContentInfo_sourceFile.fileName ? replacePlaceholderItemContentInfo_sourceFile.fileName : "replacePlaceholderItemContentInfo.sourceFile");
3851
+ const content_ = JSON.stringify(body);
3135
3852
  let options_ = {
3136
3853
  body: content_,
3137
3854
  observe: "response",
3138
3855
  responseType: "blob",
3139
- headers: new HttpHeaders({})
3856
+ headers: new HttpHeaders({
3857
+ "Content-Type": "application/json",
3858
+ })
3140
3859
  };
3141
3860
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3142
- return this.http.request("patch", url_, transformedOptions_);
3861
+ return this.http.request("put", url_, transformedOptions_);
3143
3862
  })).pipe(mergeMap((response_) => {
3144
- return this.transformResult(url_, response_, (r) => this.processPatchProduct(r));
3863
+ return this.transformResult(url_, response_, (r) => this.processSetVariables(r));
3145
3864
  })).pipe(catchError((response_) => {
3146
3865
  if (response_ instanceof HttpResponseBase) {
3147
3866
  try {
3148
- return this.transformResult(url_, response_, (r) => this.processPatchProduct(r));
3867
+ return this.transformResult(url_, response_, (r) => this.processSetVariables(r));
3149
3868
  }
3150
3869
  catch (e) {
3151
3870
  return throwError(e);
@@ -3155,7 +3874,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3155
3874
  return throwError(response_);
3156
3875
  }));
3157
3876
  }
3158
- processPatchProduct(response) {
3877
+ processSetVariables(response) {
3159
3878
  const status = response.status;
3160
3879
  const responseBlob = response instanceof HttpResponse ? response.body :
3161
3880
  response.error instanceof Blob ? response.error : undefined;
@@ -3177,6 +3896,13 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3177
3896
  return throwException("Not Found", status, _responseText, _headers, result404);
3178
3897
  }));
3179
3898
  }
3899
+ else if (status === 409) {
3900
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3901
+ let result409 = null;
3902
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3903
+ return throwException("Conflict", status, _responseText, _headers, result409);
3904
+ }));
3905
+ }
3180
3906
  else if (status === 401) {
3181
3907
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3182
3908
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -3195,20 +3921,18 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3195
3921
  return of(null);
3196
3922
  }
3197
3923
  /**
3198
- * Returns design parameters stored in product model.
3924
+ * Loads variable data printing information from design file taken from storage.
3199
3925
  * @param id Design identifier.
3200
3926
  * @param privateStorageOwner (optional) Private storage owner identifier.
3201
3927
  * @param tenantId (optional) Tenant identifier
3202
3928
  * @return Success
3203
3929
  */
3204
- getDesignParameters(id, privateStorageOwner, tenantId) {
3205
- let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/parameters?";
3930
+ loadVdpData(id, privateStorageOwner, tenantId) {
3931
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/vdp-data?";
3206
3932
  if (id === undefined || id === null)
3207
3933
  throw new Error("The parameter 'id' must be defined.");
3208
3934
  url_ = url_.replace("{id}", encodeURIComponent("" + id));
3209
- if (privateStorageOwner === null)
3210
- throw new Error("The parameter 'privateStorageOwner' cannot be null.");
3211
- else if (privateStorageOwner !== undefined)
3935
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
3212
3936
  url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
3213
3937
  if (tenantId === null)
3214
3938
  throw new Error("The parameter 'tenantId' cannot be null.");
@@ -3225,11 +3949,11 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3225
3949
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3226
3950
  return this.http.request("get", url_, transformedOptions_);
3227
3951
  })).pipe(mergeMap((response_) => {
3228
- return this.transformResult(url_, response_, (r) => this.processGetDesignParameters(r));
3952
+ return this.transformResult(url_, response_, (r) => this.processLoadVdpData(r));
3229
3953
  })).pipe(catchError((response_) => {
3230
3954
  if (response_ instanceof HttpResponseBase) {
3231
3955
  try {
3232
- return this.transformResult(url_, response_, (r) => this.processGetDesignParameters(r));
3956
+ return this.transformResult(url_, response_, (r) => this.processLoadVdpData(r));
3233
3957
  }
3234
3958
  catch (e) {
3235
3959
  return throwError(e);
@@ -3239,7 +3963,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3239
3963
  return throwError(response_);
3240
3964
  }));
3241
3965
  }
3242
- processGetDesignParameters(response) {
3966
+ processLoadVdpData(response) {
3243
3967
  const status = response.status;
3244
3968
  const responseBlob = response instanceof HttpResponse ? response.body :
3245
3969
  response.error instanceof Blob ? response.error : undefined;
@@ -3263,6 +3987,13 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3263
3987
  return throwException("Not Found", status, _responseText, _headers, result404);
3264
3988
  }));
3265
3989
  }
3990
+ else if (status === 409) {
3991
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3992
+ let result409 = null;
3993
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3994
+ return throwException("Conflict", status, _responseText, _headers, result409);
3995
+ }));
3996
+ }
3266
3997
  else if (status === 401) {
3267
3998
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3268
3999
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -3281,41 +4012,42 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3281
4012
  return of(null);
3282
4013
  }
3283
4014
  /**
3284
- * Loads data schema from design file taken from storage.
4015
+ * Saves variable data printing information to design file and updates design in storage.
3285
4016
  * @param id Design identifier.
3286
4017
  * @param privateStorageOwner (optional) Private storage owner identifier.
3287
4018
  * @param tenantId (optional) Tenant identifier
4019
+ * @param body (optional) Serialized vdp data.
3288
4020
  * @return Success
3289
4021
  */
3290
- loadDataSchema(id, privateStorageOwner, tenantId) {
3291
- let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/schema?";
4022
+ saveVdpData(id, privateStorageOwner, tenantId, body) {
4023
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/vdp-data?";
3292
4024
  if (id === undefined || id === null)
3293
4025
  throw new Error("The parameter 'id' must be defined.");
3294
4026
  url_ = url_.replace("{id}", encodeURIComponent("" + id));
3295
- if (privateStorageOwner === null)
3296
- throw new Error("The parameter 'privateStorageOwner' cannot be null.");
3297
- else if (privateStorageOwner !== undefined)
4027
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
3298
4028
  url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
3299
4029
  if (tenantId === null)
3300
4030
  throw new Error("The parameter 'tenantId' cannot be null.");
3301
4031
  else if (tenantId !== undefined)
3302
4032
  url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3303
4033
  url_ = url_.replace(/[?&]$/, "");
4034
+ const content_ = JSON.stringify(body);
3304
4035
  let options_ = {
4036
+ body: content_,
3305
4037
  observe: "response",
3306
4038
  responseType: "blob",
3307
4039
  headers: new HttpHeaders({
3308
- "Accept": "application/octet-stream"
4040
+ "Content-Type": "application/json",
3309
4041
  })
3310
4042
  };
3311
4043
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3312
- return this.http.request("get", url_, transformedOptions_);
4044
+ return this.http.request("put", url_, transformedOptions_);
3313
4045
  })).pipe(mergeMap((response_) => {
3314
- return this.transformResult(url_, response_, (r) => this.processLoadDataSchema(r));
4046
+ return this.transformResult(url_, response_, (r) => this.processSaveVdpData(r));
3315
4047
  })).pipe(catchError((response_) => {
3316
4048
  if (response_ instanceof HttpResponseBase) {
3317
4049
  try {
3318
- return this.transformResult(url_, response_, (r) => this.processLoadDataSchema(r));
4050
+ return this.transformResult(url_, response_, (r) => this.processSaveVdpData(r));
3319
4051
  }
3320
4052
  catch (e) {
3321
4053
  return throwError(e);
@@ -3325,7 +4057,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3325
4057
  return throwError(response_);
3326
4058
  }));
3327
4059
  }
3328
- processLoadDataSchema(response) {
4060
+ processSaveVdpData(response) {
3329
4061
  const status = response.status;
3330
4062
  const responseBlob = response instanceof HttpResponse ? response.body :
3331
4063
  response.error instanceof Blob ? response.error : undefined;
@@ -3335,11 +4067,10 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3335
4067
  _headers[key] = response.headers.get(key);
3336
4068
  }
3337
4069
  }
3338
- if (status === 200 || status === 206) {
3339
- const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
3340
- const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
3341
- const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
3342
- return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
4070
+ if (status === 200) {
4071
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4072
+ return of(null);
4073
+ }));
3343
4074
  }
3344
4075
  else if (status === 404) {
3345
4076
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
@@ -3348,13 +4079,6 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3348
4079
  return throwException("Not Found", status, _responseText, _headers, result404);
3349
4080
  }));
3350
4081
  }
3351
- else if (status === 409) {
3352
- return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3353
- let result409 = null;
3354
- result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3355
- return throwException("Conflict", status, _responseText, _headers, result409);
3356
- }));
3357
- }
3358
4082
  else if (status === 401) {
3359
4083
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3360
4084
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -3373,20 +4097,18 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3373
4097
  return of(null);
3374
4098
  }
3375
4099
  /**
3376
- * Loads a toggle set from design file taken from storage.
4100
+ * Deletes variable data printing information from design file and updates design in storage.
3377
4101
  * @param id Design identifier.
3378
4102
  * @param privateStorageOwner (optional) Private storage owner identifier.
3379
4103
  * @param tenantId (optional) Tenant identifier
3380
4104
  * @return Success
3381
4105
  */
3382
- loadToggleSet(id, privateStorageOwner, tenantId) {
3383
- let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/toggle-set?";
4106
+ deleteVdpData(id, privateStorageOwner, tenantId) {
4107
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/vdp-data?";
3384
4108
  if (id === undefined || id === null)
3385
4109
  throw new Error("The parameter 'id' must be defined.");
3386
4110
  url_ = url_.replace("{id}", encodeURIComponent("" + id));
3387
- if (privateStorageOwner === null)
3388
- throw new Error("The parameter 'privateStorageOwner' cannot be null.");
3389
- else if (privateStorageOwner !== undefined)
4111
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
3390
4112
  url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
3391
4113
  if (tenantId === null)
3392
4114
  throw new Error("The parameter 'tenantId' cannot be null.");
@@ -3396,18 +4118,16 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3396
4118
  let options_ = {
3397
4119
  observe: "response",
3398
4120
  responseType: "blob",
3399
- headers: new HttpHeaders({
3400
- "Accept": "application/octet-stream"
3401
- })
4121
+ headers: new HttpHeaders({})
3402
4122
  };
3403
4123
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3404
- return this.http.request("get", url_, transformedOptions_);
4124
+ return this.http.request("delete", url_, transformedOptions_);
3405
4125
  })).pipe(mergeMap((response_) => {
3406
- return this.transformResult(url_, response_, (r) => this.processLoadToggleSet(r));
4126
+ return this.transformResult(url_, response_, (r) => this.processDeleteVdpData(r));
3407
4127
  })).pipe(catchError((response_) => {
3408
4128
  if (response_ instanceof HttpResponseBase) {
3409
4129
  try {
3410
- return this.transformResult(url_, response_, (r) => this.processLoadToggleSet(r));
4130
+ return this.transformResult(url_, response_, (r) => this.processDeleteVdpData(r));
3411
4131
  }
3412
4132
  catch (e) {
3413
4133
  return throwError(e);
@@ -3417,7 +4137,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3417
4137
  return throwError(response_);
3418
4138
  }));
3419
4139
  }
3420
- processLoadToggleSet(response) {
4140
+ processDeleteVdpData(response) {
3421
4141
  const status = response.status;
3422
4142
  const responseBlob = response instanceof HttpResponse ? response.body :
3423
4143
  response.error instanceof Blob ? response.error : undefined;
@@ -3427,17 +4147,9 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3427
4147
  _headers[key] = response.headers.get(key);
3428
4148
  }
3429
4149
  }
3430
- if (status === 200 || status === 206) {
3431
- const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
3432
- const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
3433
- const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
3434
- return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
3435
- }
3436
- else if (status === 404) {
4150
+ if (status === 200) {
3437
4151
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3438
- let result404 = null;
3439
- result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3440
- return throwException("Not Found", status, _responseText, _headers, result404);
4152
+ return of(null);
3441
4153
  }));
3442
4154
  }
3443
4155
  else if (status === 409) {
@@ -3465,20 +4177,18 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3465
4177
  return of(null);
3466
4178
  }
3467
4179
  /**
3468
- * Gets variable items information for design file taken from storage.
3469
- * @param id Design identifier.
4180
+ * Loads product (design model) from resource file taken from storage.
4181
+ * @param id Resource identifier.
3470
4182
  * @param privateStorageOwner (optional) Private storage owner identifier.
3471
4183
  * @param tenantId (optional) Tenant identifier
3472
4184
  * @return Success
3473
4185
  */
3474
- getVariables(id, privateStorageOwner, tenantId) {
3475
- let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/variables?";
4186
+ loadProductFromResource(id, privateStorageOwner, tenantId) {
4187
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/from-resource/{id}/model?";
3476
4188
  if (id === undefined || id === null)
3477
4189
  throw new Error("The parameter 'id' must be defined.");
3478
4190
  url_ = url_.replace("{id}", encodeURIComponent("" + id));
3479
- if (privateStorageOwner === null)
3480
- throw new Error("The parameter 'privateStorageOwner' cannot be null.");
3481
- else if (privateStorageOwner !== undefined)
4191
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
3482
4192
  url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
3483
4193
  if (tenantId === null)
3484
4194
  throw new Error("The parameter 'tenantId' cannot be null.");
@@ -3495,11 +4205,11 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3495
4205
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3496
4206
  return this.http.request("get", url_, transformedOptions_);
3497
4207
  })).pipe(mergeMap((response_) => {
3498
- return this.transformResult(url_, response_, (r) => this.processGetVariables(r));
4208
+ return this.transformResult(url_, response_, (r) => this.processLoadProductFromResource(r));
3499
4209
  })).pipe(catchError((response_) => {
3500
4210
  if (response_ instanceof HttpResponseBase) {
3501
4211
  try {
3502
- return this.transformResult(url_, response_, (r) => this.processGetVariables(r));
4212
+ return this.transformResult(url_, response_, (r) => this.processLoadProductFromResource(r));
3503
4213
  }
3504
4214
  catch (e) {
3505
4215
  return throwError(e);
@@ -3509,7 +4219,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3509
4219
  return throwError(response_);
3510
4220
  }));
3511
4221
  }
3512
- processGetVariables(response) {
4222
+ processLoadProductFromResource(response) {
3513
4223
  const status = response.status;
3514
4224
  const responseBlob = response instanceof HttpResponse ? response.body :
3515
4225
  response.error instanceof Blob ? response.error : undefined;
@@ -3533,6 +4243,13 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3533
4243
  return throwException("Not Found", status, _responseText, _headers, result404);
3534
4244
  }));
3535
4245
  }
4246
+ else if (status === 422) {
4247
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4248
+ let result422 = null;
4249
+ result422 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4250
+ return throwException("Client Error", status, _responseText, _headers, result422);
4251
+ }));
4252
+ }
3536
4253
  else if (status === 401) {
3537
4254
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3538
4255
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -3551,22 +4268,13 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3551
4268
  return of(null);
3552
4269
  }
3553
4270
  /**
3554
- * Sets variable items values for design file taken from storage.
3555
- * @param id Design identifier.
3556
- * @param privateStorageOwner (optional) Private storage owner identifier.
4271
+ * Converts colors.
3557
4272
  * @param tenantId (optional) Tenant identifier
3558
- * @param body (optional) Design variable values.
4273
+ * @param body (optional) Convert colors operation parameters.
3559
4274
  * @return Success
3560
4275
  */
3561
- setVariables(id, privateStorageOwner, tenantId, body) {
3562
- let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/variables?";
3563
- if (id === undefined || id === null)
3564
- throw new Error("The parameter 'id' must be defined.");
3565
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
3566
- if (privateStorageOwner === null)
3567
- throw new Error("The parameter 'privateStorageOwner' cannot be null.");
3568
- else if (privateStorageOwner !== undefined)
3569
- url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
4276
+ convertColors(tenantId, body) {
4277
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/model/convert-colors?";
3570
4278
  if (tenantId === null)
3571
4279
  throw new Error("The parameter 'tenantId' cannot be null.");
3572
4280
  else if (tenantId !== undefined)
@@ -3579,16 +4287,17 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3579
4287
  responseType: "blob",
3580
4288
  headers: new HttpHeaders({
3581
4289
  "Content-Type": "application/json",
4290
+ "Accept": "application/json"
3582
4291
  })
3583
4292
  };
3584
4293
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3585
- return this.http.request("put", url_, transformedOptions_);
4294
+ return this.http.request("post", url_, transformedOptions_);
3586
4295
  })).pipe(mergeMap((response_) => {
3587
- return this.transformResult(url_, response_, (r) => this.processSetVariables(r));
4296
+ return this.transformResult(url_, response_, (r) => this.processConvertColors(r));
3588
4297
  })).pipe(catchError((response_) => {
3589
4298
  if (response_ instanceof HttpResponseBase) {
3590
4299
  try {
3591
- return this.transformResult(url_, response_, (r) => this.processSetVariables(r));
4300
+ return this.transformResult(url_, response_, (r) => this.processConvertColors(r));
3592
4301
  }
3593
4302
  catch (e) {
3594
4303
  return throwError(e);
@@ -3598,7 +4307,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3598
4307
  return throwError(response_);
3599
4308
  }));
3600
4309
  }
3601
- processSetVariables(response) {
4310
+ processConvertColors(response) {
3602
4311
  const status = response.status;
3603
4312
  const responseBlob = response instanceof HttpResponse ? response.body :
3604
4313
  response.error instanceof Blob ? response.error : undefined;
@@ -3610,7 +4319,9 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3610
4319
  }
3611
4320
  if (status === 200) {
3612
4321
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3613
- return of(null);
4322
+ let result200 = null;
4323
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4324
+ return of(result200);
3614
4325
  }));
3615
4326
  }
3616
4327
  else if (status === 404) {
@@ -3620,13 +4331,6 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3620
4331
  return throwException("Not Found", status, _responseText, _headers, result404);
3621
4332
  }));
3622
4333
  }
3623
- else if (status === 409) {
3624
- return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3625
- let result409 = null;
3626
- result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3627
- return throwException("Conflict", status, _responseText, _headers, result409);
3628
- }));
3629
- }
3630
4334
  else if (status === 401) {
3631
4335
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3632
4336
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -3645,41 +4349,36 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3645
4349
  return of(null);
3646
4350
  }
3647
4351
  /**
3648
- * Loads variable data printing information from design file taken from storage.
3649
- * @param id Design identifier.
3650
- * @param privateStorageOwner (optional) Private storage owner identifier.
4352
+ * Extracts product item image.
3651
4353
  * @param tenantId (optional) Tenant identifier
4354
+ * @param body (optional) Extraction parameters.
3652
4355
  * @return Success
3653
4356
  */
3654
- loadVdpData(id, privateStorageOwner, tenantId) {
3655
- let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/vdp-data?";
3656
- if (id === undefined || id === null)
3657
- throw new Error("The parameter 'id' must be defined.");
3658
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
3659
- if (privateStorageOwner === null)
3660
- throw new Error("The parameter 'privateStorageOwner' cannot be null.");
3661
- else if (privateStorageOwner !== undefined)
3662
- url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
4357
+ extractItemImage(tenantId, body) {
4358
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/extract-image?";
3663
4359
  if (tenantId === null)
3664
4360
  throw new Error("The parameter 'tenantId' cannot be null.");
3665
4361
  else if (tenantId !== undefined)
3666
4362
  url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3667
4363
  url_ = url_.replace(/[?&]$/, "");
4364
+ const content_ = JSON.stringify(body);
3668
4365
  let options_ = {
4366
+ body: content_,
3669
4367
  observe: "response",
3670
4368
  responseType: "blob",
3671
4369
  headers: new HttpHeaders({
3672
- "Accept": "application/json"
4370
+ "Content-Type": "application/json",
4371
+ "Accept": "application/octet-stream"
3673
4372
  })
3674
4373
  };
3675
4374
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3676
- return this.http.request("get", url_, transformedOptions_);
4375
+ return this.http.request("post", url_, transformedOptions_);
3677
4376
  })).pipe(mergeMap((response_) => {
3678
- return this.transformResult(url_, response_, (r) => this.processLoadVdpData(r));
4377
+ return this.transformResult(url_, response_, (r) => this.processExtractItemImage(r));
3679
4378
  })).pipe(catchError((response_) => {
3680
4379
  if (response_ instanceof HttpResponseBase) {
3681
4380
  try {
3682
- return this.transformResult(url_, response_, (r) => this.processLoadVdpData(r));
4381
+ return this.transformResult(url_, response_, (r) => this.processExtractItemImage(r));
3683
4382
  }
3684
4383
  catch (e) {
3685
4384
  return throwError(e);
@@ -3689,7 +4388,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3689
4388
  return throwError(response_);
3690
4389
  }));
3691
4390
  }
3692
- processLoadVdpData(response) {
4391
+ processExtractItemImage(response) {
3693
4392
  const status = response.status;
3694
4393
  const responseBlob = response instanceof HttpResponse ? response.body :
3695
4394
  response.error instanceof Blob ? response.error : undefined;
@@ -3699,26 +4398,11 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3699
4398
  _headers[key] = response.headers.get(key);
3700
4399
  }
3701
4400
  }
3702
- if (status === 200) {
3703
- return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3704
- let result200 = null;
3705
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3706
- return of(result200);
3707
- }));
3708
- }
3709
- else if (status === 404) {
3710
- return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3711
- let result404 = null;
3712
- result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3713
- return throwException("Not Found", status, _responseText, _headers, result404);
3714
- }));
3715
- }
3716
- else if (status === 409) {
3717
- return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3718
- let result409 = null;
3719
- result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3720
- return throwException("Conflict", status, _responseText, _headers, result409);
3721
- }));
4401
+ if (status === 200 || status === 206) {
4402
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
4403
+ const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
4404
+ const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
4405
+ return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
3722
4406
  }
3723
4407
  else if (status === 401) {
3724
4408
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
@@ -3738,22 +4422,13 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3738
4422
  return of(null);
3739
4423
  }
3740
4424
  /**
3741
- * Saves variable data printing information to design file and updates design in storage.
3742
- * @param id Design identifier.
3743
- * @param privateStorageOwner (optional) Private storage owner identifier.
4425
+ * Flatten items.
3744
4426
  * @param tenantId (optional) Tenant identifier
3745
- * @param body (optional) Serialized vdp data.
4427
+ * @param body (optional) Items to flatten.
3746
4428
  * @return Success
3747
4429
  */
3748
- saveVdpData(id, privateStorageOwner, tenantId, body) {
3749
- let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/vdp-data?";
3750
- if (id === undefined || id === null)
3751
- throw new Error("The parameter 'id' must be defined.");
3752
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
3753
- if (privateStorageOwner === null)
3754
- throw new Error("The parameter 'privateStorageOwner' cannot be null.");
3755
- else if (privateStorageOwner !== undefined)
3756
- url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
4430
+ flattenItems(tenantId, body) {
4431
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/flatten?";
3757
4432
  if (tenantId === null)
3758
4433
  throw new Error("The parameter 'tenantId' cannot be null.");
3759
4434
  else if (tenantId !== undefined)
@@ -3766,16 +4441,17 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3766
4441
  responseType: "blob",
3767
4442
  headers: new HttpHeaders({
3768
4443
  "Content-Type": "application/json",
4444
+ "Accept": "application/json"
3769
4445
  })
3770
4446
  };
3771
4447
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3772
- return this.http.request("put", url_, transformedOptions_);
4448
+ return this.http.request("post", url_, transformedOptions_);
3773
4449
  })).pipe(mergeMap((response_) => {
3774
- return this.transformResult(url_, response_, (r) => this.processSaveVdpData(r));
4450
+ return this.transformResult(url_, response_, (r) => this.processFlattenItems(r));
3775
4451
  })).pipe(catchError((response_) => {
3776
4452
  if (response_ instanceof HttpResponseBase) {
3777
4453
  try {
3778
- return this.transformResult(url_, response_, (r) => this.processSaveVdpData(r));
4454
+ return this.transformResult(url_, response_, (r) => this.processFlattenItems(r));
3779
4455
  }
3780
4456
  catch (e) {
3781
4457
  return throwError(e);
@@ -3785,7 +4461,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3785
4461
  return throwError(response_);
3786
4462
  }));
3787
4463
  }
3788
- processSaveVdpData(response) {
4464
+ processFlattenItems(response) {
3789
4465
  const status = response.status;
3790
4466
  const responseBlob = response instanceof HttpResponse ? response.body :
3791
4467
  response.error instanceof Blob ? response.error : undefined;
@@ -3797,14 +4473,9 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3797
4473
  }
3798
4474
  if (status === 200) {
3799
4475
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3800
- return of(null);
3801
- }));
3802
- }
3803
- else if (status === 404) {
3804
- return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3805
- let result404 = null;
3806
- result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3807
- return throwException("Not Found", status, _responseText, _headers, result404);
4476
+ let result200 = null;
4477
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4478
+ return of(result200);
3808
4479
  }));
3809
4480
  }
3810
4481
  else if (status === 401) {
@@ -3825,39 +4496,40 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3825
4496
  return of(null);
3826
4497
  }
3827
4498
  /**
3828
- * Deletes variable data printing information from design file and updates design in storage.
3829
- * @param id Design identifier.
3830
- * @param privateStorageOwner (optional) Private storage owner identifier.
4499
+ * Creates product item from input image file.
4500
+ * @param itemType (optional) Desired item type.
3831
4501
  * @param tenantId (optional) Tenant identifier
4502
+ * @param sourceFile (optional)
3832
4503
  * @return Success
3833
4504
  */
3834
- deleteVdpData(id, privateStorageOwner, tenantId) {
3835
- let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/vdp-data?";
3836
- if (id === undefined || id === null)
3837
- throw new Error("The parameter 'id' must be defined.");
3838
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
3839
- if (privateStorageOwner === null)
3840
- throw new Error("The parameter 'privateStorageOwner' cannot be null.");
3841
- else if (privateStorageOwner !== undefined)
3842
- url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
4505
+ createItemFromFile(itemType, tenantId, sourceFile) {
4506
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/from-file?";
4507
+ if (itemType !== undefined && itemType !== null)
4508
+ url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
3843
4509
  if (tenantId === null)
3844
4510
  throw new Error("The parameter 'tenantId' cannot be null.");
3845
4511
  else if (tenantId !== undefined)
3846
4512
  url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3847
4513
  url_ = url_.replace(/[?&]$/, "");
4514
+ const content_ = new FormData();
4515
+ if (sourceFile !== null && sourceFile !== undefined)
4516
+ content_.append("sourceFile", sourceFile.data, sourceFile.fileName ? sourceFile.fileName : "sourceFile");
3848
4517
  let options_ = {
4518
+ body: content_,
3849
4519
  observe: "response",
3850
4520
  responseType: "blob",
3851
- headers: new HttpHeaders({})
4521
+ headers: new HttpHeaders({
4522
+ "Accept": "application/json"
4523
+ })
3852
4524
  };
3853
4525
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3854
- return this.http.request("delete", url_, transformedOptions_);
4526
+ return this.http.request("post", url_, transformedOptions_);
3855
4527
  })).pipe(mergeMap((response_) => {
3856
- return this.transformResult(url_, response_, (r) => this.processDeleteVdpData(r));
4528
+ return this.transformResult(url_, response_, (r) => this.processCreateItemFromFile(r));
3857
4529
  })).pipe(catchError((response_) => {
3858
4530
  if (response_ instanceof HttpResponseBase) {
3859
4531
  try {
3860
- return this.transformResult(url_, response_, (r) => this.processDeleteVdpData(r));
4532
+ return this.transformResult(url_, response_, (r) => this.processCreateItemFromFile(r));
3861
4533
  }
3862
4534
  catch (e) {
3863
4535
  return throwError(e);
@@ -3867,7 +4539,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3867
4539
  return throwError(response_);
3868
4540
  }));
3869
4541
  }
3870
- processDeleteVdpData(response) {
4542
+ processCreateItemFromFile(response) {
3871
4543
  const status = response.status;
3872
4544
  const responseBlob = response instanceof HttpResponse ? response.body :
3873
4545
  response.error instanceof Blob ? response.error : undefined;
@@ -3879,14 +4551,16 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3879
4551
  }
3880
4552
  if (status === 200) {
3881
4553
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3882
- return of(null);
4554
+ let result200 = null;
4555
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4556
+ return of(result200);
3883
4557
  }));
3884
4558
  }
3885
- else if (status === 409) {
4559
+ else if (status === 404) {
3886
4560
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3887
- let result409 = null;
3888
- result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3889
- return throwException("Conflict", status, _responseText, _headers, result409);
4561
+ let result404 = null;
4562
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4563
+ return throwException("Not Found", status, _responseText, _headers, result404);
3890
4564
  }));
3891
4565
  }
3892
4566
  else if (status === 401) {
@@ -3907,27 +4581,26 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3907
4581
  return of(null);
3908
4582
  }
3909
4583
  /**
3910
- * Loads product (design model) from resource file taken from storage.
3911
- * @param id Resource identifier.
3912
- * @param privateStorageOwner (optional) Private storage owner identifier.
4584
+ * Creates multiple product items from input image files.
4585
+ * @param itemType (optional) Desired items type.
3913
4586
  * @param tenantId (optional) Tenant identifier
4587
+ * @param sourceFiles (optional)
3914
4588
  * @return Success
3915
4589
  */
3916
- loadProductFromResource(id, privateStorageOwner, tenantId) {
3917
- let url_ = this.baseUrl + "/api/atoms/v1/designs/from-resource/{id}/model?";
3918
- if (id === undefined || id === null)
3919
- throw new Error("The parameter 'id' must be defined.");
3920
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
3921
- if (privateStorageOwner === null)
3922
- throw new Error("The parameter 'privateStorageOwner' cannot be null.");
3923
- else if (privateStorageOwner !== undefined)
3924
- url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
4590
+ batchCreateItemsFromFile(itemType, tenantId, sourceFiles) {
4591
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/from-file/batch-create?";
4592
+ if (itemType !== undefined && itemType !== null)
4593
+ url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
3925
4594
  if (tenantId === null)
3926
4595
  throw new Error("The parameter 'tenantId' cannot be null.");
3927
4596
  else if (tenantId !== undefined)
3928
4597
  url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3929
4598
  url_ = url_.replace(/[?&]$/, "");
4599
+ const content_ = new FormData();
4600
+ if (sourceFiles !== null && sourceFiles !== undefined)
4601
+ sourceFiles.forEach(item_ => content_.append("sourceFiles", item_.data, item_.fileName ? item_.fileName : "sourceFiles"));
3930
4602
  let options_ = {
4603
+ body: content_,
3931
4604
  observe: "response",
3932
4605
  responseType: "blob",
3933
4606
  headers: new HttpHeaders({
@@ -3935,13 +4608,13 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3935
4608
  })
3936
4609
  };
3937
4610
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3938
- return this.http.request("get", url_, transformedOptions_);
4611
+ return this.http.request("post", url_, transformedOptions_);
3939
4612
  })).pipe(mergeMap((response_) => {
3940
- return this.transformResult(url_, response_, (r) => this.processLoadProductFromResource(r));
4613
+ return this.transformResult(url_, response_, (r) => this.processBatchCreateItemsFromFile(r));
3941
4614
  })).pipe(catchError((response_) => {
3942
4615
  if (response_ instanceof HttpResponseBase) {
3943
4616
  try {
3944
- return this.transformResult(url_, response_, (r) => this.processLoadProductFromResource(r));
4617
+ return this.transformResult(url_, response_, (r) => this.processBatchCreateItemsFromFile(r));
3945
4618
  }
3946
4619
  catch (e) {
3947
4620
  return throwError(e);
@@ -3951,7 +4624,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3951
4624
  return throwError(response_);
3952
4625
  }));
3953
4626
  }
3954
- processLoadProductFromResource(response) {
4627
+ processBatchCreateItemsFromFile(response) {
3955
4628
  const status = response.status;
3956
4629
  const responseBlob = response instanceof HttpResponse ? response.body :
3957
4630
  response.error instanceof Blob ? response.error : undefined;
@@ -3975,13 +4648,6 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
3975
4648
  return throwException("Not Found", status, _responseText, _headers, result404);
3976
4649
  }));
3977
4650
  }
3978
- else if (status === 422) {
3979
- return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3980
- let result422 = null;
3981
- result422 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3982
- return throwException("Client Error", status, _responseText, _headers, result422);
3983
- }));
3984
- }
3985
4651
  else if (status === 401) {
3986
4652
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3987
4653
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -4000,13 +4666,16 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4000
4666
  return of(null);
4001
4667
  }
4002
4668
  /**
4003
- * Converts colors.
4669
+ * Creates product item from image in storage.
4670
+ * @param itemType (optional) Desired item type.
4004
4671
  * @param tenantId (optional) Tenant identifier
4005
- * @param body (optional) Convert colors operation parameters.
4672
+ * @param body (optional) Operation parameters.
4006
4673
  * @return Success
4007
4674
  */
4008
- convertColors(tenantId, body) {
4009
- let url_ = this.baseUrl + "/api/atoms/v1/designs/model/convert-colors?";
4675
+ createItemFromStorage(itemType, tenantId, body) {
4676
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/from-storage?";
4677
+ if (itemType !== undefined && itemType !== null)
4678
+ url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
4010
4679
  if (tenantId === null)
4011
4680
  throw new Error("The parameter 'tenantId' cannot be null.");
4012
4681
  else if (tenantId !== undefined)
@@ -4025,11 +4694,11 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4025
4694
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
4026
4695
  return this.http.request("post", url_, transformedOptions_);
4027
4696
  })).pipe(mergeMap((response_) => {
4028
- return this.transformResult(url_, response_, (r) => this.processConvertColors(r));
4697
+ return this.transformResult(url_, response_, (r) => this.processCreateItemFromStorage(r));
4029
4698
  })).pipe(catchError((response_) => {
4030
4699
  if (response_ instanceof HttpResponseBase) {
4031
4700
  try {
4032
- return this.transformResult(url_, response_, (r) => this.processConvertColors(r));
4701
+ return this.transformResult(url_, response_, (r) => this.processCreateItemFromStorage(r));
4033
4702
  }
4034
4703
  catch (e) {
4035
4704
  return throwError(e);
@@ -4039,7 +4708,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4039
4708
  return throwError(response_);
4040
4709
  }));
4041
4710
  }
4042
- processConvertColors(response) {
4711
+ processCreateItemFromStorage(response) {
4043
4712
  const status = response.status;
4044
4713
  const responseBlob = response instanceof HttpResponse ? response.body :
4045
4714
  response.error instanceof Blob ? response.error : undefined;
@@ -4081,51 +4750,39 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4081
4750
  return of(null);
4082
4751
  }
4083
4752
  /**
4084
- * Creates product item.
4085
- * @param itemType (optional) Desired item type.
4753
+ * Creates multiple product items from images in storage.
4754
+ * @param itemType (optional) Desired items type.
4086
4755
  * @param tenantId (optional) Tenant identifier
4087
- * @param sourceType (optional)
4088
- * @param sourceId (optional)
4089
- * @param sourceOwnerId (optional)
4090
- * @param sourceFile (optional)
4756
+ * @param body (optional) Create items operation parameters.
4091
4757
  * @return Success
4092
4758
  */
4093
- createItem(itemType, tenantId, sourceType, sourceId, sourceOwnerId, sourceFile) {
4094
- let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items?";
4095
- if (itemType === null)
4096
- throw new Error("The parameter 'itemType' cannot be null.");
4097
- else if (itemType !== undefined)
4759
+ batchCreateItemsFromStorage(itemType, tenantId, body) {
4760
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/from-storage/batch-create?";
4761
+ if (itemType !== undefined && itemType !== null)
4098
4762
  url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
4099
4763
  if (tenantId === null)
4100
4764
  throw new Error("The parameter 'tenantId' cannot be null.");
4101
4765
  else if (tenantId !== undefined)
4102
4766
  url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
4103
4767
  url_ = url_.replace(/[?&]$/, "");
4104
- const content_ = new FormData();
4105
- if (sourceType !== null && sourceType !== undefined)
4106
- content_.append("sourceType", sourceType.toString());
4107
- if (sourceId !== null && sourceId !== undefined)
4108
- content_.append("sourceId", sourceId.toString());
4109
- if (sourceOwnerId !== null && sourceOwnerId !== undefined)
4110
- content_.append("sourceOwnerId", sourceOwnerId.toString());
4111
- if (sourceFile !== null && sourceFile !== undefined)
4112
- content_.append("sourceFile", sourceFile.data, sourceFile.fileName ? sourceFile.fileName : "sourceFile");
4768
+ const content_ = JSON.stringify(body);
4113
4769
  let options_ = {
4114
4770
  body: content_,
4115
4771
  observe: "response",
4116
4772
  responseType: "blob",
4117
4773
  headers: new HttpHeaders({
4774
+ "Content-Type": "application/json",
4118
4775
  "Accept": "application/json"
4119
4776
  })
4120
4777
  };
4121
4778
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
4122
4779
  return this.http.request("post", url_, transformedOptions_);
4123
4780
  })).pipe(mergeMap((response_) => {
4124
- return this.transformResult(url_, response_, (r) => this.processCreateItem(r));
4781
+ return this.transformResult(url_, response_, (r) => this.processBatchCreateItemsFromStorage(r));
4125
4782
  })).pipe(catchError((response_) => {
4126
4783
  if (response_ instanceof HttpResponseBase) {
4127
4784
  try {
4128
- return this.transformResult(url_, response_, (r) => this.processCreateItem(r));
4785
+ return this.transformResult(url_, response_, (r) => this.processBatchCreateItemsFromStorage(r));
4129
4786
  }
4130
4787
  catch (e) {
4131
4788
  return throwError(e);
@@ -4135,7 +4792,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4135
4792
  return throwError(response_);
4136
4793
  }));
4137
4794
  }
4138
- processCreateItem(response) {
4795
+ processBatchCreateItemsFromStorage(response) {
4139
4796
  const status = response.status;
4140
4797
  const responseBlob = response instanceof HttpResponse ? response.body :
4141
4798
  response.error instanceof Blob ? response.error : undefined;
@@ -4177,13 +4834,16 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4177
4834
  return of(null);
4178
4835
  }
4179
4836
  /**
4180
- * Extracts product item image.
4837
+ * Creates product item from remote web image provided by URL.
4838
+ * @param itemType (optional) Desired item type.
4181
4839
  * @param tenantId (optional) Tenant identifier
4182
- * @param body (optional) Extraction parameters.
4840
+ * @param body (optional) Operation parameters.
4183
4841
  * @return Success
4184
4842
  */
4185
- extractItemImage(tenantId, body) {
4186
- let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/extract-image?";
4843
+ createItemFromUrl(itemType, tenantId, body) {
4844
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/from-url?";
4845
+ if (itemType !== undefined && itemType !== null)
4846
+ url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
4187
4847
  if (tenantId === null)
4188
4848
  throw new Error("The parameter 'tenantId' cannot be null.");
4189
4849
  else if (tenantId !== undefined)
@@ -4196,17 +4856,17 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4196
4856
  responseType: "blob",
4197
4857
  headers: new HttpHeaders({
4198
4858
  "Content-Type": "application/json",
4199
- "Accept": "application/octet-stream"
4859
+ "Accept": "application/json"
4200
4860
  })
4201
4861
  };
4202
4862
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
4203
4863
  return this.http.request("post", url_, transformedOptions_);
4204
4864
  })).pipe(mergeMap((response_) => {
4205
- return this.transformResult(url_, response_, (r) => this.processExtractItemImage(r));
4865
+ return this.transformResult(url_, response_, (r) => this.processCreateItemFromUrl(r));
4206
4866
  })).pipe(catchError((response_) => {
4207
4867
  if (response_ instanceof HttpResponseBase) {
4208
4868
  try {
4209
- return this.transformResult(url_, response_, (r) => this.processExtractItemImage(r));
4869
+ return this.transformResult(url_, response_, (r) => this.processCreateItemFromUrl(r));
4210
4870
  }
4211
4871
  catch (e) {
4212
4872
  return throwError(e);
@@ -4216,7 +4876,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4216
4876
  return throwError(response_);
4217
4877
  }));
4218
4878
  }
4219
- processExtractItemImage(response) {
4879
+ processCreateItemFromUrl(response) {
4220
4880
  const status = response.status;
4221
4881
  const responseBlob = response instanceof HttpResponse ? response.body :
4222
4882
  response.error instanceof Blob ? response.error : undefined;
@@ -4226,11 +4886,19 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4226
4886
  _headers[key] = response.headers.get(key);
4227
4887
  }
4228
4888
  }
4229
- if (status === 200 || status === 206) {
4230
- const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
4231
- const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
4232
- const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
4233
- return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
4889
+ if (status === 200) {
4890
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4891
+ let result200 = null;
4892
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4893
+ return of(result200);
4894
+ }));
4895
+ }
4896
+ else if (status === 404) {
4897
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4898
+ let result404 = null;
4899
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4900
+ return throwException("Not Found", status, _responseText, _headers, result404);
4901
+ }));
4234
4902
  }
4235
4903
  else if (status === 401) {
4236
4904
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
@@ -4250,13 +4918,16 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4250
4918
  return of(null);
4251
4919
  }
4252
4920
  /**
4253
- * Flatten items.
4921
+ * Creates multiple product items from remote web images provided by URLs list.
4922
+ * @param itemType (optional) Desired items type.
4254
4923
  * @param tenantId (optional) Tenant identifier
4255
- * @param body (optional) Items to flatten.
4924
+ * @param body (optional) Operation parameters.
4256
4925
  * @return Success
4257
4926
  */
4258
- flattenItems(tenantId, body) {
4259
- let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/flatten?";
4927
+ batchCreateItemsFromUrl(itemType, tenantId, body) {
4928
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/from-url/batch-create?";
4929
+ if (itemType !== undefined && itemType !== null)
4930
+ url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
4260
4931
  if (tenantId === null)
4261
4932
  throw new Error("The parameter 'tenantId' cannot be null.");
4262
4933
  else if (tenantId !== undefined)
@@ -4275,11 +4946,11 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4275
4946
  return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
4276
4947
  return this.http.request("post", url_, transformedOptions_);
4277
4948
  })).pipe(mergeMap((response_) => {
4278
- return this.transformResult(url_, response_, (r) => this.processFlattenItems(r));
4949
+ return this.transformResult(url_, response_, (r) => this.processBatchCreateItemsFromUrl(r));
4279
4950
  })).pipe(catchError((response_) => {
4280
4951
  if (response_ instanceof HttpResponseBase) {
4281
4952
  try {
4282
- return this.transformResult(url_, response_, (r) => this.processFlattenItems(r));
4953
+ return this.transformResult(url_, response_, (r) => this.processBatchCreateItemsFromUrl(r));
4283
4954
  }
4284
4955
  catch (e) {
4285
4956
  return throwError(e);
@@ -4289,7 +4960,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4289
4960
  return throwError(response_);
4290
4961
  }));
4291
4962
  }
4292
- processFlattenItems(response) {
4963
+ processBatchCreateItemsFromUrl(response) {
4293
4964
  const status = response.status;
4294
4965
  const responseBlob = response instanceof HttpResponse ? response.body :
4295
4966
  response.error instanceof Blob ? response.error : undefined;
@@ -4306,6 +4977,13 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4306
4977
  return of(result200);
4307
4978
  }));
4308
4979
  }
4980
+ else if (status === 404) {
4981
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4982
+ let result404 = null;
4983
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4984
+ return throwException("Not Found", status, _responseText, _headers, result404);
4985
+ }));
4986
+ }
4309
4987
  else if (status === 401) {
4310
4988
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4311
4989
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -4333,9 +5011,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4333
5011
  */
4334
5012
  renderProduct(attachment, tenantId, body) {
4335
5013
  let url_ = this.baseUrl + "/api/atoms/v1/designs/model/render-proof?";
4336
- if (attachment === null)
4337
- throw new Error("The parameter 'attachment' cannot be null.");
4338
- else if (attachment !== undefined)
5014
+ if (attachment !== undefined && attachment !== null)
4339
5015
  url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
4340
5016
  if (tenantId === null)
4341
5017
  throw new Error("The parameter 'tenantId' cannot be null.");
@@ -4412,9 +5088,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4412
5088
  */
4413
5089
  renderDesignPreview(attachment, tenantId, body) {
4414
5090
  let url_ = this.baseUrl + "/api/atoms/v1/designs/render-preview?";
4415
- if (attachment === null)
4416
- throw new Error("The parameter 'attachment' cannot be null.");
4417
- else if (attachment !== undefined)
5091
+ if (attachment !== undefined && attachment !== null)
4418
5092
  url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
4419
5093
  if (tenantId === null)
4420
5094
  throw new Error("The parameter 'tenantId' cannot be null.");
@@ -4538,6 +5212,13 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4538
5212
  return of(result200);
4539
5213
  }));
4540
5214
  }
5215
+ else if (status === 409) {
5216
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
5217
+ let result409 = null;
5218
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5219
+ return throwException("Conflict", status, _responseText, _headers, result409);
5220
+ }));
5221
+ }
4541
5222
  else if (status === 401) {
4542
5223
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4543
5224
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -4565,9 +5246,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4565
5246
  */
4566
5247
  renderDesignProof(attachment, tenantId, body) {
4567
5248
  let url_ = this.baseUrl + "/api/atoms/v1/designs/render-proof?";
4568
- if (attachment === null)
4569
- throw new Error("The parameter 'attachment' cannot be null.");
4570
- else if (attachment !== undefined)
5249
+ if (attachment !== undefined && attachment !== null)
4571
5250
  url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
4572
5251
  if (tenantId === null)
4573
5252
  throw new Error("The parameter 'tenantId' cannot be null.");
@@ -4691,6 +5370,111 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4691
5370
  return of(result200);
4692
5371
  }));
4693
5372
  }
5373
+ else if (status === 409) {
5374
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
5375
+ let result409 = null;
5376
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5377
+ return throwException("Conflict", status, _responseText, _headers, result409);
5378
+ }));
5379
+ }
5380
+ else if (status === 401) {
5381
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
5382
+ return throwException("Unauthorized", status, _responseText, _headers);
5383
+ }));
5384
+ }
5385
+ else if (status === 403) {
5386
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
5387
+ return throwException("Forbidden", status, _responseText, _headers);
5388
+ }));
5389
+ }
5390
+ else if (status !== 200 && status !== 204) {
5391
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
5392
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5393
+ }));
5394
+ }
5395
+ return of(null);
5396
+ }
5397
+ /**
5398
+ * Creates product item.
5399
+ * @param itemType (optional) Desired item type.
5400
+ * @param tenantId (optional) Tenant identifier
5401
+ * @param sourceType (optional)
5402
+ * @param sourceId (optional)
5403
+ * @param sourceOwnerId (optional)
5404
+ * @param url (optional)
5405
+ * @param sourceFile (optional)
5406
+ * @return Success
5407
+ * @deprecated
5408
+ */
5409
+ createItem(itemType, tenantId, sourceType, sourceId, sourceOwnerId, url, sourceFile) {
5410
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items?";
5411
+ if (itemType !== undefined && itemType !== null)
5412
+ url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
5413
+ if (tenantId === null)
5414
+ throw new Error("The parameter 'tenantId' cannot be null.");
5415
+ else if (tenantId !== undefined)
5416
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
5417
+ url_ = url_.replace(/[?&]$/, "");
5418
+ const content_ = new FormData();
5419
+ if (sourceType !== null && sourceType !== undefined)
5420
+ content_.append("sourceType", sourceType.toString());
5421
+ if (sourceId !== null && sourceId !== undefined)
5422
+ content_.append("sourceId", sourceId.toString());
5423
+ if (sourceOwnerId !== null && sourceOwnerId !== undefined)
5424
+ content_.append("sourceOwnerId", sourceOwnerId.toString());
5425
+ if (url !== null && url !== undefined)
5426
+ content_.append("url", url.toString());
5427
+ if (sourceFile !== null && sourceFile !== undefined)
5428
+ content_.append("sourceFile", sourceFile.data, sourceFile.fileName ? sourceFile.fileName : "sourceFile");
5429
+ let options_ = {
5430
+ body: content_,
5431
+ observe: "response",
5432
+ responseType: "blob",
5433
+ headers: new HttpHeaders({
5434
+ "Accept": "application/json"
5435
+ })
5436
+ };
5437
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
5438
+ return this.http.request("post", url_, transformedOptions_);
5439
+ })).pipe(mergeMap((response_) => {
5440
+ return this.transformResult(url_, response_, (r) => this.processCreateItem(r));
5441
+ })).pipe(catchError((response_) => {
5442
+ if (response_ instanceof HttpResponseBase) {
5443
+ try {
5444
+ return this.transformResult(url_, response_, (r) => this.processCreateItem(r));
5445
+ }
5446
+ catch (e) {
5447
+ return throwError(e);
5448
+ }
5449
+ }
5450
+ else
5451
+ return throwError(response_);
5452
+ }));
5453
+ }
5454
+ processCreateItem(response) {
5455
+ const status = response.status;
5456
+ const responseBlob = response instanceof HttpResponse ? response.body :
5457
+ response.error instanceof Blob ? response.error : undefined;
5458
+ let _headers = {};
5459
+ if (response.headers) {
5460
+ for (let key of response.headers.keys()) {
5461
+ _headers[key] = response.headers.get(key);
5462
+ }
5463
+ }
5464
+ if (status === 200) {
5465
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
5466
+ let result200 = null;
5467
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5468
+ return of(result200);
5469
+ }));
5470
+ }
5471
+ else if (status === 404) {
5472
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
5473
+ let result404 = null;
5474
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5475
+ return throwException("Not Found", status, _responseText, _headers, result404);
5476
+ }));
5477
+ }
4694
5478
  else if (status === 401) {
4695
5479
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4696
5480
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -4719,17 +5503,11 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4719
5503
  */
4720
5504
  createPrivateDesignFromDesign(designId, privateDesignId, privateStorageOwner, tenantId) {
4721
5505
  let url_ = this.baseUrl + "/api/atoms/v1/private-designs/from-design?";
4722
- if (designId === null)
4723
- throw new Error("The parameter 'designId' cannot be null.");
4724
- else if (designId !== undefined)
5506
+ if (designId !== undefined && designId !== null)
4725
5507
  url_ += "designId=" + encodeURIComponent("" + designId) + "&";
4726
- if (privateDesignId === null)
4727
- throw new Error("The parameter 'privateDesignId' cannot be null.");
4728
- else if (privateDesignId !== undefined)
5508
+ if (privateDesignId !== undefined && privateDesignId !== null)
4729
5509
  url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
4730
- if (privateStorageOwner === null)
4731
- throw new Error("The parameter 'privateStorageOwner' cannot be null.");
4732
- else if (privateStorageOwner !== undefined)
5510
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
4733
5511
  url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
4734
5512
  if (tenantId === null)
4735
5513
  throw new Error("The parameter 'tenantId' cannot be null.");
@@ -4801,17 +5579,11 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
4801
5579
  */
4802
5580
  createPrivateDesignFromResource(resourceId, privateDesignId, privateStorageOwner, tenantId) {
4803
5581
  let url_ = this.baseUrl + "/api/atoms/v1/private-designs/from-resource?";
4804
- if (resourceId === null)
4805
- throw new Error("The parameter 'resourceId' cannot be null.");
4806
- else if (resourceId !== undefined)
5582
+ if (resourceId !== undefined && resourceId !== null)
4807
5583
  url_ += "resourceId=" + encodeURIComponent("" + resourceId) + "&";
4808
- if (privateDesignId === null)
4809
- throw new Error("The parameter 'privateDesignId' cannot be null.");
4810
- else if (privateDesignId !== undefined)
5584
+ if (privateDesignId !== undefined && privateDesignId !== null)
4811
5585
  url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
4812
- if (privateStorageOwner === null)
4813
- throw new Error("The parameter 'privateStorageOwner' cannot be null.");
4814
- else if (privateStorageOwner !== undefined)
5586
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
4815
5587
  url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
4816
5588
  if (tenantId === null)
4817
5589
  throw new Error("The parameter 'tenantId' cannot be null.");
@@ -5195,9 +5967,7 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
5195
5967
  */
5196
5968
  getCssFont(fontKey, tenantId) {
5197
5969
  let url_ = this.baseUrl + "/api/atoms/v1/ccviewer/GetCssFont?";
5198
- if (fontKey === null)
5199
- throw new Error("The parameter 'fontKey' cannot be null.");
5200
- else if (fontKey !== undefined)
5970
+ if (fontKey !== undefined && fontKey !== null)
5201
5971
  url_ += "fontKey=" + encodeURIComponent("" + fontKey) + "&";
5202
5972
  if (tenantId === null)
5203
5973
  throw new Error("The parameter 'tenantId' cannot be null.");
@@ -5580,77 +6350,41 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
5580
6350
  */
5581
6351
  img(f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, tenantId) {
5582
6352
  let url_ = this.baseUrl + "/api/atoms/v1/ccviewer/img?";
5583
- if (f === null)
5584
- throw new Error("The parameter 'f' cannot be null.");
5585
- else if (f !== undefined)
6353
+ if (f !== undefined && f !== null)
5586
6354
  url_ += "f=" + encodeURIComponent("" + f) + "&";
5587
- if (w === null)
5588
- throw new Error("The parameter 'w' cannot be null.");
5589
- else if (w !== undefined)
6355
+ if (w !== undefined && w !== null)
5590
6356
  url_ += "w=" + encodeURIComponent("" + w) + "&";
5591
- if (h === null)
5592
- throw new Error("The parameter 'h' cannot be null.");
5593
- else if (h !== undefined)
6357
+ if (h !== undefined && h !== null)
5594
6358
  url_ += "h=" + encodeURIComponent("" + h) + "&";
5595
- if (cmyk === null)
5596
- throw new Error("The parameter 'cmyk' cannot be null.");
5597
- else if (cmyk !== undefined)
6359
+ if (cmyk !== undefined && cmyk !== null)
5598
6360
  url_ += "cmyk=" + encodeURIComponent("" + cmyk) + "&";
5599
- if (rgb === null)
5600
- throw new Error("The parameter 'rgb' cannot be null.");
5601
- else if (rgb !== undefined)
6361
+ if (rgb !== undefined && rgb !== null)
5602
6362
  url_ += "rgb=" + encodeURIComponent("" + rgb) + "&";
5603
- if (grayscale === null)
5604
- throw new Error("The parameter 'grayscale' cannot be null.");
5605
- else if (grayscale !== undefined)
6363
+ if (grayscale !== undefined && grayscale !== null)
5606
6364
  url_ += "grayscale=" + encodeURIComponent("" + grayscale) + "&";
5607
- if (target === null)
5608
- throw new Error("The parameter 'target' cannot be null.");
5609
- else if (target !== undefined)
6365
+ if (target !== undefined && target !== null)
5610
6366
  url_ += "target=" + encodeURIComponent("" + target) + "&";
5611
- if (sq === null)
5612
- throw new Error("The parameter 'sq' cannot be null.");
5613
- else if (sq !== undefined)
6367
+ if (sq !== undefined && sq !== null)
5614
6368
  url_ += "sq=" + encodeURIComponent("" + sq) + "&";
5615
- if (effect === null)
5616
- throw new Error("The parameter 'effect' cannot be null.");
5617
- else if (effect !== undefined)
6369
+ if (effect !== undefined && effect !== null)
5618
6370
  url_ += "effect=" + encodeURIComponent("" + effect) + "&";
5619
- if (kp === null)
5620
- throw new Error("The parameter 'kp' cannot be null.");
5621
- else if (kp !== undefined)
6371
+ if (kp !== undefined && kp !== null)
5622
6372
  url_ += "kp=" + encodeURIComponent("" + kp) + "&";
5623
- if (color === null)
5624
- throw new Error("The parameter 'color' cannot be null.");
5625
- else if (color !== undefined)
6373
+ if (color !== undefined && color !== null)
5626
6374
  url_ += "color=" + encodeURIComponent("" + color) + "&";
5627
- if (obm === null)
5628
- throw new Error("The parameter 'obm' cannot be null.");
5629
- else if (obm !== undefined)
6375
+ if (obm !== undefined && obm !== null)
5630
6376
  url_ += "obm=" + encodeURIComponent("" + obm) + "&";
5631
- if (oo === null)
5632
- throw new Error("The parameter 'oo' cannot be null.");
5633
- else if (oo !== undefined)
6377
+ if (oo !== undefined && oo !== null)
5634
6378
  url_ += "oo=" + encodeURIComponent("" + oo) + "&";
5635
- if (alphaMask === null)
5636
- throw new Error("The parameter 'alphaMask' cannot be null.");
5637
- else if (alphaMask !== undefined)
6379
+ if (alphaMask !== undefined && alphaMask !== null)
5638
6380
  url_ += "alphaMask=" + encodeURIComponent("" + alphaMask) + "&";
5639
- if (page === null)
5640
- throw new Error("The parameter 'page' cannot be null.");
5641
- else if (page !== undefined)
6381
+ if (page !== undefined && page !== null)
5642
6382
  url_ += "page=" + encodeURIComponent("" + page) + "&";
5643
- if (colorizeColor === null)
5644
- throw new Error("The parameter 'colorizeColor' cannot be null.");
5645
- else if (colorizeColor !== undefined)
6383
+ if (colorizeColor !== undefined && colorizeColor !== null)
5646
6384
  url_ += "colorizeColor=" + encodeURIComponent("" + colorizeColor) + "&";
5647
- if (rw === null)
5648
- throw new Error("The parameter 'rw' cannot be null.");
5649
- else if (rw !== undefined)
6385
+ if (rw !== undefined && rw !== null)
5650
6386
  url_ += "rw=" + encodeURIComponent("" + rw) + "&";
5651
- if (rh === null)
5652
- throw new Error("The parameter 'rh' cannot be null.");
5653
- else if (rh !== undefined)
6387
+ if (rh !== undefined && rh !== null)
5654
6388
  url_ += "rh=" + encodeURIComponent("" + rh) + "&";
5655
6389
  if (tenantId === null)
5656
6390
  throw new Error("The parameter 'tenantId' cannot be null.");
@@ -5802,9 +6536,7 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
5802
6536
  */
5803
6537
  pth(f, tenantId) {
5804
6538
  let url_ = this.baseUrl + "/api/atoms/v1/ccviewer/pth?";
5805
- if (f === null)
5806
- throw new Error("The parameter 'f' cannot be null.");
5807
- else if (f !== undefined)
6539
+ if (f !== undefined && f !== null)
5808
6540
  url_ += "f=" + encodeURIComponent("" + f) + "&";
5809
6541
  if (tenantId === null)
5810
6542
  throw new Error("The parameter 'tenantId' cannot be null.");
@@ -5887,9 +6619,7 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
5887
6619
  */
5888
6620
  resource(image, tenantId) {
5889
6621
  let url_ = this.baseUrl + "/api/atoms/v1/ccviewer/resource?";
5890
- if (image === null)
5891
- throw new Error("The parameter 'image' cannot be null.");
5892
- else if (image !== undefined)
6622
+ if (image !== undefined && image !== null)
5893
6623
  url_ += "image=" + encodeURIComponent("" + image) + "&";
5894
6624
  if (tenantId === null)
5895
6625
  throw new Error("The parameter 'tenantId' cannot be null.");
@@ -5984,77 +6714,41 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
5984
6714
  */
5985
6715
  svg(f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, tenantId) {
5986
6716
  let url_ = this.baseUrl + "/api/atoms/v1/ccviewer/svg?";
5987
- if (f === null)
5988
- throw new Error("The parameter 'f' cannot be null.");
5989
- else if (f !== undefined)
6717
+ if (f !== undefined && f !== null)
5990
6718
  url_ += "f=" + encodeURIComponent("" + f) + "&";
5991
- if (w === null)
5992
- throw new Error("The parameter 'w' cannot be null.");
5993
- else if (w !== undefined)
6719
+ if (w !== undefined && w !== null)
5994
6720
  url_ += "w=" + encodeURIComponent("" + w) + "&";
5995
- if (h === null)
5996
- throw new Error("The parameter 'h' cannot be null.");
5997
- else if (h !== undefined)
6721
+ if (h !== undefined && h !== null)
5998
6722
  url_ += "h=" + encodeURIComponent("" + h) + "&";
5999
- if (cmyk === null)
6000
- throw new Error("The parameter 'cmyk' cannot be null.");
6001
- else if (cmyk !== undefined)
6723
+ if (cmyk !== undefined && cmyk !== null)
6002
6724
  url_ += "cmyk=" + encodeURIComponent("" + cmyk) + "&";
6003
- if (rgb === null)
6004
- throw new Error("The parameter 'rgb' cannot be null.");
6005
- else if (rgb !== undefined)
6725
+ if (rgb !== undefined && rgb !== null)
6006
6726
  url_ += "rgb=" + encodeURIComponent("" + rgb) + "&";
6007
- if (grayscale === null)
6008
- throw new Error("The parameter 'grayscale' cannot be null.");
6009
- else if (grayscale !== undefined)
6727
+ if (grayscale !== undefined && grayscale !== null)
6010
6728
  url_ += "grayscale=" + encodeURIComponent("" + grayscale) + "&";
6011
- if (target === null)
6012
- throw new Error("The parameter 'target' cannot be null.");
6013
- else if (target !== undefined)
6729
+ if (target !== undefined && target !== null)
6014
6730
  url_ += "target=" + encodeURIComponent("" + target) + "&";
6015
- if (sq === null)
6016
- throw new Error("The parameter 'sq' cannot be null.");
6017
- else if (sq !== undefined)
6731
+ if (sq !== undefined && sq !== null)
6018
6732
  url_ += "sq=" + encodeURIComponent("" + sq) + "&";
6019
- if (effect === null)
6020
- throw new Error("The parameter 'effect' cannot be null.");
6021
- else if (effect !== undefined)
6733
+ if (effect !== undefined && effect !== null)
6022
6734
  url_ += "effect=" + encodeURIComponent("" + effect) + "&";
6023
- if (kp === null)
6024
- throw new Error("The parameter 'kp' cannot be null.");
6025
- else if (kp !== undefined)
6735
+ if (kp !== undefined && kp !== null)
6026
6736
  url_ += "kp=" + encodeURIComponent("" + kp) + "&";
6027
- if (color === null)
6028
- throw new Error("The parameter 'color' cannot be null.");
6029
- else if (color !== undefined)
6737
+ if (color !== undefined && color !== null)
6030
6738
  url_ += "color=" + encodeURIComponent("" + color) + "&";
6031
- if (obm === null)
6032
- throw new Error("The parameter 'obm' cannot be null.");
6033
- else if (obm !== undefined)
6739
+ if (obm !== undefined && obm !== null)
6034
6740
  url_ += "obm=" + encodeURIComponent("" + obm) + "&";
6035
- if (oo === null)
6036
- throw new Error("The parameter 'oo' cannot be null.");
6037
- else if (oo !== undefined)
6741
+ if (oo !== undefined && oo !== null)
6038
6742
  url_ += "oo=" + encodeURIComponent("" + oo) + "&";
6039
- if (alphaMask === null)
6040
- throw new Error("The parameter 'alphaMask' cannot be null.");
6041
- else if (alphaMask !== undefined)
6743
+ if (alphaMask !== undefined && alphaMask !== null)
6042
6744
  url_ += "alphaMask=" + encodeURIComponent("" + alphaMask) + "&";
6043
- if (page === null)
6044
- throw new Error("The parameter 'page' cannot be null.");
6045
- else if (page !== undefined)
6745
+ if (page !== undefined && page !== null)
6046
6746
  url_ += "page=" + encodeURIComponent("" + page) + "&";
6047
- if (colorizeColor === null)
6048
- throw new Error("The parameter 'colorizeColor' cannot be null.");
6049
- else if (colorizeColor !== undefined)
6747
+ if (colorizeColor !== undefined && colorizeColor !== null)
6050
6748
  url_ += "colorizeColor=" + encodeURIComponent("" + colorizeColor) + "&";
6051
- if (rw === null)
6052
- throw new Error("The parameter 'rw' cannot be null.");
6053
- else if (rw !== undefined)
6749
+ if (rw !== undefined && rw !== null)
6054
6750
  url_ += "rw=" + encodeURIComponent("" + rw) + "&";
6055
- if (rh === null)
6056
- throw new Error("The parameter 'rh' cannot be null.");
6057
- else if (rh !== undefined)
6751
+ if (rh !== undefined && rh !== null)
6058
6752
  url_ += "rh=" + encodeURIComponent("" + rh) + "&";
6059
6753
  if (tenantId === null)
6060
6754
  throw new Error("The parameter 'tenantId' cannot be null.");
@@ -6137,9 +6831,7 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
6137
6831
  */
6138
6832
  txt(f, tenantId) {
6139
6833
  let url_ = this.baseUrl + "/api/atoms/v1/ccviewer/txt?";
6140
- if (f === null)
6141
- throw new Error("The parameter 'f' cannot be null.");
6142
- else if (f !== undefined)
6834
+ if (f !== undefined && f !== null)
6143
6835
  url_ += "f=" + encodeURIComponent("" + f) + "&";
6144
6836
  if (tenantId === null)
6145
6837
  throw new Error("The parameter 'tenantId' cannot be null.");
@@ -7059,6 +7751,7 @@ var ItemSourceType;
7059
7751
  ItemSourceType["File"] = "File";
7060
7752
  ItemSourceType["ImageStorage"] = "ImageStorage";
7061
7753
  ItemSourceType["PrivateImageStorage"] = "PrivateImageStorage";
7754
+ ItemSourceType["Url"] = "Url";
7062
7755
  })(ItemSourceType || (ItemSourceType = {}));
7063
7756
  var ItemType;
7064
7757
  (function (ItemType) {