@aurigma/axios-design-atoms-api-client 2.44.1 → 2.48.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 +168 -29
- package/dist/cjs/design-atoms-api-client.js +214 -11
- package/dist/cjs/design-atoms-api-client.js.map +1 -1
- package/dist/esm/design-atoms-api-client.d.ts +168 -29
- package/dist/esm/design-atoms-api-client.js +213 -10
- package/dist/esm/design-atoms-api-client.js.map +1 -1
- package/package.json +1 -1
|
@@ -58,7 +58,7 @@ export class BuildInfoApiClient extends ApiClientBase {
|
|
|
58
58
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
61
|
+
* Get assembly build info.
|
|
62
62
|
* @return Success
|
|
63
63
|
*/
|
|
64
64
|
headInfo(cancelToken) {
|
|
@@ -111,7 +111,7 @@ export class BuildInfoApiClient extends ApiClientBase {
|
|
|
111
111
|
return Promise.resolve(null);
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
|
-
*
|
|
114
|
+
* Get assembly build info.
|
|
115
115
|
* @return Success
|
|
116
116
|
*/
|
|
117
117
|
getInfo(cancelToken) {
|
|
@@ -779,9 +779,11 @@ export class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
779
779
|
* @param alphaMask (optional)
|
|
780
780
|
* @param page (optional)
|
|
781
781
|
* @param colorizeColor (optional)
|
|
782
|
+
* @param rw (optional)
|
|
783
|
+
* @param rh (optional)
|
|
782
784
|
* @return Success
|
|
783
785
|
*/
|
|
784
|
-
img(tenantId, f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, cancelToken) {
|
|
786
|
+
img(tenantId, f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, cancelToken) {
|
|
785
787
|
let url_ = this.baseUrl + "/api/atoms/v1/tenants/{tenantId}/api/ccviewer/img?";
|
|
786
788
|
if (tenantId === undefined || tenantId === null)
|
|
787
789
|
throw new Error("The parameter 'tenantId' must be defined.");
|
|
@@ -818,6 +820,10 @@ export class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
818
820
|
url_ += "page=" + encodeURIComponent("" + page) + "&";
|
|
819
821
|
if (colorizeColor !== undefined && colorizeColor !== null)
|
|
820
822
|
url_ += "colorizeColor=" + encodeURIComponent("" + colorizeColor) + "&";
|
|
823
|
+
if (rw !== undefined && rw !== null)
|
|
824
|
+
url_ += "rw=" + encodeURIComponent("" + rw) + "&";
|
|
825
|
+
if (rh !== undefined && rh !== null)
|
|
826
|
+
url_ += "rh=" + encodeURIComponent("" + rh) + "&";
|
|
821
827
|
url_ = url_.replace(/[?&]$/, "");
|
|
822
828
|
let options_ = {
|
|
823
829
|
responseType: "blob",
|
|
@@ -1087,15 +1093,66 @@ export class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
1087
1093
|
}
|
|
1088
1094
|
/**
|
|
1089
1095
|
* @param f (optional)
|
|
1096
|
+
* @param w (optional)
|
|
1097
|
+
* @param h (optional)
|
|
1098
|
+
* @param cmyk (optional)
|
|
1099
|
+
* @param rgb (optional)
|
|
1100
|
+
* @param grayscale (optional)
|
|
1101
|
+
* @param target (optional)
|
|
1102
|
+
* @param sq (optional)
|
|
1103
|
+
* @param effect (optional)
|
|
1104
|
+
* @param kp (optional)
|
|
1105
|
+
* @param color (optional)
|
|
1106
|
+
* @param obm (optional)
|
|
1107
|
+
* @param oo (optional)
|
|
1108
|
+
* @param alphaMask (optional)
|
|
1109
|
+
* @param page (optional)
|
|
1110
|
+
* @param colorizeColor (optional)
|
|
1111
|
+
* @param rw (optional)
|
|
1112
|
+
* @param rh (optional)
|
|
1090
1113
|
* @return Success
|
|
1091
1114
|
*/
|
|
1092
|
-
svg(tenantId, f, cancelToken) {
|
|
1115
|
+
svg(tenantId, f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, cancelToken) {
|
|
1093
1116
|
let url_ = this.baseUrl + "/api/atoms/v1/tenants/{tenantId}/api/ccviewer/svg?";
|
|
1094
1117
|
if (tenantId === undefined || tenantId === null)
|
|
1095
1118
|
throw new Error("The parameter 'tenantId' must be defined.");
|
|
1096
1119
|
url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
|
|
1097
1120
|
if (f !== undefined && f !== null)
|
|
1098
1121
|
url_ += "f=" + encodeURIComponent("" + f) + "&";
|
|
1122
|
+
if (w !== undefined && w !== null)
|
|
1123
|
+
url_ += "w=" + encodeURIComponent("" + w) + "&";
|
|
1124
|
+
if (h !== undefined && h !== null)
|
|
1125
|
+
url_ += "h=" + encodeURIComponent("" + h) + "&";
|
|
1126
|
+
if (cmyk !== undefined && cmyk !== null)
|
|
1127
|
+
url_ += "cmyk=" + encodeURIComponent("" + cmyk) + "&";
|
|
1128
|
+
if (rgb !== undefined && rgb !== null)
|
|
1129
|
+
url_ += "rgb=" + encodeURIComponent("" + rgb) + "&";
|
|
1130
|
+
if (grayscale !== undefined && grayscale !== null)
|
|
1131
|
+
url_ += "grayscale=" + encodeURIComponent("" + grayscale) + "&";
|
|
1132
|
+
if (target !== undefined && target !== null)
|
|
1133
|
+
url_ += "target=" + encodeURIComponent("" + target) + "&";
|
|
1134
|
+
if (sq !== undefined && sq !== null)
|
|
1135
|
+
url_ += "sq=" + encodeURIComponent("" + sq) + "&";
|
|
1136
|
+
if (effect !== undefined && effect !== null)
|
|
1137
|
+
url_ += "effect=" + encodeURIComponent("" + effect) + "&";
|
|
1138
|
+
if (kp !== undefined && kp !== null)
|
|
1139
|
+
url_ += "kp=" + encodeURIComponent("" + kp) + "&";
|
|
1140
|
+
if (color !== undefined && color !== null)
|
|
1141
|
+
url_ += "color=" + encodeURIComponent("" + color) + "&";
|
|
1142
|
+
if (obm !== undefined && obm !== null)
|
|
1143
|
+
url_ += "obm=" + encodeURIComponent("" + obm) + "&";
|
|
1144
|
+
if (oo !== undefined && oo !== null)
|
|
1145
|
+
url_ += "oo=" + encodeURIComponent("" + oo) + "&";
|
|
1146
|
+
if (alphaMask !== undefined && alphaMask !== null)
|
|
1147
|
+
url_ += "alphaMask=" + encodeURIComponent("" + alphaMask) + "&";
|
|
1148
|
+
if (page !== undefined && page !== null)
|
|
1149
|
+
url_ += "page=" + encodeURIComponent("" + page) + "&";
|
|
1150
|
+
if (colorizeColor !== undefined && colorizeColor !== null)
|
|
1151
|
+
url_ += "colorizeColor=" + encodeURIComponent("" + colorizeColor) + "&";
|
|
1152
|
+
if (rw !== undefined && rw !== null)
|
|
1153
|
+
url_ += "rw=" + encodeURIComponent("" + rw) + "&";
|
|
1154
|
+
if (rh !== undefined && rh !== null)
|
|
1155
|
+
url_ += "rh=" + encodeURIComponent("" + rh) + "&";
|
|
1099
1156
|
url_ = url_.replace(/[?&]$/, "");
|
|
1100
1157
|
let options_ = {
|
|
1101
1158
|
responseType: "blob",
|
|
@@ -2863,6 +2920,91 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2863
2920
|
}
|
|
2864
2921
|
return Promise.resolve(null);
|
|
2865
2922
|
}
|
|
2923
|
+
/**
|
|
2924
|
+
* Returns design parameters stored in product model.
|
|
2925
|
+
* @param id Design identifier.
|
|
2926
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
2927
|
+
* @param tenantId (optional) Tenant identifier
|
|
2928
|
+
* @return Success
|
|
2929
|
+
*/
|
|
2930
|
+
getDesignParameters(id, privateStorageOwner, tenantId, cancelToken) {
|
|
2931
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/parameters?";
|
|
2932
|
+
if (id === undefined || id === null)
|
|
2933
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
2934
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2935
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
2936
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
2937
|
+
if (tenantId === null)
|
|
2938
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2939
|
+
else if (tenantId !== undefined)
|
|
2940
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2941
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2942
|
+
let options_ = {
|
|
2943
|
+
method: "GET",
|
|
2944
|
+
url: url_,
|
|
2945
|
+
headers: {
|
|
2946
|
+
"Accept": "application/json"
|
|
2947
|
+
},
|
|
2948
|
+
cancelToken
|
|
2949
|
+
};
|
|
2950
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2951
|
+
return this.instance.request(transformedOptions_);
|
|
2952
|
+
}).catch((_error) => {
|
|
2953
|
+
if (isAxiosError(_error) && _error.response) {
|
|
2954
|
+
return _error.response;
|
|
2955
|
+
}
|
|
2956
|
+
else {
|
|
2957
|
+
throw _error;
|
|
2958
|
+
}
|
|
2959
|
+
}).then((_response) => {
|
|
2960
|
+
return this.transformResult(url_, _response, (_response) => this.processGetDesignParameters(_response));
|
|
2961
|
+
});
|
|
2962
|
+
}
|
|
2963
|
+
processGetDesignParameters(response) {
|
|
2964
|
+
const status = response.status;
|
|
2965
|
+
let _headers = {};
|
|
2966
|
+
if (response.headers && typeof response.headers === "object") {
|
|
2967
|
+
for (let k in response.headers) {
|
|
2968
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
2969
|
+
_headers[k] = response.headers[k];
|
|
2970
|
+
}
|
|
2971
|
+
}
|
|
2972
|
+
}
|
|
2973
|
+
if (status === 200) {
|
|
2974
|
+
const _responseText = response.data;
|
|
2975
|
+
let result200 = null;
|
|
2976
|
+
let resultData200 = _responseText;
|
|
2977
|
+
result200 = JSON.parse(resultData200);
|
|
2978
|
+
return Promise.resolve(result200);
|
|
2979
|
+
}
|
|
2980
|
+
else if (status === 404) {
|
|
2981
|
+
const _responseText = response.data;
|
|
2982
|
+
let result404 = null;
|
|
2983
|
+
let resultData404 = _responseText;
|
|
2984
|
+
result404 = JSON.parse(resultData404);
|
|
2985
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2986
|
+
}
|
|
2987
|
+
else if (status === 401) {
|
|
2988
|
+
const _responseText = response.data;
|
|
2989
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2990
|
+
}
|
|
2991
|
+
else if (status === 403) {
|
|
2992
|
+
const _responseText = response.data;
|
|
2993
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2994
|
+
}
|
|
2995
|
+
else if (status === 500) {
|
|
2996
|
+
const _responseText = response.data;
|
|
2997
|
+
let result500 = null;
|
|
2998
|
+
let resultData500 = _responseText;
|
|
2999
|
+
result500 = JSON.parse(resultData500);
|
|
3000
|
+
return throwException("Internal server error", status, _responseText, _headers, result500);
|
|
3001
|
+
}
|
|
3002
|
+
else if (status !== 200 && status !== 204) {
|
|
3003
|
+
const _responseText = response.data;
|
|
3004
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3005
|
+
}
|
|
3006
|
+
return Promise.resolve(null);
|
|
3007
|
+
}
|
|
2866
3008
|
/**
|
|
2867
3009
|
* Loads data schema from design file taken from storage
|
|
2868
3010
|
* @param id Design identifier
|
|
@@ -4687,10 +4829,12 @@ export class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
4687
4829
|
* @param alphaMask (optional)
|
|
4688
4830
|
* @param page (optional)
|
|
4689
4831
|
* @param colorizeColor (optional)
|
|
4832
|
+
* @param rw (optional)
|
|
4833
|
+
* @param rh (optional)
|
|
4690
4834
|
* @param tenantId (optional) Tenant identifier
|
|
4691
4835
|
* @return Success
|
|
4692
4836
|
*/
|
|
4693
|
-
img(f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, tenantId, cancelToken) {
|
|
4837
|
+
img(f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, tenantId, cancelToken) {
|
|
4694
4838
|
let url_ = this.baseUrl + "/api/atoms/v1/ccviewer/img?";
|
|
4695
4839
|
if (f !== undefined && f !== null)
|
|
4696
4840
|
url_ += "f=" + encodeURIComponent("" + f) + "&";
|
|
@@ -4724,6 +4868,10 @@ export class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
4724
4868
|
url_ += "page=" + encodeURIComponent("" + page) + "&";
|
|
4725
4869
|
if (colorizeColor !== undefined && colorizeColor !== null)
|
|
4726
4870
|
url_ += "colorizeColor=" + encodeURIComponent("" + colorizeColor) + "&";
|
|
4871
|
+
if (rw !== undefined && rw !== null)
|
|
4872
|
+
url_ += "rw=" + encodeURIComponent("" + rw) + "&";
|
|
4873
|
+
if (rh !== undefined && rh !== null)
|
|
4874
|
+
url_ += "rh=" + encodeURIComponent("" + rh) + "&";
|
|
4727
4875
|
if (tenantId === null)
|
|
4728
4876
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4729
4877
|
else if (tenantId !== undefined)
|
|
@@ -5003,13 +5151,64 @@ export class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
5003
5151
|
}
|
|
5004
5152
|
/**
|
|
5005
5153
|
* @param f (optional)
|
|
5154
|
+
* @param w (optional)
|
|
5155
|
+
* @param h (optional)
|
|
5156
|
+
* @param cmyk (optional)
|
|
5157
|
+
* @param rgb (optional)
|
|
5158
|
+
* @param grayscale (optional)
|
|
5159
|
+
* @param target (optional)
|
|
5160
|
+
* @param sq (optional)
|
|
5161
|
+
* @param effect (optional)
|
|
5162
|
+
* @param kp (optional)
|
|
5163
|
+
* @param color (optional)
|
|
5164
|
+
* @param obm (optional)
|
|
5165
|
+
* @param oo (optional)
|
|
5166
|
+
* @param alphaMask (optional)
|
|
5167
|
+
* @param page (optional)
|
|
5168
|
+
* @param colorizeColor (optional)
|
|
5169
|
+
* @param rw (optional)
|
|
5170
|
+
* @param rh (optional)
|
|
5006
5171
|
* @param tenantId (optional) Tenant identifier
|
|
5007
5172
|
* @return Success
|
|
5008
5173
|
*/
|
|
5009
|
-
svg(f, tenantId, cancelToken) {
|
|
5174
|
+
svg(f, w, h, cmyk, rgb, grayscale, target, sq, effect, kp, color, obm, oo, alphaMask, page, colorizeColor, rw, rh, tenantId, cancelToken) {
|
|
5010
5175
|
let url_ = this.baseUrl + "/api/atoms/v1/ccviewer/svg?";
|
|
5011
5176
|
if (f !== undefined && f !== null)
|
|
5012
5177
|
url_ += "f=" + encodeURIComponent("" + f) + "&";
|
|
5178
|
+
if (w !== undefined && w !== null)
|
|
5179
|
+
url_ += "w=" + encodeURIComponent("" + w) + "&";
|
|
5180
|
+
if (h !== undefined && h !== null)
|
|
5181
|
+
url_ += "h=" + encodeURIComponent("" + h) + "&";
|
|
5182
|
+
if (cmyk !== undefined && cmyk !== null)
|
|
5183
|
+
url_ += "cmyk=" + encodeURIComponent("" + cmyk) + "&";
|
|
5184
|
+
if (rgb !== undefined && rgb !== null)
|
|
5185
|
+
url_ += "rgb=" + encodeURIComponent("" + rgb) + "&";
|
|
5186
|
+
if (grayscale !== undefined && grayscale !== null)
|
|
5187
|
+
url_ += "grayscale=" + encodeURIComponent("" + grayscale) + "&";
|
|
5188
|
+
if (target !== undefined && target !== null)
|
|
5189
|
+
url_ += "target=" + encodeURIComponent("" + target) + "&";
|
|
5190
|
+
if (sq !== undefined && sq !== null)
|
|
5191
|
+
url_ += "sq=" + encodeURIComponent("" + sq) + "&";
|
|
5192
|
+
if (effect !== undefined && effect !== null)
|
|
5193
|
+
url_ += "effect=" + encodeURIComponent("" + effect) + "&";
|
|
5194
|
+
if (kp !== undefined && kp !== null)
|
|
5195
|
+
url_ += "kp=" + encodeURIComponent("" + kp) + "&";
|
|
5196
|
+
if (color !== undefined && color !== null)
|
|
5197
|
+
url_ += "color=" + encodeURIComponent("" + color) + "&";
|
|
5198
|
+
if (obm !== undefined && obm !== null)
|
|
5199
|
+
url_ += "obm=" + encodeURIComponent("" + obm) + "&";
|
|
5200
|
+
if (oo !== undefined && oo !== null)
|
|
5201
|
+
url_ += "oo=" + encodeURIComponent("" + oo) + "&";
|
|
5202
|
+
if (alphaMask !== undefined && alphaMask !== null)
|
|
5203
|
+
url_ += "alphaMask=" + encodeURIComponent("" + alphaMask) + "&";
|
|
5204
|
+
if (page !== undefined && page !== null)
|
|
5205
|
+
url_ += "page=" + encodeURIComponent("" + page) + "&";
|
|
5206
|
+
if (colorizeColor !== undefined && colorizeColor !== null)
|
|
5207
|
+
url_ += "colorizeColor=" + encodeURIComponent("" + colorizeColor) + "&";
|
|
5208
|
+
if (rw !== undefined && rw !== null)
|
|
5209
|
+
url_ += "rw=" + encodeURIComponent("" + rw) + "&";
|
|
5210
|
+
if (rh !== undefined && rh !== null)
|
|
5211
|
+
url_ += "rh=" + encodeURIComponent("" + rh) + "&";
|
|
5013
5212
|
if (tenantId === null)
|
|
5014
5213
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
5015
5214
|
else if (tenantId !== undefined)
|
|
@@ -5893,9 +6092,15 @@ export var ImagePreviewFormat;
|
|
|
5893
6092
|
(function (ImagePreviewFormat) {
|
|
5894
6093
|
ImagePreviewFormat["Jpeg"] = "Jpeg";
|
|
5895
6094
|
ImagePreviewFormat["Png"] = "Png";
|
|
5896
|
-
ImagePreviewFormat["Tiff"] = "Tiff";
|
|
5897
|
-
ImagePreviewFormat["Pdf"] = "Pdf";
|
|
5898
6095
|
})(ImagePreviewFormat || (ImagePreviewFormat = {}));
|
|
6096
|
+
/** Image preview fit mode. */
|
|
6097
|
+
export var ImagePreviewFitMode;
|
|
6098
|
+
(function (ImagePreviewFitMode) {
|
|
6099
|
+
ImagePreviewFitMode["Fit"] = "Fit";
|
|
6100
|
+
ImagePreviewFitMode["Shrink"] = "Shrink";
|
|
6101
|
+
ImagePreviewFitMode["Resize"] = "Resize";
|
|
6102
|
+
ImagePreviewFitMode["Fill"] = "Fill";
|
|
6103
|
+
})(ImagePreviewFitMode || (ImagePreviewFitMode = {}));
|
|
5899
6104
|
export var DesignElementType;
|
|
5900
6105
|
(function (DesignElementType) {
|
|
5901
6106
|
DesignElementType["Product"] = "Product";
|
|
@@ -5936,8 +6141,6 @@ export var ProductPreviewFormat;
|
|
|
5936
6141
|
(function (ProductPreviewFormat) {
|
|
5937
6142
|
ProductPreviewFormat["Jpeg"] = "Jpeg";
|
|
5938
6143
|
ProductPreviewFormat["Png"] = "Png";
|
|
5939
|
-
ProductPreviewFormat["Tiff"] = "Tiff";
|
|
5940
|
-
ProductPreviewFormat["Pdf"] = "Pdf";
|
|
5941
6144
|
})(ProductPreviewFormat || (ProductPreviewFormat = {}));
|
|
5942
6145
|
export var ProductProofFormat;
|
|
5943
6146
|
(function (ProductProofFormat) {
|