@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.
- package/dist/cjs/design-atoms-api-client.d.ts +307 -151
- package/dist/cjs/design-atoms-api-client.js +303 -66
- package/dist/cjs/design-atoms-api-client.js.map +1 -1
- package/dist/esm/design-atoms-api-client.d.ts +307 -151
- package/dist/esm/design-atoms-api-client.js +302 -65
- package/dist/esm/design-atoms-api-client.js.map +1 -1
- package/package.json +1 -1
|
@@ -737,30 +737,43 @@ export class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
737
737
|
}
|
|
738
738
|
/**
|
|
739
739
|
* Retrieves an image with resized dimensions and additional visual effects based on the provided parameters.
|
|
740
|
-
This method accepts query parameters that control the output of the image.
|
|
741
740
|
* @param f (optional) The identifier of the original image file.
|
|
742
741
|
* @param w (optional) Target width of the resulting image.
|
|
743
742
|
* @param h (optional) Target height of the resulting image.
|
|
744
743
|
* @param cmyk (optional) Name of the CMYK profile used for color conversion.
|
|
745
744
|
* @param rgb (optional) Name of the RGB profile used for color conversion.
|
|
746
745
|
* @param grayscale (optional) Name of the grayscale profile used to convert into shades of gray.
|
|
747
|
-
* @param target (optional) Target color space, one of
|
|
748
|
-
* @param sq (optional) Indicates that the image is squared.
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
* @param
|
|
754
|
-
|
|
755
|
-
* @param
|
|
756
|
-
|
|
757
|
-
* @param
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
746
|
+
* @param target (optional) Target color space, one of "Rgb", "Grayscale", or "Cmyk".
|
|
747
|
+
* @param sq (optional) Indicates that the image is squared.
|
|
748
|
+
The default value is "false".
|
|
749
|
+
* @param effect (optional) Effect applied to the image.
|
|
750
|
+
Possible values: "None", "BlackAndWhite", "FlipVertical", "FlipHorizontal", "Colorize", "Grayscale", or "BlackAndTransparent".
|
|
751
|
+
The default value is "None".
|
|
752
|
+
* @param kp (optional) Indicates that image proportions should be maintained.
|
|
753
|
+
The default value is "false".
|
|
754
|
+
* @param color (optional) Overlay color in the RGB, RGBA, CMYK, or CMYKA format.
|
|
755
|
+
By default, it's an empty string.
|
|
756
|
+
* @param obm (optional) Overlay blend mode used for blending colors.
|
|
757
|
+
Possible values: "Normal", "Multiply", "Screen", "Overlay", "Darken", "Lighten", "ColorDodge",
|
|
758
|
+
"ColorBurn", "HardLight", "SoftLight", `Difference", "Exclusion", "None", or "LinearBurn".
|
|
759
|
+
By default, it's an empty string.
|
|
760
|
+
* @param oo (optional) Opacity level of the overlaid layer, in the range [0.0, 1.0].
|
|
761
|
+
The default value is "null".
|
|
762
|
+
* @param alphaMask (optional) Enables alpha mask processing.
|
|
763
|
+
The default value is "false".
|
|
764
|
+
* @param page (optional) Page index in a PDF document that needs to be processed.
|
|
765
|
+
The default value is "0".
|
|
766
|
+
* @param colorizeColor (optional) Color applied for the "Colorize" image effect.
|
|
767
|
+
By default, it's an empty string.
|
|
768
|
+
* @param rw (optional) Rectangle width for area selection.
|
|
769
|
+
The default value is "0".
|
|
770
|
+
* @param rh (optional) Rectangle height for area selection.
|
|
771
|
+
The default value is "0".
|
|
772
|
+
* @param dt (optional) Dithering type.
|
|
773
|
+
* @param da (optional) Dithering amount.
|
|
761
774
|
* @return Success
|
|
762
775
|
*/
|
|
763
|
-
img(tenantId, f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, cancelToken) {
|
|
776
|
+
img(tenantId, f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, dt, da, cancelToken) {
|
|
764
777
|
let url_ = this.baseUrl + "/api/atoms/v1/tenants/{tenantId}/api/ccviewer/img?";
|
|
765
778
|
if (tenantId === undefined || tenantId === null)
|
|
766
779
|
throw new Error("The parameter 'tenantId' must be defined.");
|
|
@@ -801,6 +814,10 @@ export class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
801
814
|
url_ += "rw=" + encodeURIComponent("" + rw) + "&";
|
|
802
815
|
if (rh !== undefined && rh !== null)
|
|
803
816
|
url_ += "rh=" + encodeURIComponent("" + rh) + "&";
|
|
817
|
+
if (dt !== undefined && dt !== null)
|
|
818
|
+
url_ += "dt=" + encodeURIComponent("" + dt) + "&";
|
|
819
|
+
if (da !== undefined && da !== null)
|
|
820
|
+
url_ += "da=" + encodeURIComponent("" + da) + "&";
|
|
804
821
|
url_ = url_.replace(/[?&]$/, "");
|
|
805
822
|
let options_ = {
|
|
806
823
|
responseType: "blob",
|
|
@@ -1063,23 +1080,37 @@ export class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
1063
1080
|
* @param cmyk (optional) Name of the CMYK profile used for color conversion.
|
|
1064
1081
|
* @param rgb (optional) Name of the RGB profile used for color conversion.
|
|
1065
1082
|
* @param grayscale (optional) Name of the grayscale profile used to convert into shades of gray.
|
|
1066
|
-
* @param target (optional) Target color space, one of
|
|
1067
|
-
* @param sq (optional) Indicates that the image is squared.
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
* @param
|
|
1073
|
-
|
|
1074
|
-
* @param
|
|
1075
|
-
|
|
1076
|
-
* @param
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1083
|
+
* @param target (optional) Target color space, one of "Rgb", "Grayscale", or "Cmyk".
|
|
1084
|
+
* @param sq (optional) Indicates that the image is squared.
|
|
1085
|
+
The default value is "false".
|
|
1086
|
+
* @param effect (optional) Effect applied to the image.
|
|
1087
|
+
Possible values: "None", "BlackAndWhite", "FlipVertical", "FlipHorizontal", "Colorize", "Grayscale", or "BlackAndTransparent".
|
|
1088
|
+
The default value is "None".
|
|
1089
|
+
* @param kp (optional) Indicates that image proportions should be maintained.
|
|
1090
|
+
The default value is "false".
|
|
1091
|
+
* @param color (optional) Overlay color in the RGB, RGBA, CMYK, or CMYKA format.
|
|
1092
|
+
By default, it's an empty string.
|
|
1093
|
+
* @param obm (optional) Overlay blend mode used for blending colors.
|
|
1094
|
+
Possible values: "Normal", "Multiply", "Screen", "Overlay", "Darken", "Lighten", "ColorDodge",
|
|
1095
|
+
"ColorBurn", "HardLight", "SoftLight", `Difference", "Exclusion", "None", or "LinearBurn".
|
|
1096
|
+
By default, it's an empty string.
|
|
1097
|
+
* @param oo (optional) Opacity level of the overlaid layer, in the range [0.0, 1.0].
|
|
1098
|
+
The default value is "null".
|
|
1099
|
+
* @param alphaMask (optional) Enables alpha mask processing.
|
|
1100
|
+
The default value is "false".
|
|
1101
|
+
* @param page (optional) Page index in a PDF document that needs to be processed.
|
|
1102
|
+
The default value is "0".
|
|
1103
|
+
* @param colorizeColor (optional) Color applied for the "Colorize" image effect.
|
|
1104
|
+
By default, it's an empty string.
|
|
1105
|
+
* @param rw (optional) Rectangle width for area selection.
|
|
1106
|
+
The default value is "0".
|
|
1107
|
+
* @param rh (optional) Rectangle height for area selection.
|
|
1108
|
+
The default value is "0".
|
|
1109
|
+
* @param dt (optional) Dithering type.
|
|
1110
|
+
* @param da (optional) Dithering amount.
|
|
1080
1111
|
* @return Success
|
|
1081
1112
|
*/
|
|
1082
|
-
svg(tenantId, f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, cancelToken) {
|
|
1113
|
+
svg(tenantId, f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, dt, da, cancelToken) {
|
|
1083
1114
|
let url_ = this.baseUrl + "/api/atoms/v1/tenants/{tenantId}/api/ccviewer/svg?";
|
|
1084
1115
|
if (tenantId === undefined || tenantId === null)
|
|
1085
1116
|
throw new Error("The parameter 'tenantId' must be defined.");
|
|
@@ -1120,6 +1151,10 @@ export class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
1120
1151
|
url_ += "rw=" + encodeURIComponent("" + rw) + "&";
|
|
1121
1152
|
if (rh !== undefined && rh !== null)
|
|
1122
1153
|
url_ += "rh=" + encodeURIComponent("" + rh) + "&";
|
|
1154
|
+
if (dt !== undefined && dt !== null)
|
|
1155
|
+
url_ += "dt=" + encodeURIComponent("" + dt) + "&";
|
|
1156
|
+
if (da !== undefined && da !== null)
|
|
1157
|
+
url_ += "da=" + encodeURIComponent("" + da) + "&";
|
|
1123
1158
|
url_ = url_.replace(/[?&]$/, "");
|
|
1124
1159
|
let options_ = {
|
|
1125
1160
|
responseType: "blob",
|
|
@@ -1997,6 +2032,13 @@ export class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
1997
2032
|
result404 = JSON.parse(resultData404);
|
|
1998
2033
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
1999
2034
|
}
|
|
2035
|
+
else if (status === 409) {
|
|
2036
|
+
const _responseText = response.data;
|
|
2037
|
+
let result409 = null;
|
|
2038
|
+
let resultData409 = _responseText;
|
|
2039
|
+
result409 = JSON.parse(resultData409);
|
|
2040
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2041
|
+
}
|
|
2000
2042
|
else if (status === 401) {
|
|
2001
2043
|
const _responseText = response.data;
|
|
2002
2044
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -2023,9 +2065,10 @@ export class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2023
2065
|
* @param height (optional)
|
|
2024
2066
|
* @param fileFormat (optional)
|
|
2025
2067
|
* @param fitMode (optional)
|
|
2068
|
+
* @param pageIndex (optional)
|
|
2026
2069
|
* @return Success
|
|
2027
2070
|
*/
|
|
2028
|
-
renderImagePreviewFromFile(attachment, tenantId, sourceFile, mockupOwnerId, mockupId, width, height, fileFormat, fitMode, cancelToken) {
|
|
2071
|
+
renderImagePreviewFromFile(attachment, tenantId, sourceFile, mockupOwnerId, mockupId, width, height, fileFormat, fitMode, pageIndex, cancelToken) {
|
|
2029
2072
|
let url_ = this.baseUrl + "/api/atoms/v1/images/render-preview/from-file?";
|
|
2030
2073
|
if (attachment !== undefined && attachment !== null)
|
|
2031
2074
|
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
@@ -2049,6 +2092,8 @@ export class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2049
2092
|
content_.append("fileFormat", fileFormat.toString());
|
|
2050
2093
|
if (fitMode !== null && fitMode !== undefined)
|
|
2051
2094
|
content_.append("fitMode", fitMode.toString());
|
|
2095
|
+
if (pageIndex !== null && pageIndex !== undefined)
|
|
2096
|
+
content_.append("pageIndex", pageIndex.toString());
|
|
2052
2097
|
let options_ = {
|
|
2053
2098
|
data: content_,
|
|
2054
2099
|
responseType: "blob",
|
|
@@ -2095,6 +2140,13 @@ export class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2095
2140
|
result404 = JSON.parse(resultData404);
|
|
2096
2141
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2097
2142
|
}
|
|
2143
|
+
else if (status === 409) {
|
|
2144
|
+
const _responseText = response.data;
|
|
2145
|
+
let result409 = null;
|
|
2146
|
+
let resultData409 = _responseText;
|
|
2147
|
+
result409 = JSON.parse(resultData409);
|
|
2148
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2149
|
+
}
|
|
2098
2150
|
else if (status === 401) {
|
|
2099
2151
|
const _responseText = response.data;
|
|
2100
2152
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -2126,9 +2178,10 @@ export class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2126
2178
|
* @param height (optional)
|
|
2127
2179
|
* @param fileFormat (optional)
|
|
2128
2180
|
* @param fitMode (optional)
|
|
2181
|
+
* @param pageIndex (optional)
|
|
2129
2182
|
* @return Success
|
|
2130
2183
|
*/
|
|
2131
|
-
renderImagePreviewFromFileToResource(tenantId, resourceOwnerId, resourceNamespace, resourceName, resourceSourceId, resourceType, anonymousAccess, overwriteExistingResource, sourceFile, mockupOwnerId, mockupId, width, height, fileFormat, fitMode, cancelToken) {
|
|
2184
|
+
renderImagePreviewFromFileToResource(tenantId, resourceOwnerId, resourceNamespace, resourceName, resourceSourceId, resourceType, anonymousAccess, overwriteExistingResource, sourceFile, mockupOwnerId, mockupId, width, height, fileFormat, fitMode, pageIndex, cancelToken) {
|
|
2132
2185
|
let url_ = this.baseUrl + "/api/atoms/v1/images/render-preview/from-file/to-resource?";
|
|
2133
2186
|
if (tenantId === null)
|
|
2134
2187
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
@@ -2164,6 +2217,8 @@ export class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2164
2217
|
content_.append("fileFormat", fileFormat.toString());
|
|
2165
2218
|
if (fitMode !== null && fitMode !== undefined)
|
|
2166
2219
|
content_.append("fitMode", fitMode.toString());
|
|
2220
|
+
if (pageIndex !== null && pageIndex !== undefined)
|
|
2221
|
+
content_.append("pageIndex", pageIndex.toString());
|
|
2167
2222
|
let options_ = {
|
|
2168
2223
|
data: content_,
|
|
2169
2224
|
method: "POST",
|
|
@@ -2296,6 +2351,13 @@ export class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2296
2351
|
result404 = JSON.parse(resultData404);
|
|
2297
2352
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2298
2353
|
}
|
|
2354
|
+
else if (status === 409) {
|
|
2355
|
+
const _responseText = response.data;
|
|
2356
|
+
let result409 = null;
|
|
2357
|
+
let resultData409 = _responseText;
|
|
2358
|
+
result409 = JSON.parse(resultData409);
|
|
2359
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2360
|
+
}
|
|
2299
2361
|
else if (status === 401) {
|
|
2300
2362
|
const _responseText = response.data;
|
|
2301
2363
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -5904,6 +5966,13 @@ export class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
5904
5966
|
result200 = JSON.parse(resultData200);
|
|
5905
5967
|
return Promise.resolve(result200);
|
|
5906
5968
|
}
|
|
5969
|
+
else if (status === 400) {
|
|
5970
|
+
const _responseText = response.data;
|
|
5971
|
+
let result400 = null;
|
|
5972
|
+
let resultData400 = _responseText;
|
|
5973
|
+
result400 = JSON.parse(resultData400);
|
|
5974
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
5975
|
+
}
|
|
5907
5976
|
else if (status === 401) {
|
|
5908
5977
|
const _responseText = response.data;
|
|
5909
5978
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -5972,6 +6041,88 @@ export class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
5972
6041
|
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
5973
6042
|
return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
|
|
5974
6043
|
}
|
|
6044
|
+
else if (status === 400) {
|
|
6045
|
+
const _responseText = response.data;
|
|
6046
|
+
let result400 = null;
|
|
6047
|
+
let resultData400 = _responseText;
|
|
6048
|
+
result400 = JSON.parse(resultData400);
|
|
6049
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
6050
|
+
}
|
|
6051
|
+
else if (status === 401) {
|
|
6052
|
+
const _responseText = response.data;
|
|
6053
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
6054
|
+
}
|
|
6055
|
+
else if (status === 403) {
|
|
6056
|
+
const _responseText = response.data;
|
|
6057
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
6058
|
+
}
|
|
6059
|
+
else if (status !== 200 && status !== 204) {
|
|
6060
|
+
const _responseText = response.data;
|
|
6061
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6062
|
+
}
|
|
6063
|
+
return Promise.resolve(null);
|
|
6064
|
+
}
|
|
6065
|
+
/**
|
|
6066
|
+
* Extracts print-product item image.
|
|
6067
|
+
* @param tenantId (optional) Tenant ID.
|
|
6068
|
+
* @param body (optional) Extraction parameters.
|
|
6069
|
+
* @return Success
|
|
6070
|
+
*/
|
|
6071
|
+
extractItemImageToResource(tenantId, body, cancelToken) {
|
|
6072
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/print-product/items/extract-image/to-resource?";
|
|
6073
|
+
if (tenantId === null)
|
|
6074
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
6075
|
+
else if (tenantId !== undefined)
|
|
6076
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
6077
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6078
|
+
const content_ = JSON.stringify(body);
|
|
6079
|
+
let options_ = {
|
|
6080
|
+
data: content_,
|
|
6081
|
+
method: "POST",
|
|
6082
|
+
url: url_,
|
|
6083
|
+
headers: {
|
|
6084
|
+
"Content-Type": "application/json",
|
|
6085
|
+
"Accept": "application/octet-stream"
|
|
6086
|
+
},
|
|
6087
|
+
cancelToken
|
|
6088
|
+
};
|
|
6089
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6090
|
+
return this.instance.request(transformedOptions_);
|
|
6091
|
+
}).catch((_error) => {
|
|
6092
|
+
if (isAxiosError(_error) && _error.response) {
|
|
6093
|
+
return _error.response;
|
|
6094
|
+
}
|
|
6095
|
+
else {
|
|
6096
|
+
throw _error;
|
|
6097
|
+
}
|
|
6098
|
+
}).then((_response) => {
|
|
6099
|
+
return this.transformResult(url_, _response, (_response) => this.processExtractItemImageToResource(_response));
|
|
6100
|
+
});
|
|
6101
|
+
}
|
|
6102
|
+
processExtractItemImageToResource(response) {
|
|
6103
|
+
const status = response.status;
|
|
6104
|
+
let _headers = {};
|
|
6105
|
+
if (response.headers && typeof response.headers === "object") {
|
|
6106
|
+
for (let k in response.headers) {
|
|
6107
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
6108
|
+
_headers[k] = response.headers[k];
|
|
6109
|
+
}
|
|
6110
|
+
}
|
|
6111
|
+
}
|
|
6112
|
+
if (status === 200) {
|
|
6113
|
+
const _responseText = response.data;
|
|
6114
|
+
let result200 = null;
|
|
6115
|
+
let resultData200 = _responseText;
|
|
6116
|
+
result200 = JSON.parse(resultData200);
|
|
6117
|
+
return Promise.resolve(result200);
|
|
6118
|
+
}
|
|
6119
|
+
else if (status === 400) {
|
|
6120
|
+
const _responseText = response.data;
|
|
6121
|
+
let result400 = null;
|
|
6122
|
+
let resultData400 = _responseText;
|
|
6123
|
+
result400 = JSON.parse(resultData400);
|
|
6124
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
6125
|
+
}
|
|
5975
6126
|
else if (status === 401) {
|
|
5976
6127
|
const _responseText = response.data;
|
|
5977
6128
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -6043,6 +6194,20 @@ export class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
6043
6194
|
result200 = JSON.parse(resultData200);
|
|
6044
6195
|
return Promise.resolve(result200);
|
|
6045
6196
|
}
|
|
6197
|
+
else if (status === 400) {
|
|
6198
|
+
const _responseText = response.data;
|
|
6199
|
+
let result400 = null;
|
|
6200
|
+
let resultData400 = _responseText;
|
|
6201
|
+
result400 = JSON.parse(resultData400);
|
|
6202
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
6203
|
+
}
|
|
6204
|
+
else if (status === 409) {
|
|
6205
|
+
const _responseText = response.data;
|
|
6206
|
+
let result409 = null;
|
|
6207
|
+
let resultData409 = _responseText;
|
|
6208
|
+
result409 = JSON.parse(resultData409);
|
|
6209
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
6210
|
+
}
|
|
6046
6211
|
else if (status === 401) {
|
|
6047
6212
|
const _responseText = response.data;
|
|
6048
6213
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -6063,10 +6228,11 @@ export class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
6063
6228
|
* @param tenantId (optional) Tenant ID.
|
|
6064
6229
|
* @param sourceFile (optional)
|
|
6065
6230
|
* @param paletteUID (optional)
|
|
6231
|
+
* @param pageIndex (optional)
|
|
6066
6232
|
* @param preserveOriginalFile (optional)
|
|
6067
6233
|
* @return Success
|
|
6068
6234
|
*/
|
|
6069
|
-
createItemFromFile(itemType, tenantId, sourceFile, paletteUID, preserveOriginalFile, cancelToken) {
|
|
6235
|
+
createItemFromFile(itemType, tenantId, sourceFile, paletteUID, pageIndex, preserveOriginalFile, cancelToken) {
|
|
6070
6236
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/print-product/items/from-file?";
|
|
6071
6237
|
if (itemType !== undefined && itemType !== null)
|
|
6072
6238
|
url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
|
|
@@ -6080,6 +6246,8 @@ export class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
6080
6246
|
content_.append("sourceFile", sourceFile.data, sourceFile.fileName ? sourceFile.fileName : "sourceFile");
|
|
6081
6247
|
if (paletteUID !== null && paletteUID !== undefined)
|
|
6082
6248
|
content_.append("paletteUID", paletteUID.toString());
|
|
6249
|
+
if (pageIndex !== null && pageIndex !== undefined)
|
|
6250
|
+
content_.append("pageIndex", pageIndex.toString());
|
|
6083
6251
|
if (preserveOriginalFile !== null && preserveOriginalFile !== undefined)
|
|
6084
6252
|
content_.append("preserveOriginalFile", preserveOriginalFile.toString());
|
|
6085
6253
|
let options_ = {
|
|
@@ -6121,6 +6289,13 @@ export class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
6121
6289
|
result200 = JSON.parse(resultData200);
|
|
6122
6290
|
return Promise.resolve(result200);
|
|
6123
6291
|
}
|
|
6292
|
+
else if (status === 400) {
|
|
6293
|
+
const _responseText = response.data;
|
|
6294
|
+
let result400 = null;
|
|
6295
|
+
let resultData400 = _responseText;
|
|
6296
|
+
result400 = JSON.parse(resultData400);
|
|
6297
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
6298
|
+
}
|
|
6124
6299
|
else if (status === 404) {
|
|
6125
6300
|
const _responseText = response.data;
|
|
6126
6301
|
let result404 = null;
|
|
@@ -6213,6 +6388,13 @@ export class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
6213
6388
|
result200 = JSON.parse(resultData200);
|
|
6214
6389
|
return Promise.resolve(result200);
|
|
6215
6390
|
}
|
|
6391
|
+
else if (status === 400) {
|
|
6392
|
+
const _responseText = response.data;
|
|
6393
|
+
let result400 = null;
|
|
6394
|
+
let resultData400 = _responseText;
|
|
6395
|
+
result400 = JSON.parse(resultData400);
|
|
6396
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
6397
|
+
}
|
|
6216
6398
|
else if (status === 404) {
|
|
6217
6399
|
const _responseText = response.data;
|
|
6218
6400
|
let result404 = null;
|
|
@@ -6298,6 +6480,13 @@ export class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
6298
6480
|
result200 = JSON.parse(resultData200);
|
|
6299
6481
|
return Promise.resolve(result200);
|
|
6300
6482
|
}
|
|
6483
|
+
else if (status === 400) {
|
|
6484
|
+
const _responseText = response.data;
|
|
6485
|
+
let result400 = null;
|
|
6486
|
+
let resultData400 = _responseText;
|
|
6487
|
+
result400 = JSON.parse(resultData400);
|
|
6488
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
6489
|
+
}
|
|
6301
6490
|
else if (status === 404) {
|
|
6302
6491
|
const _responseText = response.data;
|
|
6303
6492
|
let result404 = null;
|
|
@@ -6383,6 +6572,13 @@ export class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
6383
6572
|
result200 = JSON.parse(resultData200);
|
|
6384
6573
|
return Promise.resolve(result200);
|
|
6385
6574
|
}
|
|
6575
|
+
else if (status === 400) {
|
|
6576
|
+
const _responseText = response.data;
|
|
6577
|
+
let result400 = null;
|
|
6578
|
+
let resultData400 = _responseText;
|
|
6579
|
+
result400 = JSON.parse(resultData400);
|
|
6580
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
6581
|
+
}
|
|
6386
6582
|
else if (status === 404) {
|
|
6387
6583
|
const _responseText = response.data;
|
|
6388
6584
|
let result404 = null;
|
|
@@ -9334,31 +9530,44 @@ export class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
9334
9530
|
}
|
|
9335
9531
|
/**
|
|
9336
9532
|
* Retrieves an image with resized dimensions and additional visual effects based on the provided parameters.
|
|
9337
|
-
This method accepts query parameters that control the output of the image.
|
|
9338
9533
|
* @param f (optional) The identifier of the original image file.
|
|
9339
9534
|
* @param w (optional) Target width of the resulting image.
|
|
9340
9535
|
* @param h (optional) Target height of the resulting image.
|
|
9341
9536
|
* @param cmyk (optional) Name of the CMYK profile used for color conversion.
|
|
9342
9537
|
* @param rgb (optional) Name of the RGB profile used for color conversion.
|
|
9343
9538
|
* @param grayscale (optional) Name of the grayscale profile used to convert into shades of gray.
|
|
9344
|
-
* @param target (optional) Target color space, one of
|
|
9345
|
-
* @param sq (optional) Indicates that the image is squared.
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
* @param
|
|
9351
|
-
|
|
9352
|
-
* @param
|
|
9353
|
-
|
|
9354
|
-
* @param
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9539
|
+
* @param target (optional) Target color space, one of "Rgb", "Grayscale", or "Cmyk".
|
|
9540
|
+
* @param sq (optional) Indicates that the image is squared.
|
|
9541
|
+
The default value is "false".
|
|
9542
|
+
* @param effect (optional) Effect applied to the image.
|
|
9543
|
+
Possible values: "None", "BlackAndWhite", "FlipVertical", "FlipHorizontal", "Colorize", "Grayscale", or "BlackAndTransparent".
|
|
9544
|
+
The default value is "None".
|
|
9545
|
+
* @param kp (optional) Indicates that image proportions should be maintained.
|
|
9546
|
+
The default value is "false".
|
|
9547
|
+
* @param color (optional) Overlay color in the RGB, RGBA, CMYK, or CMYKA format.
|
|
9548
|
+
By default, it's an empty string.
|
|
9549
|
+
* @param obm (optional) Overlay blend mode used for blending colors.
|
|
9550
|
+
Possible values: "Normal", "Multiply", "Screen", "Overlay", "Darken", "Lighten", "ColorDodge",
|
|
9551
|
+
"ColorBurn", "HardLight", "SoftLight", `Difference", "Exclusion", "None", or "LinearBurn".
|
|
9552
|
+
By default, it's an empty string.
|
|
9553
|
+
* @param oo (optional) Opacity level of the overlaid layer, in the range [0.0, 1.0].
|
|
9554
|
+
The default value is "null".
|
|
9555
|
+
* @param alphaMask (optional) Enables alpha mask processing.
|
|
9556
|
+
The default value is "false".
|
|
9557
|
+
* @param page (optional) Page index in a PDF document that needs to be processed.
|
|
9558
|
+
The default value is "0".
|
|
9559
|
+
* @param colorizeColor (optional) Color applied for the "Colorize" image effect.
|
|
9560
|
+
By default, it's an empty string.
|
|
9561
|
+
* @param rw (optional) Rectangle width for area selection.
|
|
9562
|
+
The default value is "0".
|
|
9563
|
+
* @param rh (optional) Rectangle height for area selection.
|
|
9564
|
+
The default value is "0".
|
|
9565
|
+
* @param dt (optional) Dithering type.
|
|
9566
|
+
* @param da (optional) Dithering amount.
|
|
9358
9567
|
* @param tenantId (optional) Tenant ID.
|
|
9359
9568
|
* @return Success
|
|
9360
9569
|
*/
|
|
9361
|
-
img(f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, tenantId, cancelToken) {
|
|
9570
|
+
img(f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, dt, da, tenantId, cancelToken) {
|
|
9362
9571
|
let url_ = this.baseUrl + "/api/atoms/v1/ccviewer/img?";
|
|
9363
9572
|
if (f !== undefined && f !== null)
|
|
9364
9573
|
url_ += "f=" + encodeURIComponent("" + f) + "&";
|
|
@@ -9396,6 +9605,10 @@ export class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
9396
9605
|
url_ += "rw=" + encodeURIComponent("" + rw) + "&";
|
|
9397
9606
|
if (rh !== undefined && rh !== null)
|
|
9398
9607
|
url_ += "rh=" + encodeURIComponent("" + rh) + "&";
|
|
9608
|
+
if (dt !== undefined && dt !== null)
|
|
9609
|
+
url_ += "dt=" + encodeURIComponent("" + dt) + "&";
|
|
9610
|
+
if (da !== undefined && da !== null)
|
|
9611
|
+
url_ += "da=" + encodeURIComponent("" + da) + "&";
|
|
9399
9612
|
if (tenantId === null)
|
|
9400
9613
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
9401
9614
|
else if (tenantId !== undefined)
|
|
@@ -9668,24 +9881,38 @@ export class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
9668
9881
|
* @param cmyk (optional) Name of the CMYK profile used for color conversion.
|
|
9669
9882
|
* @param rgb (optional) Name of the RGB profile used for color conversion.
|
|
9670
9883
|
* @param grayscale (optional) Name of the grayscale profile used to convert into shades of gray.
|
|
9671
|
-
* @param target (optional) Target color space, one of
|
|
9672
|
-
* @param sq (optional) Indicates that the image is squared.
|
|
9673
|
-
|
|
9674
|
-
|
|
9675
|
-
|
|
9676
|
-
|
|
9677
|
-
* @param
|
|
9678
|
-
|
|
9679
|
-
* @param
|
|
9680
|
-
|
|
9681
|
-
* @param
|
|
9682
|
-
|
|
9683
|
-
|
|
9684
|
-
|
|
9884
|
+
* @param target (optional) Target color space, one of "Rgb", "Grayscale", or "Cmyk".
|
|
9885
|
+
* @param sq (optional) Indicates that the image is squared.
|
|
9886
|
+
The default value is "false".
|
|
9887
|
+
* @param effect (optional) Effect applied to the image.
|
|
9888
|
+
Possible values: "None", "BlackAndWhite", "FlipVertical", "FlipHorizontal", "Colorize", "Grayscale", or "BlackAndTransparent".
|
|
9889
|
+
The default value is "None".
|
|
9890
|
+
* @param kp (optional) Indicates that image proportions should be maintained.
|
|
9891
|
+
The default value is "false".
|
|
9892
|
+
* @param color (optional) Overlay color in the RGB, RGBA, CMYK, or CMYKA format.
|
|
9893
|
+
By default, it's an empty string.
|
|
9894
|
+
* @param obm (optional) Overlay blend mode used for blending colors.
|
|
9895
|
+
Possible values: "Normal", "Multiply", "Screen", "Overlay", "Darken", "Lighten", "ColorDodge",
|
|
9896
|
+
"ColorBurn", "HardLight", "SoftLight", `Difference", "Exclusion", "None", or "LinearBurn".
|
|
9897
|
+
By default, it's an empty string.
|
|
9898
|
+
* @param oo (optional) Opacity level of the overlaid layer, in the range [0.0, 1.0].
|
|
9899
|
+
The default value is "null".
|
|
9900
|
+
* @param alphaMask (optional) Enables alpha mask processing.
|
|
9901
|
+
The default value is "false".
|
|
9902
|
+
* @param page (optional) Page index in a PDF document that needs to be processed.
|
|
9903
|
+
The default value is "0".
|
|
9904
|
+
* @param colorizeColor (optional) Color applied for the "Colorize" image effect.
|
|
9905
|
+
By default, it's an empty string.
|
|
9906
|
+
* @param rw (optional) Rectangle width for area selection.
|
|
9907
|
+
The default value is "0".
|
|
9908
|
+
* @param rh (optional) Rectangle height for area selection.
|
|
9909
|
+
The default value is "0".
|
|
9910
|
+
* @param dt (optional) Dithering type.
|
|
9911
|
+
* @param da (optional) Dithering amount.
|
|
9685
9912
|
* @param tenantId (optional) Tenant ID.
|
|
9686
9913
|
* @return Success
|
|
9687
9914
|
*/
|
|
9688
|
-
svg(f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, tenantId, cancelToken) {
|
|
9915
|
+
svg(f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, dt, da, tenantId, cancelToken) {
|
|
9689
9916
|
let url_ = this.baseUrl + "/api/atoms/v1/ccviewer/svg?";
|
|
9690
9917
|
if (f !== undefined && f !== null)
|
|
9691
9918
|
url_ += "f=" + encodeURIComponent("" + f) + "&";
|
|
@@ -9723,6 +9950,10 @@ export class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
9723
9950
|
url_ += "rw=" + encodeURIComponent("" + rw) + "&";
|
|
9724
9951
|
if (rh !== undefined && rh !== null)
|
|
9725
9952
|
url_ += "rh=" + encodeURIComponent("" + rh) + "&";
|
|
9953
|
+
if (dt !== undefined && dt !== null)
|
|
9954
|
+
url_ += "dt=" + encodeURIComponent("" + dt) + "&";
|
|
9955
|
+
if (da !== undefined && da !== null)
|
|
9956
|
+
url_ += "da=" + encodeURIComponent("" + da) + "&";
|
|
9726
9957
|
if (tenantId === null)
|
|
9727
9958
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
9728
9959
|
else if (tenantId !== undefined)
|
|
@@ -10571,6 +10802,12 @@ export var DesignElementType;
|
|
|
10571
10802
|
DesignElementType["PrintArea"] = "PrintArea";
|
|
10572
10803
|
DesignElementType["Item"] = "Item";
|
|
10573
10804
|
})(DesignElementType || (DesignElementType = {}));
|
|
10805
|
+
/** Image preview file format. */
|
|
10806
|
+
export var ImageExtractionFormat;
|
|
10807
|
+
(function (ImageExtractionFormat) {
|
|
10808
|
+
ImageExtractionFormat["Jpeg"] = "Jpeg";
|
|
10809
|
+
ImageExtractionFormat["Png"] = "Png";
|
|
10810
|
+
})(ImageExtractionFormat || (ImageExtractionFormat = {}));
|
|
10574
10811
|
/** Image preview fit mode. */
|
|
10575
10812
|
export var ImagePreviewFitMode;
|
|
10576
10813
|
(function (ImagePreviewFitMode) {
|