@aurigma/axios-design-atoms-api-client 2.70.4 → 2.72.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.
@@ -8,7 +8,7 @@
8
8
  //----------------------
9
9
  // ReSharper disable InconsistentNaming
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.ApiException = exports.TextVerticalAlignment = exports.TextAlignment = exports.ProductProofInterpolationMode = exports.ProductProofFormat = exports.ProductPreviewFormat = exports.ProductPatchType = exports.PlaceholderItemContentType = exports.ItemType = exports.ItemSourceType = exports.ImagePreviewFormat = exports.ImagePreviewFitMode = exports.DesignElementType = exports.ConflictType = exports.DesignAtomsViewerApiClient = exports.DesignAtomsServiceApiClient = exports.DesignAtomsPrintProductItemsApiClient = exports.DesignAtomsPrintProductApiClient = exports.DesignAtomsPalettesApiClient = exports.DesignAtomsMockups3dApiClient = exports.DesignAtomsImagesApiClient = exports.DesignAtomsCompatibilityApiClient = exports.BuildInfoApiClient = exports.ApiClientBase = exports.ApiClientConfiguration = void 0;
11
+ exports.ApiException = exports.TextVerticalAlignment = exports.TextAlignment = exports.ProductProofInterpolationMode = exports.ProductProofFormat = exports.ProductPreviewFormat = exports.ProductPatchType = exports.PlaceholderItemContentType = exports.ItemType = exports.ItemSourceType = exports.ImagePreviewFormat = exports.ImagePreviewFitMode = exports.ImageExtractionFormat = exports.DesignElementType = exports.ConflictType = exports.DesignAtomsViewerApiClient = exports.DesignAtomsServiceApiClient = exports.DesignAtomsPrintProductItemsApiClient = exports.DesignAtomsPrintProductApiClient = exports.DesignAtomsPalettesApiClient = exports.DesignAtomsMockups3dApiClient = exports.DesignAtomsImagesApiClient = exports.DesignAtomsCompatibilityApiClient = exports.BuildInfoApiClient = exports.ApiClientBase = exports.ApiClientConfiguration = void 0;
12
12
  const axios_1 = require("axios");
13
13
  class ApiClientConfiguration {
14
14
  apiUrl;
@@ -743,30 +743,43 @@ class DesignAtomsCompatibilityApiClient extends ApiClientBase {
743
743
  }
744
744
  /**
745
745
  * Retrieves an image with resized dimensions and additional visual effects based on the provided parameters.
746
- This method accepts query parameters that control the output of the image.
747
746
  * @param f (optional) The identifier of the original image file.
748
747
  * @param w (optional) Target width of the resulting image.
749
748
  * @param h (optional) Target height of the resulting image.
750
749
  * @param cmyk (optional) Name of the CMYK profile used for color conversion.
751
750
  * @param rgb (optional) Name of the RGB profile used for color conversion.
752
751
  * @param grayscale (optional) Name of the grayscale profile used to convert into shades of gray.
753
- * @param target (optional) Target color space, one of `"Rgb"`, `"Grayscale"`, or `"Cmyk"`.
754
- * @param sq (optional) Indicates that the image is squared. The default value is `false`.
755
- * @param effect (optional) Effect applied to the image. The default value is `"None"`.
756
- Possible values: `"None"`, `"BlackAndWhite"`, `"FlipVertical"`, `"FlipHorizontal"`, `"Colorize"`, `"Grayscale"`, or `"BlackAndTransparent"`.
757
- * @param kp (optional) Indicates that image proportions should be maintained. The default value is `false`.
758
- * @param color (optional) String defining an overlay color in the RGB, RGBA, CMYK, or CMYKA format. By default, it's an empty string.
759
- * @param obm (optional) Overlay blend mode used for blending colors. By default, it's an empty string.
760
- Possible values: `"Normal"`, `"Multiply"`, `"Screen"`, `"Overlay"`, `"Darken"`, `"Lighten"`, `"ColorDodge"`, `"ColorBurn"`, `"HardLight"`, `"SoftLight"`, `"Difference"`, `"Exclusion"`, `"None"`, or `"LinearBurn"`.
761
- * @param oo (optional) Opacity level of the overlaid layer, in the range `[0.0,1.0]`. The default value is `null`.
762
- * @param alphaMask (optional) Enables alpha mask processing. The default value is `false`.
763
- * @param page (optional) Page index in a PDF document that needs to be processed. The default value is `0`.
764
- * @param colorizeColor (optional) Color applied for the `"Colorize"` image effect. By default, it's an empty string.
765
- * @param rw (optional) Rectangle width for area selection. The default value is `0`.
766
- * @param rh (optional) Rectangle height for area selection. The default value is `0`.
752
+ * @param target (optional) Target color space, one of "Rgb", "Grayscale", or "Cmyk".
753
+ * @param sq (optional) Indicates that the image is squared.
754
+ The default value is "false".
755
+ * @param effect (optional) Effect applied to the image.
756
+ Possible values: "None", "BlackAndWhite", "FlipVertical", "FlipHorizontal", "Colorize", "Grayscale", or "BlackAndTransparent".
757
+ The default value is "None".
758
+ * @param kp (optional) Indicates that image proportions should be maintained.
759
+ The default value is "false".
760
+ * @param color (optional) Overlay color in the RGB, RGBA, CMYK, or CMYKA format.
761
+ By default, it's an empty string.
762
+ * @param obm (optional) Overlay blend mode used for blending colors.
763
+ Possible values: "Normal", "Multiply", "Screen", "Overlay", "Darken", "Lighten", "ColorDodge",
764
+ "ColorBurn", "HardLight", "SoftLight", `Difference", "Exclusion", "None", or "LinearBurn".
765
+ By default, it's an empty string.
766
+ * @param oo (optional) Opacity level of the overlaid layer, in the range [0.0, 1.0].
767
+ The default value is "null".
768
+ * @param alphaMask (optional) Enables alpha mask processing.
769
+ The default value is "false".
770
+ * @param page (optional) Page index in a PDF document that needs to be processed.
771
+ The default value is "0".
772
+ * @param colorizeColor (optional) Color applied for the "Colorize" image effect.
773
+ By default, it's an empty string.
774
+ * @param rw (optional) Rectangle width for area selection.
775
+ The default value is "0".
776
+ * @param rh (optional) Rectangle height for area selection.
777
+ The default value is "0".
778
+ * @param dt (optional) Dithering type.
779
+ * @param da (optional) Dithering amount.
767
780
  * @return Success
768
781
  */
769
- img(tenantId, f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, cancelToken) {
782
+ img(tenantId, f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, dt, da, cancelToken) {
770
783
  let url_ = this.baseUrl + "/api/atoms/v1/tenants/{tenantId}/api/ccviewer/img?";
771
784
  if (tenantId === undefined || tenantId === null)
772
785
  throw new Error("The parameter 'tenantId' must be defined.");
@@ -807,6 +820,10 @@ class DesignAtomsCompatibilityApiClient extends ApiClientBase {
807
820
  url_ += "rw=" + encodeURIComponent("" + rw) + "&";
808
821
  if (rh !== undefined && rh !== null)
809
822
  url_ += "rh=" + encodeURIComponent("" + rh) + "&";
823
+ if (dt !== undefined && dt !== null)
824
+ url_ += "dt=" + encodeURIComponent("" + dt) + "&";
825
+ if (da !== undefined && da !== null)
826
+ url_ += "da=" + encodeURIComponent("" + da) + "&";
810
827
  url_ = url_.replace(/[?&]$/, "");
811
828
  let options_ = {
812
829
  responseType: "blob",
@@ -1069,23 +1086,37 @@ class DesignAtomsCompatibilityApiClient extends ApiClientBase {
1069
1086
  * @param cmyk (optional) Name of the CMYK profile used for color conversion.
1070
1087
  * @param rgb (optional) Name of the RGB profile used for color conversion.
1071
1088
  * @param grayscale (optional) Name of the grayscale profile used to convert into shades of gray.
1072
- * @param target (optional) Target color space, one of `"Rgb"`, `"Grayscale"`, or `"Cmyk"`.
1073
- * @param sq (optional) Indicates that the image is squared. The default value is `false`.
1074
- * @param effect (optional) Effect applied to the image. The default value is `"None"`.
1075
- Possible values: `"None"`, `"BlackAndWhite"`, `"FlipVertical"`, `"FlipHorizontal"`, `"Colorize"`, `"Grayscale"`, or `"BlackAndTransparent"`.
1076
- * @param kp (optional) Indicates that image proportions should be maintained. The default value is `false`.
1077
- * @param color (optional) String defining an overlay color in the RGB, RGBA, CMYK, or CMYKA format. By default, it's an empty string.
1078
- * @param obm (optional) Overlay blend mode used for blending colors. By default, it's an empty string.
1079
- Possible values: `"Normal"`, `"Multiply"`, `"Screen"`, `"Overlay"`, `"Darken"`, `"Lighten"`, `"ColorDodge"`, `"ColorBurn"`, `"HardLight"`, `"SoftLight"`, `"Difference"`, `"Exclusion"`, `"None"`, or `"LinearBurn"`.
1080
- * @param oo (optional) Opacity level of the overlaid layer, in the range `[0.0,1.0]`. The default value is `null`.
1081
- * @param alphaMask (optional) Enables alpha mask processing. The default value is `false`.
1082
- * @param page (optional) Page index in a PDF document that needs to be processed. The default value is `0`.
1083
- * @param colorizeColor (optional) Color applied for the `"Colorize"` image effect. By default, it's an empty string.
1084
- * @param rw (optional) Rectangle width for area selection. The default value is `0`.
1085
- * @param rh (optional) Rectangle height for area selection. The default value is `0`.
1089
+ * @param target (optional) Target color space, one of "Rgb", "Grayscale", or "Cmyk".
1090
+ * @param sq (optional) Indicates that the image is squared.
1091
+ The default value is "false".
1092
+ * @param effect (optional) Effect applied to the image.
1093
+ Possible values: "None", "BlackAndWhite", "FlipVertical", "FlipHorizontal", "Colorize", "Grayscale", or "BlackAndTransparent".
1094
+ The default value is "None".
1095
+ * @param kp (optional) Indicates that image proportions should be maintained.
1096
+ The default value is "false".
1097
+ * @param color (optional) Overlay color in the RGB, RGBA, CMYK, or CMYKA format.
1098
+ By default, it's an empty string.
1099
+ * @param obm (optional) Overlay blend mode used for blending colors.
1100
+ Possible values: "Normal", "Multiply", "Screen", "Overlay", "Darken", "Lighten", "ColorDodge",
1101
+ "ColorBurn", "HardLight", "SoftLight", `Difference", "Exclusion", "None", or "LinearBurn".
1102
+ By default, it's an empty string.
1103
+ * @param oo (optional) Opacity level of the overlaid layer, in the range [0.0, 1.0].
1104
+ The default value is "null".
1105
+ * @param alphaMask (optional) Enables alpha mask processing.
1106
+ The default value is "false".
1107
+ * @param page (optional) Page index in a PDF document that needs to be processed.
1108
+ The default value is "0".
1109
+ * @param colorizeColor (optional) Color applied for the "Colorize" image effect.
1110
+ By default, it's an empty string.
1111
+ * @param rw (optional) Rectangle width for area selection.
1112
+ The default value is "0".
1113
+ * @param rh (optional) Rectangle height for area selection.
1114
+ The default value is "0".
1115
+ * @param dt (optional) Dithering type.
1116
+ * @param da (optional) Dithering amount.
1086
1117
  * @return Success
1087
1118
  */
1088
- svg(tenantId, f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, cancelToken) {
1119
+ svg(tenantId, f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, dt, da, cancelToken) {
1089
1120
  let url_ = this.baseUrl + "/api/atoms/v1/tenants/{tenantId}/api/ccviewer/svg?";
1090
1121
  if (tenantId === undefined || tenantId === null)
1091
1122
  throw new Error("The parameter 'tenantId' must be defined.");
@@ -1126,6 +1157,10 @@ class DesignAtomsCompatibilityApiClient extends ApiClientBase {
1126
1157
  url_ += "rw=" + encodeURIComponent("" + rw) + "&";
1127
1158
  if (rh !== undefined && rh !== null)
1128
1159
  url_ += "rh=" + encodeURIComponent("" + rh) + "&";
1160
+ if (dt !== undefined && dt !== null)
1161
+ url_ += "dt=" + encodeURIComponent("" + dt) + "&";
1162
+ if (da !== undefined && da !== null)
1163
+ url_ += "da=" + encodeURIComponent("" + da) + "&";
1129
1164
  url_ = url_.replace(/[?&]$/, "");
1130
1165
  let options_ = {
1131
1166
  responseType: "blob",
@@ -2004,6 +2039,13 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
2004
2039
  result404 = JSON.parse(resultData404);
2005
2040
  return throwException("Not Found", status, _responseText, _headers, result404);
2006
2041
  }
2042
+ else if (status === 409) {
2043
+ const _responseText = response.data;
2044
+ let result409 = null;
2045
+ let resultData409 = _responseText;
2046
+ result409 = JSON.parse(resultData409);
2047
+ return throwException("Conflict", status, _responseText, _headers, result409);
2048
+ }
2007
2049
  else if (status === 401) {
2008
2050
  const _responseText = response.data;
2009
2051
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -2030,9 +2072,10 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
2030
2072
  * @param height (optional)
2031
2073
  * @param fileFormat (optional)
2032
2074
  * @param fitMode (optional)
2075
+ * @param pageIndex (optional)
2033
2076
  * @return Success
2034
2077
  */
2035
- renderImagePreviewFromFile(attachment, tenantId, sourceFile, mockupOwnerId, mockupId, width, height, fileFormat, fitMode, cancelToken) {
2078
+ renderImagePreviewFromFile(attachment, tenantId, sourceFile, mockupOwnerId, mockupId, width, height, fileFormat, fitMode, pageIndex, cancelToken) {
2036
2079
  let url_ = this.baseUrl + "/api/atoms/v1/images/render-preview/from-file?";
2037
2080
  if (attachment !== undefined && attachment !== null)
2038
2081
  url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
@@ -2056,6 +2099,8 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
2056
2099
  content_.append("fileFormat", fileFormat.toString());
2057
2100
  if (fitMode !== null && fitMode !== undefined)
2058
2101
  content_.append("fitMode", fitMode.toString());
2102
+ if (pageIndex !== null && pageIndex !== undefined)
2103
+ content_.append("pageIndex", pageIndex.toString());
2059
2104
  let options_ = {
2060
2105
  data: content_,
2061
2106
  responseType: "blob",
@@ -2102,6 +2147,13 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
2102
2147
  result404 = JSON.parse(resultData404);
2103
2148
  return throwException("Not Found", status, _responseText, _headers, result404);
2104
2149
  }
2150
+ else if (status === 409) {
2151
+ const _responseText = response.data;
2152
+ let result409 = null;
2153
+ let resultData409 = _responseText;
2154
+ result409 = JSON.parse(resultData409);
2155
+ return throwException("Conflict", status, _responseText, _headers, result409);
2156
+ }
2105
2157
  else if (status === 401) {
2106
2158
  const _responseText = response.data;
2107
2159
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -2133,9 +2185,10 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
2133
2185
  * @param height (optional)
2134
2186
  * @param fileFormat (optional)
2135
2187
  * @param fitMode (optional)
2188
+ * @param pageIndex (optional)
2136
2189
  * @return Success
2137
2190
  */
2138
- renderImagePreviewFromFileToResource(tenantId, resourceOwnerId, resourceNamespace, resourceName, resourceSourceId, resourceType, anonymousAccess, overwriteExistingResource, sourceFile, mockupOwnerId, mockupId, width, height, fileFormat, fitMode, cancelToken) {
2191
+ renderImagePreviewFromFileToResource(tenantId, resourceOwnerId, resourceNamespace, resourceName, resourceSourceId, resourceType, anonymousAccess, overwriteExistingResource, sourceFile, mockupOwnerId, mockupId, width, height, fileFormat, fitMode, pageIndex, cancelToken) {
2139
2192
  let url_ = this.baseUrl + "/api/atoms/v1/images/render-preview/from-file/to-resource?";
2140
2193
  if (tenantId === null)
2141
2194
  throw new Error("The parameter 'tenantId' cannot be null.");
@@ -2171,6 +2224,8 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
2171
2224
  content_.append("fileFormat", fileFormat.toString());
2172
2225
  if (fitMode !== null && fitMode !== undefined)
2173
2226
  content_.append("fitMode", fitMode.toString());
2227
+ if (pageIndex !== null && pageIndex !== undefined)
2228
+ content_.append("pageIndex", pageIndex.toString());
2174
2229
  let options_ = {
2175
2230
  data: content_,
2176
2231
  method: "POST",
@@ -2303,6 +2358,13 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
2303
2358
  result404 = JSON.parse(resultData404);
2304
2359
  return throwException("Not Found", status, _responseText, _headers, result404);
2305
2360
  }
2361
+ else if (status === 409) {
2362
+ const _responseText = response.data;
2363
+ let result409 = null;
2364
+ let resultData409 = _responseText;
2365
+ result409 = JSON.parse(resultData409);
2366
+ return throwException("Conflict", status, _responseText, _headers, result409);
2367
+ }
2306
2368
  else if (status === 401) {
2307
2369
  const _responseText = response.data;
2308
2370
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -5915,6 +5977,13 @@ class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
5915
5977
  result200 = JSON.parse(resultData200);
5916
5978
  return Promise.resolve(result200);
5917
5979
  }
5980
+ else if (status === 400) {
5981
+ const _responseText = response.data;
5982
+ let result400 = null;
5983
+ let resultData400 = _responseText;
5984
+ result400 = JSON.parse(resultData400);
5985
+ return throwException("Bad Request", status, _responseText, _headers, result400);
5986
+ }
5918
5987
  else if (status === 401) {
5919
5988
  const _responseText = response.data;
5920
5989
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -5983,6 +6052,88 @@ class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
5983
6052
  const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
5984
6053
  return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
5985
6054
  }
6055
+ else if (status === 400) {
6056
+ const _responseText = response.data;
6057
+ let result400 = null;
6058
+ let resultData400 = _responseText;
6059
+ result400 = JSON.parse(resultData400);
6060
+ return throwException("Bad Request", status, _responseText, _headers, result400);
6061
+ }
6062
+ else if (status === 401) {
6063
+ const _responseText = response.data;
6064
+ return throwException("Unauthorized", status, _responseText, _headers);
6065
+ }
6066
+ else if (status === 403) {
6067
+ const _responseText = response.data;
6068
+ return throwException("Forbidden", status, _responseText, _headers);
6069
+ }
6070
+ else if (status !== 200 && status !== 204) {
6071
+ const _responseText = response.data;
6072
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6073
+ }
6074
+ return Promise.resolve(null);
6075
+ }
6076
+ /**
6077
+ * Extracts print-product item image.
6078
+ * @param tenantId (optional) Tenant ID.
6079
+ * @param body (optional) Extraction parameters.
6080
+ * @return Success
6081
+ */
6082
+ extractItemImageToResource(tenantId, body, cancelToken) {
6083
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/print-product/items/extract-image/to-resource?";
6084
+ if (tenantId === null)
6085
+ throw new Error("The parameter 'tenantId' cannot be null.");
6086
+ else if (tenantId !== undefined)
6087
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
6088
+ url_ = url_.replace(/[?&]$/, "");
6089
+ const content_ = JSON.stringify(body);
6090
+ let options_ = {
6091
+ data: content_,
6092
+ method: "POST",
6093
+ url: url_,
6094
+ headers: {
6095
+ "Content-Type": "application/json",
6096
+ "Accept": "application/octet-stream"
6097
+ },
6098
+ cancelToken
6099
+ };
6100
+ return this.transformOptions(options_).then(transformedOptions_ => {
6101
+ return this.instance.request(transformedOptions_);
6102
+ }).catch((_error) => {
6103
+ if (isAxiosError(_error) && _error.response) {
6104
+ return _error.response;
6105
+ }
6106
+ else {
6107
+ throw _error;
6108
+ }
6109
+ }).then((_response) => {
6110
+ return this.transformResult(url_, _response, (_response) => this.processExtractItemImageToResource(_response));
6111
+ });
6112
+ }
6113
+ processExtractItemImageToResource(response) {
6114
+ const status = response.status;
6115
+ let _headers = {};
6116
+ if (response.headers && typeof response.headers === "object") {
6117
+ for (let k in response.headers) {
6118
+ if (response.headers.hasOwnProperty(k)) {
6119
+ _headers[k] = response.headers[k];
6120
+ }
6121
+ }
6122
+ }
6123
+ if (status === 200) {
6124
+ const _responseText = response.data;
6125
+ let result200 = null;
6126
+ let resultData200 = _responseText;
6127
+ result200 = JSON.parse(resultData200);
6128
+ return Promise.resolve(result200);
6129
+ }
6130
+ else if (status === 400) {
6131
+ const _responseText = response.data;
6132
+ let result400 = null;
6133
+ let resultData400 = _responseText;
6134
+ result400 = JSON.parse(resultData400);
6135
+ return throwException("Bad Request", status, _responseText, _headers, result400);
6136
+ }
5986
6137
  else if (status === 401) {
5987
6138
  const _responseText = response.data;
5988
6139
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -6054,6 +6205,20 @@ class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
6054
6205
  result200 = JSON.parse(resultData200);
6055
6206
  return Promise.resolve(result200);
6056
6207
  }
6208
+ else if (status === 400) {
6209
+ const _responseText = response.data;
6210
+ let result400 = null;
6211
+ let resultData400 = _responseText;
6212
+ result400 = JSON.parse(resultData400);
6213
+ return throwException("Bad Request", status, _responseText, _headers, result400);
6214
+ }
6215
+ else if (status === 409) {
6216
+ const _responseText = response.data;
6217
+ let result409 = null;
6218
+ let resultData409 = _responseText;
6219
+ result409 = JSON.parse(resultData409);
6220
+ return throwException("Conflict", status, _responseText, _headers, result409);
6221
+ }
6057
6222
  else if (status === 401) {
6058
6223
  const _responseText = response.data;
6059
6224
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -6074,10 +6239,11 @@ class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
6074
6239
  * @param tenantId (optional) Tenant ID.
6075
6240
  * @param sourceFile (optional)
6076
6241
  * @param paletteUID (optional)
6242
+ * @param pageIndex (optional)
6077
6243
  * @param preserveOriginalFile (optional)
6078
6244
  * @return Success
6079
6245
  */
6080
- createItemFromFile(itemType, tenantId, sourceFile, paletteUID, preserveOriginalFile, cancelToken) {
6246
+ createItemFromFile(itemType, tenantId, sourceFile, paletteUID, pageIndex, preserveOriginalFile, cancelToken) {
6081
6247
  let url_ = this.baseUrl + "/api/atoms/v1/designs/print-product/items/from-file?";
6082
6248
  if (itemType !== undefined && itemType !== null)
6083
6249
  url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
@@ -6091,6 +6257,8 @@ class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
6091
6257
  content_.append("sourceFile", sourceFile.data, sourceFile.fileName ? sourceFile.fileName : "sourceFile");
6092
6258
  if (paletteUID !== null && paletteUID !== undefined)
6093
6259
  content_.append("paletteUID", paletteUID.toString());
6260
+ if (pageIndex !== null && pageIndex !== undefined)
6261
+ content_.append("pageIndex", pageIndex.toString());
6094
6262
  if (preserveOriginalFile !== null && preserveOriginalFile !== undefined)
6095
6263
  content_.append("preserveOriginalFile", preserveOriginalFile.toString());
6096
6264
  let options_ = {
@@ -6132,6 +6300,13 @@ class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
6132
6300
  result200 = JSON.parse(resultData200);
6133
6301
  return Promise.resolve(result200);
6134
6302
  }
6303
+ else if (status === 400) {
6304
+ const _responseText = response.data;
6305
+ let result400 = null;
6306
+ let resultData400 = _responseText;
6307
+ result400 = JSON.parse(resultData400);
6308
+ return throwException("Bad Request", status, _responseText, _headers, result400);
6309
+ }
6135
6310
  else if (status === 404) {
6136
6311
  const _responseText = response.data;
6137
6312
  let result404 = null;
@@ -6224,6 +6399,13 @@ class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
6224
6399
  result200 = JSON.parse(resultData200);
6225
6400
  return Promise.resolve(result200);
6226
6401
  }
6402
+ else if (status === 400) {
6403
+ const _responseText = response.data;
6404
+ let result400 = null;
6405
+ let resultData400 = _responseText;
6406
+ result400 = JSON.parse(resultData400);
6407
+ return throwException("Bad Request", status, _responseText, _headers, result400);
6408
+ }
6227
6409
  else if (status === 404) {
6228
6410
  const _responseText = response.data;
6229
6411
  let result404 = null;
@@ -6309,6 +6491,13 @@ class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
6309
6491
  result200 = JSON.parse(resultData200);
6310
6492
  return Promise.resolve(result200);
6311
6493
  }
6494
+ else if (status === 400) {
6495
+ const _responseText = response.data;
6496
+ let result400 = null;
6497
+ let resultData400 = _responseText;
6498
+ result400 = JSON.parse(resultData400);
6499
+ return throwException("Bad Request", status, _responseText, _headers, result400);
6500
+ }
6312
6501
  else if (status === 404) {
6313
6502
  const _responseText = response.data;
6314
6503
  let result404 = null;
@@ -6394,6 +6583,13 @@ class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
6394
6583
  result200 = JSON.parse(resultData200);
6395
6584
  return Promise.resolve(result200);
6396
6585
  }
6586
+ else if (status === 400) {
6587
+ const _responseText = response.data;
6588
+ let result400 = null;
6589
+ let resultData400 = _responseText;
6590
+ result400 = JSON.parse(resultData400);
6591
+ return throwException("Bad Request", status, _responseText, _headers, result400);
6592
+ }
6397
6593
  else if (status === 404) {
6398
6594
  const _responseText = response.data;
6399
6595
  let result404 = null;
@@ -9347,31 +9543,44 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
9347
9543
  }
9348
9544
  /**
9349
9545
  * Retrieves an image with resized dimensions and additional visual effects based on the provided parameters.
9350
- This method accepts query parameters that control the output of the image.
9351
9546
  * @param f (optional) The identifier of the original image file.
9352
9547
  * @param w (optional) Target width of the resulting image.
9353
9548
  * @param h (optional) Target height of the resulting image.
9354
9549
  * @param cmyk (optional) Name of the CMYK profile used for color conversion.
9355
9550
  * @param rgb (optional) Name of the RGB profile used for color conversion.
9356
9551
  * @param grayscale (optional) Name of the grayscale profile used to convert into shades of gray.
9357
- * @param target (optional) Target color space, one of `"Rgb"`, `"Grayscale"`, or `"Cmyk"`.
9358
- * @param sq (optional) Indicates that the image is squared. The default value is `false`.
9359
- * @param effect (optional) Effect applied to the image. The default value is `"None"`.
9360
- Possible values: `"None"`, `"BlackAndWhite"`, `"FlipVertical"`, `"FlipHorizontal"`, `"Colorize"`, `"Grayscale"`, or `"BlackAndTransparent"`.
9361
- * @param kp (optional) Indicates that image proportions should be maintained. The default value is `false`.
9362
- * @param color (optional) String defining an overlay color in the RGB, RGBA, CMYK, or CMYKA format. By default, it's an empty string.
9363
- * @param obm (optional) Overlay blend mode used for blending colors. By default, it's an empty string.
9364
- Possible values: `"Normal"`, `"Multiply"`, `"Screen"`, `"Overlay"`, `"Darken"`, `"Lighten"`, `"ColorDodge"`, `"ColorBurn"`, `"HardLight"`, `"SoftLight"`, `"Difference"`, `"Exclusion"`, `"None"`, or `"LinearBurn"`.
9365
- * @param oo (optional) Opacity level of the overlaid layer, in the range `[0.0,1.0]`. The default value is `null`.
9366
- * @param alphaMask (optional) Enables alpha mask processing. The default value is `false`.
9367
- * @param page (optional) Page index in a PDF document that needs to be processed. The default value is `0`.
9368
- * @param colorizeColor (optional) Color applied for the `"Colorize"` image effect. By default, it's an empty string.
9369
- * @param rw (optional) Rectangle width for area selection. The default value is `0`.
9370
- * @param rh (optional) Rectangle height for area selection. The default value is `0`.
9552
+ * @param target (optional) Target color space, one of "Rgb", "Grayscale", or "Cmyk".
9553
+ * @param sq (optional) Indicates that the image is squared.
9554
+ The default value is "false".
9555
+ * @param effect (optional) Effect applied to the image.
9556
+ Possible values: "None", "BlackAndWhite", "FlipVertical", "FlipHorizontal", "Colorize", "Grayscale", or "BlackAndTransparent".
9557
+ The default value is "None".
9558
+ * @param kp (optional) Indicates that image proportions should be maintained.
9559
+ The default value is "false".
9560
+ * @param color (optional) Overlay color in the RGB, RGBA, CMYK, or CMYKA format.
9561
+ By default, it's an empty string.
9562
+ * @param obm (optional) Overlay blend mode used for blending colors.
9563
+ Possible values: "Normal", "Multiply", "Screen", "Overlay", "Darken", "Lighten", "ColorDodge",
9564
+ "ColorBurn", "HardLight", "SoftLight", `Difference", "Exclusion", "None", or "LinearBurn".
9565
+ By default, it's an empty string.
9566
+ * @param oo (optional) Opacity level of the overlaid layer, in the range [0.0, 1.0].
9567
+ The default value is "null".
9568
+ * @param alphaMask (optional) Enables alpha mask processing.
9569
+ The default value is "false".
9570
+ * @param page (optional) Page index in a PDF document that needs to be processed.
9571
+ The default value is "0".
9572
+ * @param colorizeColor (optional) Color applied for the "Colorize" image effect.
9573
+ By default, it's an empty string.
9574
+ * @param rw (optional) Rectangle width for area selection.
9575
+ The default value is "0".
9576
+ * @param rh (optional) Rectangle height for area selection.
9577
+ The default value is "0".
9578
+ * @param dt (optional) Dithering type.
9579
+ * @param da (optional) Dithering amount.
9371
9580
  * @param tenantId (optional) Tenant ID.
9372
9581
  * @return Success
9373
9582
  */
9374
- img(f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, tenantId, cancelToken) {
9583
+ img(f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, dt, da, tenantId, cancelToken) {
9375
9584
  let url_ = this.baseUrl + "/api/atoms/v1/ccviewer/img?";
9376
9585
  if (f !== undefined && f !== null)
9377
9586
  url_ += "f=" + encodeURIComponent("" + f) + "&";
@@ -9409,6 +9618,10 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
9409
9618
  url_ += "rw=" + encodeURIComponent("" + rw) + "&";
9410
9619
  if (rh !== undefined && rh !== null)
9411
9620
  url_ += "rh=" + encodeURIComponent("" + rh) + "&";
9621
+ if (dt !== undefined && dt !== null)
9622
+ url_ += "dt=" + encodeURIComponent("" + dt) + "&";
9623
+ if (da !== undefined && da !== null)
9624
+ url_ += "da=" + encodeURIComponent("" + da) + "&";
9412
9625
  if (tenantId === null)
9413
9626
  throw new Error("The parameter 'tenantId' cannot be null.");
9414
9627
  else if (tenantId !== undefined)
@@ -9681,24 +9894,38 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
9681
9894
  * @param cmyk (optional) Name of the CMYK profile used for color conversion.
9682
9895
  * @param rgb (optional) Name of the RGB profile used for color conversion.
9683
9896
  * @param grayscale (optional) Name of the grayscale profile used to convert into shades of gray.
9684
- * @param target (optional) Target color space, one of `"Rgb"`, `"Grayscale"`, or `"Cmyk"`.
9685
- * @param sq (optional) Indicates that the image is squared. The default value is `false`.
9686
- * @param effect (optional) Effect applied to the image. The default value is `"None"`.
9687
- Possible values: `"None"`, `"BlackAndWhite"`, `"FlipVertical"`, `"FlipHorizontal"`, `"Colorize"`, `"Grayscale"`, or `"BlackAndTransparent"`.
9688
- * @param kp (optional) Indicates that image proportions should be maintained. The default value is `false`.
9689
- * @param color (optional) String defining an overlay color in the RGB, RGBA, CMYK, or CMYKA format. By default, it's an empty string.
9690
- * @param obm (optional) Overlay blend mode used for blending colors. By default, it's an empty string.
9691
- Possible values: `"Normal"`, `"Multiply"`, `"Screen"`, `"Overlay"`, `"Darken"`, `"Lighten"`, `"ColorDodge"`, `"ColorBurn"`, `"HardLight"`, `"SoftLight"`, `"Difference"`, `"Exclusion"`, `"None"`, or `"LinearBurn"`.
9692
- * @param oo (optional) Opacity level of the overlaid layer, in the range `[0.0,1.0]`. The default value is `null`.
9693
- * @param alphaMask (optional) Enables alpha mask processing. The default value is `false`.
9694
- * @param page (optional) Page index in a PDF document that needs to be processed. The default value is `0`.
9695
- * @param colorizeColor (optional) Color applied for the `"Colorize"` image effect. By default, it's an empty string.
9696
- * @param rw (optional) Rectangle width for area selection. The default value is `0`.
9697
- * @param rh (optional) Rectangle height for area selection. The default value is `0`.
9897
+ * @param target (optional) Target color space, one of "Rgb", "Grayscale", or "Cmyk".
9898
+ * @param sq (optional) Indicates that the image is squared.
9899
+ The default value is "false".
9900
+ * @param effect (optional) Effect applied to the image.
9901
+ Possible values: "None", "BlackAndWhite", "FlipVertical", "FlipHorizontal", "Colorize", "Grayscale", or "BlackAndTransparent".
9902
+ The default value is "None".
9903
+ * @param kp (optional) Indicates that image proportions should be maintained.
9904
+ The default value is "false".
9905
+ * @param color (optional) Overlay color in the RGB, RGBA, CMYK, or CMYKA format.
9906
+ By default, it's an empty string.
9907
+ * @param obm (optional) Overlay blend mode used for blending colors.
9908
+ Possible values: "Normal", "Multiply", "Screen", "Overlay", "Darken", "Lighten", "ColorDodge",
9909
+ "ColorBurn", "HardLight", "SoftLight", `Difference", "Exclusion", "None", or "LinearBurn".
9910
+ By default, it's an empty string.
9911
+ * @param oo (optional) Opacity level of the overlaid layer, in the range [0.0, 1.0].
9912
+ The default value is "null".
9913
+ * @param alphaMask (optional) Enables alpha mask processing.
9914
+ The default value is "false".
9915
+ * @param page (optional) Page index in a PDF document that needs to be processed.
9916
+ The default value is "0".
9917
+ * @param colorizeColor (optional) Color applied for the "Colorize" image effect.
9918
+ By default, it's an empty string.
9919
+ * @param rw (optional) Rectangle width for area selection.
9920
+ The default value is "0".
9921
+ * @param rh (optional) Rectangle height for area selection.
9922
+ The default value is "0".
9923
+ * @param dt (optional) Dithering type.
9924
+ * @param da (optional) Dithering amount.
9698
9925
  * @param tenantId (optional) Tenant ID.
9699
9926
  * @return Success
9700
9927
  */
9701
- svg(f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, tenantId, cancelToken) {
9928
+ svg(f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, dt, da, tenantId, cancelToken) {
9702
9929
  let url_ = this.baseUrl + "/api/atoms/v1/ccviewer/svg?";
9703
9930
  if (f !== undefined && f !== null)
9704
9931
  url_ += "f=" + encodeURIComponent("" + f) + "&";
@@ -9736,6 +9963,10 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
9736
9963
  url_ += "rw=" + encodeURIComponent("" + rw) + "&";
9737
9964
  if (rh !== undefined && rh !== null)
9738
9965
  url_ += "rh=" + encodeURIComponent("" + rh) + "&";
9966
+ if (dt !== undefined && dt !== null)
9967
+ url_ += "dt=" + encodeURIComponent("" + dt) + "&";
9968
+ if (da !== undefined && da !== null)
9969
+ url_ += "da=" + encodeURIComponent("" + da) + "&";
9739
9970
  if (tenantId === null)
9740
9971
  throw new Error("The parameter 'tenantId' cannot be null.");
9741
9972
  else if (tenantId !== undefined)
@@ -10585,6 +10816,12 @@ var DesignElementType;
10585
10816
  DesignElementType["PrintArea"] = "PrintArea";
10586
10817
  DesignElementType["Item"] = "Item";
10587
10818
  })(DesignElementType = exports.DesignElementType || (exports.DesignElementType = {}));
10819
+ /** Image preview file format. */
10820
+ var ImageExtractionFormat;
10821
+ (function (ImageExtractionFormat) {
10822
+ ImageExtractionFormat["Jpeg"] = "Jpeg";
10823
+ ImageExtractionFormat["Png"] = "Png";
10824
+ })(ImageExtractionFormat = exports.ImageExtractionFormat || (exports.ImageExtractionFormat = {}));
10588
10825
  /** Image preview fit mode. */
10589
10826
  var ImagePreviewFitMode;
10590
10827
  (function (ImagePreviewFitMode) {