@aurigma/axios-design-atoms-api-client 2.65.1 → 2.66.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 +562 -72
- package/dist/cjs/design-atoms-api-client.js +1618 -128
- package/dist/cjs/design-atoms-api-client.js.map +1 -1
- package/dist/esm/design-atoms-api-client.d.ts +562 -72
- package/dist/esm/design-atoms-api-client.js +1620 -131
- package/dist/esm/design-atoms-api-client.js.map +1 -1
- package/package.json +1 -1
|
@@ -351,6 +351,13 @@ export class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
351
351
|
result200 = JSON.parse(resultData200);
|
|
352
352
|
return Promise.resolve(result200);
|
|
353
353
|
}
|
|
354
|
+
else if (status === 400) {
|
|
355
|
+
const _responseText = response.data;
|
|
356
|
+
let result400 = null;
|
|
357
|
+
let resultData400 = _responseText;
|
|
358
|
+
result400 = JSON.parse(resultData400);
|
|
359
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
360
|
+
}
|
|
354
361
|
else if (status === 401) {
|
|
355
362
|
const _responseText = response.data;
|
|
356
363
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -416,6 +423,13 @@ export class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
416
423
|
result200 = JSON.parse(resultData200);
|
|
417
424
|
return Promise.resolve(result200);
|
|
418
425
|
}
|
|
426
|
+
else if (status === 400) {
|
|
427
|
+
const _responseText = response.data;
|
|
428
|
+
let result400 = null;
|
|
429
|
+
let resultData400 = _responseText;
|
|
430
|
+
result400 = JSON.parse(resultData400);
|
|
431
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
432
|
+
}
|
|
419
433
|
else if (status === 401) {
|
|
420
434
|
const _responseText = response.data;
|
|
421
435
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -447,7 +461,7 @@ export class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
447
461
|
method: "GET",
|
|
448
462
|
url: url_,
|
|
449
463
|
headers: {
|
|
450
|
-
"Accept": "application/
|
|
464
|
+
"Accept": "application/octet-stream"
|
|
451
465
|
},
|
|
452
466
|
cancelToken
|
|
453
467
|
};
|
|
@@ -825,7 +839,7 @@ export class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
825
839
|
method: "GET",
|
|
826
840
|
url: url_,
|
|
827
841
|
headers: {
|
|
828
|
-
"Accept": "application/
|
|
842
|
+
"Accept": "application/octet-stream"
|
|
829
843
|
},
|
|
830
844
|
cancelToken
|
|
831
845
|
};
|
|
@@ -961,7 +975,7 @@ export class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
961
975
|
method: "GET",
|
|
962
976
|
url: url_,
|
|
963
977
|
headers: {
|
|
964
|
-
"Accept": "application/
|
|
978
|
+
"Accept": "application/octet-stream"
|
|
965
979
|
},
|
|
966
980
|
cancelToken
|
|
967
981
|
};
|
|
@@ -1036,7 +1050,7 @@ export class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
1036
1050
|
method: "GET",
|
|
1037
1051
|
url: url_,
|
|
1038
1052
|
headers: {
|
|
1039
|
-
"Accept": "application/
|
|
1053
|
+
"Accept": "application/octet-stream"
|
|
1040
1054
|
},
|
|
1041
1055
|
cancelToken
|
|
1042
1056
|
};
|
|
@@ -1158,7 +1172,7 @@ export class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
1158
1172
|
method: "GET",
|
|
1159
1173
|
url: url_,
|
|
1160
1174
|
headers: {
|
|
1161
|
-
"Accept": "application/
|
|
1175
|
+
"Accept": "application/octet-stream"
|
|
1162
1176
|
},
|
|
1163
1177
|
cancelToken
|
|
1164
1178
|
};
|
|
@@ -1233,7 +1247,7 @@ export class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
1233
1247
|
method: "GET",
|
|
1234
1248
|
url: url_,
|
|
1235
1249
|
headers: {
|
|
1236
|
-
"Accept": "application/
|
|
1250
|
+
"Accept": "application/octet-stream"
|
|
1237
1251
|
},
|
|
1238
1252
|
cancelToken
|
|
1239
1253
|
};
|
|
@@ -2074,6 +2088,13 @@ export class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2074
2088
|
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
2075
2089
|
return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
|
|
2076
2090
|
}
|
|
2091
|
+
else if (status === 404) {
|
|
2092
|
+
const _responseText = response.data;
|
|
2093
|
+
let result404 = null;
|
|
2094
|
+
let resultData404 = _responseText;
|
|
2095
|
+
result404 = JSON.parse(resultData404);
|
|
2096
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2097
|
+
}
|
|
2077
2098
|
else if (status === 401) {
|
|
2078
2099
|
const _responseText = response.data;
|
|
2079
2100
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -2165,6 +2186,13 @@ export class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2165
2186
|
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
2166
2187
|
return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
|
|
2167
2188
|
}
|
|
2189
|
+
else if (status === 404) {
|
|
2190
|
+
const _responseText = response.data;
|
|
2191
|
+
let result404 = null;
|
|
2192
|
+
let resultData404 = _responseText;
|
|
2193
|
+
result404 = JSON.parse(resultData404);
|
|
2194
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2195
|
+
}
|
|
2168
2196
|
else if (status === 401) {
|
|
2169
2197
|
const _responseText = response.data;
|
|
2170
2198
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -2216,13 +2244,9 @@ export class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2216
2244
|
content_.append("resourceSourceId", resourceSourceId.toString());
|
|
2217
2245
|
if (resourceType !== null && resourceType !== undefined)
|
|
2218
2246
|
content_.append("resourceType", resourceType.toString());
|
|
2219
|
-
if (anonymousAccess
|
|
2220
|
-
throw new Error("The parameter 'anonymousAccess' cannot be null.");
|
|
2221
|
-
else
|
|
2247
|
+
if (anonymousAccess !== null && anonymousAccess !== undefined)
|
|
2222
2248
|
content_.append("anonymousAccess", anonymousAccess.toString());
|
|
2223
|
-
if (overwriteExistingResource
|
|
2224
|
-
throw new Error("The parameter 'overwriteExistingResource' cannot be null.");
|
|
2225
|
-
else
|
|
2249
|
+
if (overwriteExistingResource !== null && overwriteExistingResource !== undefined)
|
|
2226
2250
|
content_.append("overwriteExistingResource", overwriteExistingResource.toString());
|
|
2227
2251
|
if (sourceFile !== null && sourceFile !== undefined)
|
|
2228
2252
|
content_.append("sourceFile", sourceFile.data, sourceFile.fileName ? sourceFile.fileName : "sourceFile");
|
|
@@ -2277,6 +2301,13 @@ export class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2277
2301
|
result200 = JSON.parse(resultData200);
|
|
2278
2302
|
return Promise.resolve(result200);
|
|
2279
2303
|
}
|
|
2304
|
+
else if (status === 404) {
|
|
2305
|
+
const _responseText = response.data;
|
|
2306
|
+
let result404 = null;
|
|
2307
|
+
let resultData404 = _responseText;
|
|
2308
|
+
result404 = JSON.parse(resultData404);
|
|
2309
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2310
|
+
}
|
|
2280
2311
|
else if (status === 409) {
|
|
2281
2312
|
const _responseText = response.data;
|
|
2282
2313
|
let result409 = null;
|
|
@@ -2356,6 +2387,13 @@ export class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2356
2387
|
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
2357
2388
|
return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
|
|
2358
2389
|
}
|
|
2390
|
+
else if (status === 404) {
|
|
2391
|
+
const _responseText = response.data;
|
|
2392
|
+
let result404 = null;
|
|
2393
|
+
let resultData404 = _responseText;
|
|
2394
|
+
result404 = JSON.parse(resultData404);
|
|
2395
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2396
|
+
}
|
|
2359
2397
|
else if (status === 401) {
|
|
2360
2398
|
const _responseText = response.data;
|
|
2361
2399
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -2424,6 +2462,13 @@ export class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2424
2462
|
result200 = JSON.parse(resultData200);
|
|
2425
2463
|
return Promise.resolve(result200);
|
|
2426
2464
|
}
|
|
2465
|
+
else if (status === 404) {
|
|
2466
|
+
const _responseText = response.data;
|
|
2467
|
+
let result404 = null;
|
|
2468
|
+
let resultData404 = _responseText;
|
|
2469
|
+
result404 = JSON.parse(resultData404);
|
|
2470
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2471
|
+
}
|
|
2427
2472
|
else if (status === 409) {
|
|
2428
2473
|
const _responseText = response.data;
|
|
2429
2474
|
let result409 = null;
|
|
@@ -2499,6 +2544,13 @@ export class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2499
2544
|
result200 = JSON.parse(resultData200);
|
|
2500
2545
|
return Promise.resolve(result200);
|
|
2501
2546
|
}
|
|
2547
|
+
else if (status === 404) {
|
|
2548
|
+
const _responseText = response.data;
|
|
2549
|
+
let result404 = null;
|
|
2550
|
+
let resultData404 = _responseText;
|
|
2551
|
+
result404 = JSON.parse(resultData404);
|
|
2552
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2553
|
+
}
|
|
2502
2554
|
else if (status === 409) {
|
|
2503
2555
|
const _responseText = response.data;
|
|
2504
2556
|
let result409 = null;
|
|
@@ -2639,7 +2691,7 @@ export class DesignAtomsMockups3dApiClient extends ApiClientBase {
|
|
|
2639
2691
|
method: "GET",
|
|
2640
2692
|
url: url_,
|
|
2641
2693
|
headers: {
|
|
2642
|
-
"Accept": "application/
|
|
2694
|
+
"Accept": "application/octet-stream"
|
|
2643
2695
|
},
|
|
2644
2696
|
cancelToken
|
|
2645
2697
|
};
|
|
@@ -2724,7 +2776,7 @@ export class DesignAtomsMockups3dApiClient extends ApiClientBase {
|
|
|
2724
2776
|
method: "GET",
|
|
2725
2777
|
url: url_,
|
|
2726
2778
|
headers: {
|
|
2727
|
-
"Accept": "application/
|
|
2779
|
+
"Accept": "application/octet-stream"
|
|
2728
2780
|
},
|
|
2729
2781
|
cancelToken
|
|
2730
2782
|
};
|
|
@@ -2751,11 +2803,1322 @@ export class DesignAtomsMockups3dApiClient extends ApiClientBase {
|
|
|
2751
2803
|
}
|
|
2752
2804
|
}
|
|
2753
2805
|
}
|
|
2754
|
-
if (status === 200 || status === 206) {
|
|
2755
|
-
const contentDisposition = response.headers ? response.headers["content-disposition"] : undefined;
|
|
2756
|
-
const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
2757
|
-
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
2758
|
-
return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
|
|
2806
|
+
if (status === 200 || status === 206) {
|
|
2807
|
+
const contentDisposition = response.headers ? response.headers["content-disposition"] : undefined;
|
|
2808
|
+
const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
2809
|
+
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
2810
|
+
return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
|
|
2811
|
+
}
|
|
2812
|
+
else if (status === 404) {
|
|
2813
|
+
const _responseText = response.data;
|
|
2814
|
+
let result404 = null;
|
|
2815
|
+
let resultData404 = _responseText;
|
|
2816
|
+
result404 = JSON.parse(resultData404);
|
|
2817
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2818
|
+
}
|
|
2819
|
+
else if (status === 409) {
|
|
2820
|
+
const _responseText = response.data;
|
|
2821
|
+
let result409 = null;
|
|
2822
|
+
let resultData409 = _responseText;
|
|
2823
|
+
result409 = JSON.parse(resultData409);
|
|
2824
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2825
|
+
}
|
|
2826
|
+
else if (status === 401) {
|
|
2827
|
+
const _responseText = response.data;
|
|
2828
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2829
|
+
}
|
|
2830
|
+
else if (status === 403) {
|
|
2831
|
+
const _responseText = response.data;
|
|
2832
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2833
|
+
}
|
|
2834
|
+
else if (status !== 200 && status !== 204) {
|
|
2835
|
+
const _responseText = response.data;
|
|
2836
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2837
|
+
}
|
|
2838
|
+
return Promise.resolve(null);
|
|
2839
|
+
}
|
|
2840
|
+
}
|
|
2841
|
+
export class DesignAtomsPalettesApiClient extends ApiClientBase {
|
|
2842
|
+
instance;
|
|
2843
|
+
baseUrl;
|
|
2844
|
+
jsonParseReviver = undefined;
|
|
2845
|
+
constructor(configuration, baseUrl, instance) {
|
|
2846
|
+
super(configuration);
|
|
2847
|
+
this.instance = instance ? instance : axios.create();
|
|
2848
|
+
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
2849
|
+
}
|
|
2850
|
+
/**
|
|
2851
|
+
* Returns a closest color to provided color in a specified palette.
|
|
2852
|
+
* @param paletteUID (optional) Palette UID.
|
|
2853
|
+
* @param tenantId (optional) Tenant identifier
|
|
2854
|
+
* @param body (optional) Source color.
|
|
2855
|
+
* @return Success
|
|
2856
|
+
*/
|
|
2857
|
+
findPaletteColor(paletteUID, tenantId, body, cancelToken) {
|
|
2858
|
+
let url_ = this.baseUrl + "/api/atoms/v1/palettes/find-color?";
|
|
2859
|
+
if (paletteUID !== undefined && paletteUID !== null)
|
|
2860
|
+
url_ += "paletteUID=" + encodeURIComponent("" + paletteUID) + "&";
|
|
2861
|
+
if (tenantId === null)
|
|
2862
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2863
|
+
else if (tenantId !== undefined)
|
|
2864
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2865
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2866
|
+
const content_ = JSON.stringify(body);
|
|
2867
|
+
let options_ = {
|
|
2868
|
+
data: content_,
|
|
2869
|
+
method: "POST",
|
|
2870
|
+
url: url_,
|
|
2871
|
+
headers: {
|
|
2872
|
+
"Content-Type": "application/json",
|
|
2873
|
+
"Accept": "application/json"
|
|
2874
|
+
},
|
|
2875
|
+
cancelToken
|
|
2876
|
+
};
|
|
2877
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2878
|
+
return this.instance.request(transformedOptions_);
|
|
2879
|
+
}).catch((_error) => {
|
|
2880
|
+
if (isAxiosError(_error) && _error.response) {
|
|
2881
|
+
return _error.response;
|
|
2882
|
+
}
|
|
2883
|
+
else {
|
|
2884
|
+
throw _error;
|
|
2885
|
+
}
|
|
2886
|
+
}).then((_response) => {
|
|
2887
|
+
return this.transformResult(url_, _response, (_response) => this.processFindPaletteColor(_response));
|
|
2888
|
+
});
|
|
2889
|
+
}
|
|
2890
|
+
processFindPaletteColor(response) {
|
|
2891
|
+
const status = response.status;
|
|
2892
|
+
let _headers = {};
|
|
2893
|
+
if (response.headers && typeof response.headers === "object") {
|
|
2894
|
+
for (let k in response.headers) {
|
|
2895
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
2896
|
+
_headers[k] = response.headers[k];
|
|
2897
|
+
}
|
|
2898
|
+
}
|
|
2899
|
+
}
|
|
2900
|
+
if (status === 200) {
|
|
2901
|
+
const _responseText = response.data;
|
|
2902
|
+
let result200 = null;
|
|
2903
|
+
let resultData200 = _responseText;
|
|
2904
|
+
result200 = JSON.parse(resultData200);
|
|
2905
|
+
return Promise.resolve(result200);
|
|
2906
|
+
}
|
|
2907
|
+
else if (status === 400) {
|
|
2908
|
+
const _responseText = response.data;
|
|
2909
|
+
let result400 = null;
|
|
2910
|
+
let resultData400 = _responseText;
|
|
2911
|
+
result400 = JSON.parse(resultData400);
|
|
2912
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
2913
|
+
}
|
|
2914
|
+
else if (status === 404) {
|
|
2915
|
+
const _responseText = response.data;
|
|
2916
|
+
let result404 = null;
|
|
2917
|
+
let resultData404 = _responseText;
|
|
2918
|
+
result404 = JSON.parse(resultData404);
|
|
2919
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2920
|
+
}
|
|
2921
|
+
else if (status === 409) {
|
|
2922
|
+
const _responseText = response.data;
|
|
2923
|
+
let result409 = null;
|
|
2924
|
+
let resultData409 = _responseText;
|
|
2925
|
+
result409 = JSON.parse(resultData409);
|
|
2926
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2927
|
+
}
|
|
2928
|
+
else if (status === 401) {
|
|
2929
|
+
const _responseText = response.data;
|
|
2930
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2931
|
+
}
|
|
2932
|
+
else if (status === 403) {
|
|
2933
|
+
const _responseText = response.data;
|
|
2934
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2935
|
+
}
|
|
2936
|
+
else if (status !== 200 && status !== 204) {
|
|
2937
|
+
const _responseText = response.data;
|
|
2938
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2939
|
+
}
|
|
2940
|
+
return Promise.resolve(null);
|
|
2941
|
+
}
|
|
2942
|
+
/**
|
|
2943
|
+
* Returns a serialized palette model by its identifier or UID.
|
|
2944
|
+
* @param id (optional) Palette identifier.
|
|
2945
|
+
* @param uid (optional) Palette UID.
|
|
2946
|
+
* @param tenantId (optional) Tenant identifier
|
|
2947
|
+
* @return Success
|
|
2948
|
+
*/
|
|
2949
|
+
getPaletteModel(id, uid, tenantId, cancelToken) {
|
|
2950
|
+
let url_ = this.baseUrl + "/api/atoms/v1/palettes/model?";
|
|
2951
|
+
if (id !== undefined && id !== null)
|
|
2952
|
+
url_ += "id=" + encodeURIComponent("" + id) + "&";
|
|
2953
|
+
if (uid !== undefined && uid !== null)
|
|
2954
|
+
url_ += "uid=" + encodeURIComponent("" + uid) + "&";
|
|
2955
|
+
if (tenantId === null)
|
|
2956
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2957
|
+
else if (tenantId !== undefined)
|
|
2958
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2959
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2960
|
+
let options_ = {
|
|
2961
|
+
method: "GET",
|
|
2962
|
+
url: url_,
|
|
2963
|
+
headers: {
|
|
2964
|
+
"Accept": "application/json"
|
|
2965
|
+
},
|
|
2966
|
+
cancelToken
|
|
2967
|
+
};
|
|
2968
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2969
|
+
return this.instance.request(transformedOptions_);
|
|
2970
|
+
}).catch((_error) => {
|
|
2971
|
+
if (isAxiosError(_error) && _error.response) {
|
|
2972
|
+
return _error.response;
|
|
2973
|
+
}
|
|
2974
|
+
else {
|
|
2975
|
+
throw _error;
|
|
2976
|
+
}
|
|
2977
|
+
}).then((_response) => {
|
|
2978
|
+
return this.transformResult(url_, _response, (_response) => this.processGetPaletteModel(_response));
|
|
2979
|
+
});
|
|
2980
|
+
}
|
|
2981
|
+
processGetPaletteModel(response) {
|
|
2982
|
+
const status = response.status;
|
|
2983
|
+
let _headers = {};
|
|
2984
|
+
if (response.headers && typeof response.headers === "object") {
|
|
2985
|
+
for (let k in response.headers) {
|
|
2986
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
2987
|
+
_headers[k] = response.headers[k];
|
|
2988
|
+
}
|
|
2989
|
+
}
|
|
2990
|
+
}
|
|
2991
|
+
if (status === 200) {
|
|
2992
|
+
const _responseText = response.data;
|
|
2993
|
+
let result200 = null;
|
|
2994
|
+
let resultData200 = _responseText;
|
|
2995
|
+
result200 = JSON.parse(resultData200);
|
|
2996
|
+
return Promise.resolve(result200);
|
|
2997
|
+
}
|
|
2998
|
+
else if (status === 400) {
|
|
2999
|
+
const _responseText = response.data;
|
|
3000
|
+
let result400 = null;
|
|
3001
|
+
let resultData400 = _responseText;
|
|
3002
|
+
result400 = JSON.parse(resultData400);
|
|
3003
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
3004
|
+
}
|
|
3005
|
+
else if (status === 404) {
|
|
3006
|
+
const _responseText = response.data;
|
|
3007
|
+
let result404 = null;
|
|
3008
|
+
let resultData404 = _responseText;
|
|
3009
|
+
result404 = JSON.parse(resultData404);
|
|
3010
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3011
|
+
}
|
|
3012
|
+
else if (status === 409) {
|
|
3013
|
+
const _responseText = response.data;
|
|
3014
|
+
let result409 = null;
|
|
3015
|
+
let resultData409 = _responseText;
|
|
3016
|
+
result409 = JSON.parse(resultData409);
|
|
3017
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3018
|
+
}
|
|
3019
|
+
else if (status === 401) {
|
|
3020
|
+
const _responseText = response.data;
|
|
3021
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3022
|
+
}
|
|
3023
|
+
else if (status === 403) {
|
|
3024
|
+
const _responseText = response.data;
|
|
3025
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3026
|
+
}
|
|
3027
|
+
else if (status !== 200 && status !== 204) {
|
|
3028
|
+
const _responseText = response.data;
|
|
3029
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3030
|
+
}
|
|
3031
|
+
return Promise.resolve(null);
|
|
3032
|
+
}
|
|
3033
|
+
}
|
|
3034
|
+
export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
3035
|
+
instance;
|
|
3036
|
+
baseUrl;
|
|
3037
|
+
jsonParseReviver = undefined;
|
|
3038
|
+
constructor(configuration, baseUrl, instance) {
|
|
3039
|
+
super(configuration);
|
|
3040
|
+
this.instance = instance ? instance : axios.create();
|
|
3041
|
+
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
3042
|
+
}
|
|
3043
|
+
/**
|
|
3044
|
+
* Patches a print-product of the specified design file.
|
|
3045
|
+
* @param id Design identifier.
|
|
3046
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3047
|
+
* @param tenantId (optional) Tenant identifier
|
|
3048
|
+
* @param patchType (optional)
|
|
3049
|
+
* @param replaceImageItemFileInfo_itemName (optional)
|
|
3050
|
+
* @param replaceImageItemFileInfo_sourceFile (optional)
|
|
3051
|
+
* @param replacePlaceholderItemContentInfo_placeholderItemName (optional)
|
|
3052
|
+
* @param replacePlaceholderItemContentInfo_newContentType (optional)
|
|
3053
|
+
* @param replacePlaceholderItemContentInfo_sourceFile (optional)
|
|
3054
|
+
* @return No Content
|
|
3055
|
+
*/
|
|
3056
|
+
patchDesignProduct(id, privateStorageOwner, tenantId, patchType, replaceImageItemFileInfo_itemName, replaceImageItemFileInfo_sourceFile, replacePlaceholderItemContentInfo_placeholderItemName, replacePlaceholderItemContentInfo_newContentType, replacePlaceholderItemContentInfo_sourceFile, cancelToken) {
|
|
3057
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product?";
|
|
3058
|
+
if (id === undefined || id === null)
|
|
3059
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3060
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3061
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3062
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3063
|
+
if (tenantId === null)
|
|
3064
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3065
|
+
else if (tenantId !== undefined)
|
|
3066
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3067
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3068
|
+
const content_ = new FormData();
|
|
3069
|
+
if (patchType === null || patchType === undefined)
|
|
3070
|
+
throw new Error("The parameter 'patchType' cannot be null.");
|
|
3071
|
+
else
|
|
3072
|
+
content_.append("patchType", patchType.toString());
|
|
3073
|
+
if (replaceImageItemFileInfo_itemName !== null && replaceImageItemFileInfo_itemName !== undefined)
|
|
3074
|
+
content_.append("replaceImageItemFileInfo.itemName", replaceImageItemFileInfo_itemName.toString());
|
|
3075
|
+
if (replaceImageItemFileInfo_sourceFile !== null && replaceImageItemFileInfo_sourceFile !== undefined)
|
|
3076
|
+
content_.append("replaceImageItemFileInfo.sourceFile", replaceImageItemFileInfo_sourceFile.data, replaceImageItemFileInfo_sourceFile.fileName ? replaceImageItemFileInfo_sourceFile.fileName : "replaceImageItemFileInfo.sourceFile");
|
|
3077
|
+
if (replacePlaceholderItemContentInfo_placeholderItemName !== null && replacePlaceholderItemContentInfo_placeholderItemName !== undefined)
|
|
3078
|
+
content_.append("replacePlaceholderItemContentInfo.placeholderItemName", replacePlaceholderItemContentInfo_placeholderItemName.toString());
|
|
3079
|
+
if (replacePlaceholderItemContentInfo_newContentType === null || replacePlaceholderItemContentInfo_newContentType === undefined)
|
|
3080
|
+
throw new Error("The parameter 'replacePlaceholderItemContentInfo_newContentType' cannot be null.");
|
|
3081
|
+
else
|
|
3082
|
+
content_.append("replacePlaceholderItemContentInfo.newContentType", replacePlaceholderItemContentInfo_newContentType.toString());
|
|
3083
|
+
if (replacePlaceholderItemContentInfo_sourceFile !== null && replacePlaceholderItemContentInfo_sourceFile !== undefined)
|
|
3084
|
+
content_.append("replacePlaceholderItemContentInfo.sourceFile", replacePlaceholderItemContentInfo_sourceFile.data, replacePlaceholderItemContentInfo_sourceFile.fileName ? replacePlaceholderItemContentInfo_sourceFile.fileName : "replacePlaceholderItemContentInfo.sourceFile");
|
|
3085
|
+
let options_ = {
|
|
3086
|
+
data: content_,
|
|
3087
|
+
method: "PATCH",
|
|
3088
|
+
url: url_,
|
|
3089
|
+
headers: {},
|
|
3090
|
+
cancelToken
|
|
3091
|
+
};
|
|
3092
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3093
|
+
return this.instance.request(transformedOptions_);
|
|
3094
|
+
}).catch((_error) => {
|
|
3095
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3096
|
+
return _error.response;
|
|
3097
|
+
}
|
|
3098
|
+
else {
|
|
3099
|
+
throw _error;
|
|
3100
|
+
}
|
|
3101
|
+
}).then((_response) => {
|
|
3102
|
+
return this.transformResult(url_, _response, (_response) => this.processPatchDesignProduct(_response));
|
|
3103
|
+
});
|
|
3104
|
+
}
|
|
3105
|
+
processPatchDesignProduct(response) {
|
|
3106
|
+
const status = response.status;
|
|
3107
|
+
let _headers = {};
|
|
3108
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3109
|
+
for (let k in response.headers) {
|
|
3110
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3111
|
+
_headers[k] = response.headers[k];
|
|
3112
|
+
}
|
|
3113
|
+
}
|
|
3114
|
+
}
|
|
3115
|
+
if (status === 204) {
|
|
3116
|
+
const _responseText = response.data;
|
|
3117
|
+
return Promise.resolve(null);
|
|
3118
|
+
}
|
|
3119
|
+
else if (status === 404) {
|
|
3120
|
+
const _responseText = response.data;
|
|
3121
|
+
let result404 = null;
|
|
3122
|
+
let resultData404 = _responseText;
|
|
3123
|
+
result404 = JSON.parse(resultData404);
|
|
3124
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3125
|
+
}
|
|
3126
|
+
else if (status === 401) {
|
|
3127
|
+
const _responseText = response.data;
|
|
3128
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3129
|
+
}
|
|
3130
|
+
else if (status === 403) {
|
|
3131
|
+
const _responseText = response.data;
|
|
3132
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3133
|
+
}
|
|
3134
|
+
else if (status !== 200 && status !== 204) {
|
|
3135
|
+
const _responseText = response.data;
|
|
3136
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3137
|
+
}
|
|
3138
|
+
return Promise.resolve(null);
|
|
3139
|
+
}
|
|
3140
|
+
/**
|
|
3141
|
+
* Returns a list of print-product container descriptions of the specified design file.
|
|
3142
|
+
* @param id Design identifier.
|
|
3143
|
+
* @param surfaceId (optional) Print-product surface identifier.
|
|
3144
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3145
|
+
* @param tenantId (optional) Tenant identifier
|
|
3146
|
+
* @return Success
|
|
3147
|
+
*/
|
|
3148
|
+
getDesignSurfaceContainers(id, surfaceId, privateStorageOwner, tenantId, cancelToken) {
|
|
3149
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/containers?";
|
|
3150
|
+
if (id === undefined || id === null)
|
|
3151
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3152
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3153
|
+
if (surfaceId !== undefined && surfaceId !== null)
|
|
3154
|
+
url_ += "surfaceId=" + encodeURIComponent("" + surfaceId) + "&";
|
|
3155
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3156
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3157
|
+
if (tenantId === null)
|
|
3158
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3159
|
+
else if (tenantId !== undefined)
|
|
3160
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3161
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3162
|
+
let options_ = {
|
|
3163
|
+
method: "GET",
|
|
3164
|
+
url: url_,
|
|
3165
|
+
headers: {
|
|
3166
|
+
"Accept": "application/json"
|
|
3167
|
+
},
|
|
3168
|
+
cancelToken
|
|
3169
|
+
};
|
|
3170
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3171
|
+
return this.instance.request(transformedOptions_);
|
|
3172
|
+
}).catch((_error) => {
|
|
3173
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3174
|
+
return _error.response;
|
|
3175
|
+
}
|
|
3176
|
+
else {
|
|
3177
|
+
throw _error;
|
|
3178
|
+
}
|
|
3179
|
+
}).then((_response) => {
|
|
3180
|
+
return this.transformResult(url_, _response, (_response) => this.processGetDesignSurfaceContainers(_response));
|
|
3181
|
+
});
|
|
3182
|
+
}
|
|
3183
|
+
processGetDesignSurfaceContainers(response) {
|
|
3184
|
+
const status = response.status;
|
|
3185
|
+
let _headers = {};
|
|
3186
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3187
|
+
for (let k in response.headers) {
|
|
3188
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3189
|
+
_headers[k] = response.headers[k];
|
|
3190
|
+
}
|
|
3191
|
+
}
|
|
3192
|
+
}
|
|
3193
|
+
if (status === 200) {
|
|
3194
|
+
const _responseText = response.data;
|
|
3195
|
+
let result200 = null;
|
|
3196
|
+
let resultData200 = _responseText;
|
|
3197
|
+
result200 = JSON.parse(resultData200);
|
|
3198
|
+
return Promise.resolve(result200);
|
|
3199
|
+
}
|
|
3200
|
+
else if (status === 404) {
|
|
3201
|
+
const _responseText = response.data;
|
|
3202
|
+
let result404 = null;
|
|
3203
|
+
let resultData404 = _responseText;
|
|
3204
|
+
result404 = JSON.parse(resultData404);
|
|
3205
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3206
|
+
}
|
|
3207
|
+
else if (status === 401) {
|
|
3208
|
+
const _responseText = response.data;
|
|
3209
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3210
|
+
}
|
|
3211
|
+
else if (status === 403) {
|
|
3212
|
+
const _responseText = response.data;
|
|
3213
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3214
|
+
}
|
|
3215
|
+
else if (status !== 200 && status !== 204) {
|
|
3216
|
+
const _responseText = response.data;
|
|
3217
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3218
|
+
}
|
|
3219
|
+
return Promise.resolve(null);
|
|
3220
|
+
}
|
|
3221
|
+
/**
|
|
3222
|
+
* Deletes a specified print-product container in an existing design file.
|
|
3223
|
+
* @param id Design identifier.
|
|
3224
|
+
* @param containerId Print-product container identifier.
|
|
3225
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3226
|
+
* @param tenantId (optional) Tenant identifier
|
|
3227
|
+
* @return No Content
|
|
3228
|
+
*/
|
|
3229
|
+
deleteDesignSurfaceContainer(id, containerId, privateStorageOwner, tenantId, cancelToken) {
|
|
3230
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/containers/{containerId}?";
|
|
3231
|
+
if (id === undefined || id === null)
|
|
3232
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3233
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3234
|
+
if (containerId === undefined || containerId === null)
|
|
3235
|
+
throw new Error("The parameter 'containerId' must be defined.");
|
|
3236
|
+
url_ = url_.replace("{containerId}", encodeURIComponent("" + containerId));
|
|
3237
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3238
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3239
|
+
if (tenantId === null)
|
|
3240
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3241
|
+
else if (tenantId !== undefined)
|
|
3242
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3243
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3244
|
+
let options_ = {
|
|
3245
|
+
method: "DELETE",
|
|
3246
|
+
url: url_,
|
|
3247
|
+
headers: {},
|
|
3248
|
+
cancelToken
|
|
3249
|
+
};
|
|
3250
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3251
|
+
return this.instance.request(transformedOptions_);
|
|
3252
|
+
}).catch((_error) => {
|
|
3253
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3254
|
+
return _error.response;
|
|
3255
|
+
}
|
|
3256
|
+
else {
|
|
3257
|
+
throw _error;
|
|
3258
|
+
}
|
|
3259
|
+
}).then((_response) => {
|
|
3260
|
+
return this.transformResult(url_, _response, (_response) => this.processDeleteDesignSurfaceContainer(_response));
|
|
3261
|
+
});
|
|
3262
|
+
}
|
|
3263
|
+
processDeleteDesignSurfaceContainer(response) {
|
|
3264
|
+
const status = response.status;
|
|
3265
|
+
let _headers = {};
|
|
3266
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3267
|
+
for (let k in response.headers) {
|
|
3268
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3269
|
+
_headers[k] = response.headers[k];
|
|
3270
|
+
}
|
|
3271
|
+
}
|
|
3272
|
+
}
|
|
3273
|
+
if (status === 204) {
|
|
3274
|
+
const _responseText = response.data;
|
|
3275
|
+
return Promise.resolve(null);
|
|
3276
|
+
}
|
|
3277
|
+
else if (status === 404) {
|
|
3278
|
+
const _responseText = response.data;
|
|
3279
|
+
let result404 = null;
|
|
3280
|
+
let resultData404 = _responseText;
|
|
3281
|
+
result404 = JSON.parse(resultData404);
|
|
3282
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3283
|
+
}
|
|
3284
|
+
else if (status === 409) {
|
|
3285
|
+
const _responseText = response.data;
|
|
3286
|
+
let result409 = null;
|
|
3287
|
+
let resultData409 = _responseText;
|
|
3288
|
+
result409 = JSON.parse(resultData409);
|
|
3289
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3290
|
+
}
|
|
3291
|
+
else if (status === 401) {
|
|
3292
|
+
const _responseText = response.data;
|
|
3293
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3294
|
+
}
|
|
3295
|
+
else if (status === 403) {
|
|
3296
|
+
const _responseText = response.data;
|
|
3297
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3298
|
+
}
|
|
3299
|
+
else if (status !== 200 && status !== 204) {
|
|
3300
|
+
const _responseText = response.data;
|
|
3301
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3302
|
+
}
|
|
3303
|
+
return Promise.resolve(null);
|
|
3304
|
+
}
|
|
3305
|
+
/**
|
|
3306
|
+
* Returns a print-product container of the specified design file as a json-serialized model.
|
|
3307
|
+
* @param id Design identifier.
|
|
3308
|
+
* @param containerId Print-product container identifier.
|
|
3309
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3310
|
+
* @param tenantId (optional) Tenant identifier
|
|
3311
|
+
* @return Success
|
|
3312
|
+
*/
|
|
3313
|
+
getDesignSurfaceContainerModel(id, containerId, privateStorageOwner, tenantId, cancelToken) {
|
|
3314
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/containers/{containerId}/model?";
|
|
3315
|
+
if (id === undefined || id === null)
|
|
3316
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3317
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3318
|
+
if (containerId === undefined || containerId === null)
|
|
3319
|
+
throw new Error("The parameter 'containerId' must be defined.");
|
|
3320
|
+
url_ = url_.replace("{containerId}", encodeURIComponent("" + containerId));
|
|
3321
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3322
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3323
|
+
if (tenantId === null)
|
|
3324
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3325
|
+
else if (tenantId !== undefined)
|
|
3326
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3327
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3328
|
+
let options_ = {
|
|
3329
|
+
method: "GET",
|
|
3330
|
+
url: url_,
|
|
3331
|
+
headers: {
|
|
3332
|
+
"Accept": "application/json"
|
|
3333
|
+
},
|
|
3334
|
+
cancelToken
|
|
3335
|
+
};
|
|
3336
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3337
|
+
return this.instance.request(transformedOptions_);
|
|
3338
|
+
}).catch((_error) => {
|
|
3339
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3340
|
+
return _error.response;
|
|
3341
|
+
}
|
|
3342
|
+
else {
|
|
3343
|
+
throw _error;
|
|
3344
|
+
}
|
|
3345
|
+
}).then((_response) => {
|
|
3346
|
+
return this.transformResult(url_, _response, (_response) => this.processGetDesignSurfaceContainerModel(_response));
|
|
3347
|
+
});
|
|
3348
|
+
}
|
|
3349
|
+
processGetDesignSurfaceContainerModel(response) {
|
|
3350
|
+
const status = response.status;
|
|
3351
|
+
let _headers = {};
|
|
3352
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3353
|
+
for (let k in response.headers) {
|
|
3354
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3355
|
+
_headers[k] = response.headers[k];
|
|
3356
|
+
}
|
|
3357
|
+
}
|
|
3358
|
+
}
|
|
3359
|
+
if (status === 200) {
|
|
3360
|
+
const _responseText = response.data;
|
|
3361
|
+
let result200 = null;
|
|
3362
|
+
let resultData200 = _responseText;
|
|
3363
|
+
result200 = JSON.parse(resultData200);
|
|
3364
|
+
return Promise.resolve(result200);
|
|
3365
|
+
}
|
|
3366
|
+
else if (status === 404) {
|
|
3367
|
+
const _responseText = response.data;
|
|
3368
|
+
let result404 = null;
|
|
3369
|
+
let resultData404 = _responseText;
|
|
3370
|
+
result404 = JSON.parse(resultData404);
|
|
3371
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3372
|
+
}
|
|
3373
|
+
else if (status === 409) {
|
|
3374
|
+
const _responseText = response.data;
|
|
3375
|
+
let result409 = null;
|
|
3376
|
+
let resultData409 = _responseText;
|
|
3377
|
+
result409 = JSON.parse(resultData409);
|
|
3378
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3379
|
+
}
|
|
3380
|
+
else if (status === 401) {
|
|
3381
|
+
const _responseText = response.data;
|
|
3382
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3383
|
+
}
|
|
3384
|
+
else if (status === 403) {
|
|
3385
|
+
const _responseText = response.data;
|
|
3386
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3387
|
+
}
|
|
3388
|
+
else if (status !== 200 && status !== 204) {
|
|
3389
|
+
const _responseText = response.data;
|
|
3390
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3391
|
+
}
|
|
3392
|
+
return Promise.resolve(null);
|
|
3393
|
+
}
|
|
3394
|
+
/**
|
|
3395
|
+
* Updates a specified print-product container in an existing design file with the data provided as a json-serialized model.
|
|
3396
|
+
* @param id Design identifier.
|
|
3397
|
+
* @param containerId Print-product container identifier.
|
|
3398
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3399
|
+
* @param tenantId (optional) Tenant identifier
|
|
3400
|
+
* @param body (optional) Json-serialized model of a print-product container.
|
|
3401
|
+
* @return Success
|
|
3402
|
+
*/
|
|
3403
|
+
updateDesignSurfaceContainerModel(id, containerId, privateStorageOwner, tenantId, body, cancelToken) {
|
|
3404
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/containers/{containerId}/model?";
|
|
3405
|
+
if (id === undefined || id === null)
|
|
3406
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3407
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3408
|
+
if (containerId === undefined || containerId === null)
|
|
3409
|
+
throw new Error("The parameter 'containerId' must be defined.");
|
|
3410
|
+
url_ = url_.replace("{containerId}", encodeURIComponent("" + containerId));
|
|
3411
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3412
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3413
|
+
if (tenantId === null)
|
|
3414
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3415
|
+
else if (tenantId !== undefined)
|
|
3416
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3417
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3418
|
+
const content_ = JSON.stringify(body);
|
|
3419
|
+
let options_ = {
|
|
3420
|
+
data: content_,
|
|
3421
|
+
method: "PUT",
|
|
3422
|
+
url: url_,
|
|
3423
|
+
headers: {
|
|
3424
|
+
"Content-Type": "application/json",
|
|
3425
|
+
"Accept": "application/json"
|
|
3426
|
+
},
|
|
3427
|
+
cancelToken
|
|
3428
|
+
};
|
|
3429
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3430
|
+
return this.instance.request(transformedOptions_);
|
|
3431
|
+
}).catch((_error) => {
|
|
3432
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3433
|
+
return _error.response;
|
|
3434
|
+
}
|
|
3435
|
+
else {
|
|
3436
|
+
throw _error;
|
|
3437
|
+
}
|
|
3438
|
+
}).then((_response) => {
|
|
3439
|
+
return this.transformResult(url_, _response, (_response) => this.processUpdateDesignSurfaceContainerModel(_response));
|
|
3440
|
+
});
|
|
3441
|
+
}
|
|
3442
|
+
processUpdateDesignSurfaceContainerModel(response) {
|
|
3443
|
+
const status = response.status;
|
|
3444
|
+
let _headers = {};
|
|
3445
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3446
|
+
for (let k in response.headers) {
|
|
3447
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3448
|
+
_headers[k] = response.headers[k];
|
|
3449
|
+
}
|
|
3450
|
+
}
|
|
3451
|
+
}
|
|
3452
|
+
if (status === 200) {
|
|
3453
|
+
const _responseText = response.data;
|
|
3454
|
+
let result200 = null;
|
|
3455
|
+
let resultData200 = _responseText;
|
|
3456
|
+
result200 = JSON.parse(resultData200);
|
|
3457
|
+
return Promise.resolve(result200);
|
|
3458
|
+
}
|
|
3459
|
+
else if (status === 400) {
|
|
3460
|
+
const _responseText = response.data;
|
|
3461
|
+
let result400 = null;
|
|
3462
|
+
let resultData400 = _responseText;
|
|
3463
|
+
result400 = JSON.parse(resultData400);
|
|
3464
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
3465
|
+
}
|
|
3466
|
+
else if (status === 404) {
|
|
3467
|
+
const _responseText = response.data;
|
|
3468
|
+
let result404 = null;
|
|
3469
|
+
let resultData404 = _responseText;
|
|
3470
|
+
result404 = JSON.parse(resultData404);
|
|
3471
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3472
|
+
}
|
|
3473
|
+
else if (status === 409) {
|
|
3474
|
+
const _responseText = response.data;
|
|
3475
|
+
let result409 = null;
|
|
3476
|
+
let resultData409 = _responseText;
|
|
3477
|
+
result409 = JSON.parse(resultData409);
|
|
3478
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3479
|
+
}
|
|
3480
|
+
else if (status === 401) {
|
|
3481
|
+
const _responseText = response.data;
|
|
3482
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3483
|
+
}
|
|
3484
|
+
else if (status === 403) {
|
|
3485
|
+
const _responseText = response.data;
|
|
3486
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3487
|
+
}
|
|
3488
|
+
else if (status !== 200 && status !== 204) {
|
|
3489
|
+
const _responseText = response.data;
|
|
3490
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3491
|
+
}
|
|
3492
|
+
return Promise.resolve(null);
|
|
3493
|
+
}
|
|
3494
|
+
/**
|
|
3495
|
+
* Inserts a new print-product container provided as a json-serialized model to the certain surface in an existing design file.
|
|
3496
|
+
Print-product container identifier will be reset by auto-generated value to prevent identifiers collisions.
|
|
3497
|
+
* @param id Design identifier.
|
|
3498
|
+
* @param surfaceId (optional) Print-product surface identifier.
|
|
3499
|
+
* @param index (optional) Container index within the conatiners list of a surface.
|
|
3500
|
+
* @param top (optional) Y axis position.
|
|
3501
|
+
* @param left (optional) X axis position.
|
|
3502
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3503
|
+
* @param tenantId (optional) Tenant identifier
|
|
3504
|
+
* @param body (optional) Json-serialized model of a new print-product container.
|
|
3505
|
+
* @return Success
|
|
3506
|
+
*/
|
|
3507
|
+
addDesignSurfaceContainerModel(id, surfaceId, index, top, left, privateStorageOwner, tenantId, body, cancelToken) {
|
|
3508
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/containers/model?";
|
|
3509
|
+
if (id === undefined || id === null)
|
|
3510
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3511
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3512
|
+
if (surfaceId !== undefined && surfaceId !== null)
|
|
3513
|
+
url_ += "surfaceId=" + encodeURIComponent("" + surfaceId) + "&";
|
|
3514
|
+
if (index !== undefined && index !== null)
|
|
3515
|
+
url_ += "index=" + encodeURIComponent("" + index) + "&";
|
|
3516
|
+
if (top === null)
|
|
3517
|
+
throw new Error("The parameter 'top' cannot be null.");
|
|
3518
|
+
else if (top !== undefined)
|
|
3519
|
+
url_ += "top=" + encodeURIComponent("" + top) + "&";
|
|
3520
|
+
if (left === null)
|
|
3521
|
+
throw new Error("The parameter 'left' cannot be null.");
|
|
3522
|
+
else if (left !== undefined)
|
|
3523
|
+
url_ += "left=" + encodeURIComponent("" + left) + "&";
|
|
3524
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3525
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3526
|
+
if (tenantId === null)
|
|
3527
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3528
|
+
else if (tenantId !== undefined)
|
|
3529
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3530
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3531
|
+
const content_ = JSON.stringify(body);
|
|
3532
|
+
let options_ = {
|
|
3533
|
+
data: content_,
|
|
3534
|
+
method: "POST",
|
|
3535
|
+
url: url_,
|
|
3536
|
+
headers: {
|
|
3537
|
+
"Content-Type": "application/json",
|
|
3538
|
+
"Accept": "application/json"
|
|
3539
|
+
},
|
|
3540
|
+
cancelToken
|
|
3541
|
+
};
|
|
3542
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3543
|
+
return this.instance.request(transformedOptions_);
|
|
3544
|
+
}).catch((_error) => {
|
|
3545
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3546
|
+
return _error.response;
|
|
3547
|
+
}
|
|
3548
|
+
else {
|
|
3549
|
+
throw _error;
|
|
3550
|
+
}
|
|
3551
|
+
}).then((_response) => {
|
|
3552
|
+
return this.transformResult(url_, _response, (_response) => this.processAddDesignSurfaceContainerModel(_response));
|
|
3553
|
+
});
|
|
3554
|
+
}
|
|
3555
|
+
processAddDesignSurfaceContainerModel(response) {
|
|
3556
|
+
const status = response.status;
|
|
3557
|
+
let _headers = {};
|
|
3558
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3559
|
+
for (let k in response.headers) {
|
|
3560
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3561
|
+
_headers[k] = response.headers[k];
|
|
3562
|
+
}
|
|
3563
|
+
}
|
|
3564
|
+
}
|
|
3565
|
+
if (status === 200) {
|
|
3566
|
+
const _responseText = response.data;
|
|
3567
|
+
let result200 = null;
|
|
3568
|
+
let resultData200 = _responseText;
|
|
3569
|
+
result200 = JSON.parse(resultData200);
|
|
3570
|
+
return Promise.resolve(result200);
|
|
3571
|
+
}
|
|
3572
|
+
else if (status === 400) {
|
|
3573
|
+
const _responseText = response.data;
|
|
3574
|
+
let result400 = null;
|
|
3575
|
+
let resultData400 = _responseText;
|
|
3576
|
+
result400 = JSON.parse(resultData400);
|
|
3577
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
3578
|
+
}
|
|
3579
|
+
else if (status === 404) {
|
|
3580
|
+
const _responseText = response.data;
|
|
3581
|
+
let result404 = null;
|
|
3582
|
+
let resultData404 = _responseText;
|
|
3583
|
+
result404 = JSON.parse(resultData404);
|
|
3584
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3585
|
+
}
|
|
3586
|
+
else if (status === 401) {
|
|
3587
|
+
const _responseText = response.data;
|
|
3588
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3589
|
+
}
|
|
3590
|
+
else if (status === 403) {
|
|
3591
|
+
const _responseText = response.data;
|
|
3592
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3593
|
+
}
|
|
3594
|
+
else if (status !== 200 && status !== 204) {
|
|
3595
|
+
const _responseText = response.data;
|
|
3596
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3597
|
+
}
|
|
3598
|
+
return Promise.resolve(null);
|
|
3599
|
+
}
|
|
3600
|
+
/**
|
|
3601
|
+
* Returns a list of print-product items descriptions of the specified design file.
|
|
3602
|
+
* @param id Design identifier.
|
|
3603
|
+
* @param surfaceId (optional) Print-product surface identifier.
|
|
3604
|
+
* @param containerId (optional) Print-product container identifier.
|
|
3605
|
+
* @param parentItemId (optional) Print-product item identifier.
|
|
3606
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3607
|
+
* @param tenantId (optional) Tenant identifier
|
|
3608
|
+
* @return Success
|
|
3609
|
+
*/
|
|
3610
|
+
getDesignSurfaceItems(id, surfaceId, containerId, parentItemId, privateStorageOwner, tenantId, cancelToken) {
|
|
3611
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/items?";
|
|
3612
|
+
if (id === undefined || id === null)
|
|
3613
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3614
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3615
|
+
if (surfaceId !== undefined && surfaceId !== null)
|
|
3616
|
+
url_ += "surfaceId=" + encodeURIComponent("" + surfaceId) + "&";
|
|
3617
|
+
if (containerId !== undefined && containerId !== null)
|
|
3618
|
+
url_ += "containerId=" + encodeURIComponent("" + containerId) + "&";
|
|
3619
|
+
if (parentItemId !== undefined && parentItemId !== null)
|
|
3620
|
+
url_ += "parentItemId=" + encodeURIComponent("" + parentItemId) + "&";
|
|
3621
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3622
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3623
|
+
if (tenantId === null)
|
|
3624
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3625
|
+
else if (tenantId !== undefined)
|
|
3626
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3627
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3628
|
+
let options_ = {
|
|
3629
|
+
method: "GET",
|
|
3630
|
+
url: url_,
|
|
3631
|
+
headers: {
|
|
3632
|
+
"Accept": "application/json"
|
|
3633
|
+
},
|
|
3634
|
+
cancelToken
|
|
3635
|
+
};
|
|
3636
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3637
|
+
return this.instance.request(transformedOptions_);
|
|
3638
|
+
}).catch((_error) => {
|
|
3639
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3640
|
+
return _error.response;
|
|
3641
|
+
}
|
|
3642
|
+
else {
|
|
3643
|
+
throw _error;
|
|
3644
|
+
}
|
|
3645
|
+
}).then((_response) => {
|
|
3646
|
+
return this.transformResult(url_, _response, (_response) => this.processGetDesignSurfaceItems(_response));
|
|
3647
|
+
});
|
|
3648
|
+
}
|
|
3649
|
+
processGetDesignSurfaceItems(response) {
|
|
3650
|
+
const status = response.status;
|
|
3651
|
+
let _headers = {};
|
|
3652
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3653
|
+
for (let k in response.headers) {
|
|
3654
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3655
|
+
_headers[k] = response.headers[k];
|
|
3656
|
+
}
|
|
3657
|
+
}
|
|
3658
|
+
}
|
|
3659
|
+
if (status === 200) {
|
|
3660
|
+
const _responseText = response.data;
|
|
3661
|
+
let result200 = null;
|
|
3662
|
+
let resultData200 = _responseText;
|
|
3663
|
+
result200 = JSON.parse(resultData200);
|
|
3664
|
+
return Promise.resolve(result200);
|
|
3665
|
+
}
|
|
3666
|
+
else if (status === 404) {
|
|
3667
|
+
const _responseText = response.data;
|
|
3668
|
+
let result404 = null;
|
|
3669
|
+
let resultData404 = _responseText;
|
|
3670
|
+
result404 = JSON.parse(resultData404);
|
|
3671
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3672
|
+
}
|
|
3673
|
+
else if (status === 401) {
|
|
3674
|
+
const _responseText = response.data;
|
|
3675
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3676
|
+
}
|
|
3677
|
+
else if (status === 403) {
|
|
3678
|
+
const _responseText = response.data;
|
|
3679
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3680
|
+
}
|
|
3681
|
+
else if (status !== 200 && status !== 204) {
|
|
3682
|
+
const _responseText = response.data;
|
|
3683
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3684
|
+
}
|
|
3685
|
+
return Promise.resolve(null);
|
|
3686
|
+
}
|
|
3687
|
+
/**
|
|
3688
|
+
* Deletes a specified print-product item in an existing design file.
|
|
3689
|
+
* @param id Design identifier.
|
|
3690
|
+
* @param itemId Print-product item identifier.
|
|
3691
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3692
|
+
* @param tenantId (optional) Tenant identifier
|
|
3693
|
+
* @return No Content
|
|
3694
|
+
*/
|
|
3695
|
+
deleteDesignSurfaceItem(id, itemId, privateStorageOwner, tenantId, cancelToken) {
|
|
3696
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/items/{itemId}?";
|
|
3697
|
+
if (id === undefined || id === null)
|
|
3698
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3699
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3700
|
+
if (itemId === undefined || itemId === null)
|
|
3701
|
+
throw new Error("The parameter 'itemId' must be defined.");
|
|
3702
|
+
url_ = url_.replace("{itemId}", encodeURIComponent("" + itemId));
|
|
3703
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3704
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3705
|
+
if (tenantId === null)
|
|
3706
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3707
|
+
else if (tenantId !== undefined)
|
|
3708
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3709
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3710
|
+
let options_ = {
|
|
3711
|
+
method: "DELETE",
|
|
3712
|
+
url: url_,
|
|
3713
|
+
headers: {},
|
|
3714
|
+
cancelToken
|
|
3715
|
+
};
|
|
3716
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3717
|
+
return this.instance.request(transformedOptions_);
|
|
3718
|
+
}).catch((_error) => {
|
|
3719
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3720
|
+
return _error.response;
|
|
3721
|
+
}
|
|
3722
|
+
else {
|
|
3723
|
+
throw _error;
|
|
3724
|
+
}
|
|
3725
|
+
}).then((_response) => {
|
|
3726
|
+
return this.transformResult(url_, _response, (_response) => this.processDeleteDesignSurfaceItem(_response));
|
|
3727
|
+
});
|
|
3728
|
+
}
|
|
3729
|
+
processDeleteDesignSurfaceItem(response) {
|
|
3730
|
+
const status = response.status;
|
|
3731
|
+
let _headers = {};
|
|
3732
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3733
|
+
for (let k in response.headers) {
|
|
3734
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3735
|
+
_headers[k] = response.headers[k];
|
|
3736
|
+
}
|
|
3737
|
+
}
|
|
3738
|
+
}
|
|
3739
|
+
if (status === 204) {
|
|
3740
|
+
const _responseText = response.data;
|
|
3741
|
+
return Promise.resolve(null);
|
|
3742
|
+
}
|
|
3743
|
+
else if (status === 404) {
|
|
3744
|
+
const _responseText = response.data;
|
|
3745
|
+
let result404 = null;
|
|
3746
|
+
let resultData404 = _responseText;
|
|
3747
|
+
result404 = JSON.parse(resultData404);
|
|
3748
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3749
|
+
}
|
|
3750
|
+
else if (status === 409) {
|
|
3751
|
+
const _responseText = response.data;
|
|
3752
|
+
let result409 = null;
|
|
3753
|
+
let resultData409 = _responseText;
|
|
3754
|
+
result409 = JSON.parse(resultData409);
|
|
3755
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3756
|
+
}
|
|
3757
|
+
else if (status === 401) {
|
|
3758
|
+
const _responseText = response.data;
|
|
3759
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3760
|
+
}
|
|
3761
|
+
else if (status === 403) {
|
|
3762
|
+
const _responseText = response.data;
|
|
3763
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3764
|
+
}
|
|
3765
|
+
else if (status !== 200 && status !== 204) {
|
|
3766
|
+
const _responseText = response.data;
|
|
3767
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3768
|
+
}
|
|
3769
|
+
return Promise.resolve(null);
|
|
3770
|
+
}
|
|
3771
|
+
/**
|
|
3772
|
+
* Returns a print-product item of the specified design file as a json-serialized model.
|
|
3773
|
+
* @param id Design identifier.
|
|
3774
|
+
* @param itemId Print-product item identifier.
|
|
3775
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3776
|
+
* @param tenantId (optional) Tenant identifier
|
|
3777
|
+
* @return Success
|
|
3778
|
+
*/
|
|
3779
|
+
getDesignSurfaceItemModel(id, itemId, privateStorageOwner, tenantId, cancelToken) {
|
|
3780
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/items/{itemId}/model?";
|
|
3781
|
+
if (id === undefined || id === null)
|
|
3782
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3783
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3784
|
+
if (itemId === undefined || itemId === null)
|
|
3785
|
+
throw new Error("The parameter 'itemId' must be defined.");
|
|
3786
|
+
url_ = url_.replace("{itemId}", encodeURIComponent("" + itemId));
|
|
3787
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3788
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3789
|
+
if (tenantId === null)
|
|
3790
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3791
|
+
else if (tenantId !== undefined)
|
|
3792
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3793
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3794
|
+
let options_ = {
|
|
3795
|
+
method: "GET",
|
|
3796
|
+
url: url_,
|
|
3797
|
+
headers: {
|
|
3798
|
+
"Accept": "application/json"
|
|
3799
|
+
},
|
|
3800
|
+
cancelToken
|
|
3801
|
+
};
|
|
3802
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3803
|
+
return this.instance.request(transformedOptions_);
|
|
3804
|
+
}).catch((_error) => {
|
|
3805
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3806
|
+
return _error.response;
|
|
3807
|
+
}
|
|
3808
|
+
else {
|
|
3809
|
+
throw _error;
|
|
3810
|
+
}
|
|
3811
|
+
}).then((_response) => {
|
|
3812
|
+
return this.transformResult(url_, _response, (_response) => this.processGetDesignSurfaceItemModel(_response));
|
|
3813
|
+
});
|
|
3814
|
+
}
|
|
3815
|
+
processGetDesignSurfaceItemModel(response) {
|
|
3816
|
+
const status = response.status;
|
|
3817
|
+
let _headers = {};
|
|
3818
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3819
|
+
for (let k in response.headers) {
|
|
3820
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3821
|
+
_headers[k] = response.headers[k];
|
|
3822
|
+
}
|
|
3823
|
+
}
|
|
3824
|
+
}
|
|
3825
|
+
if (status === 200) {
|
|
3826
|
+
const _responseText = response.data;
|
|
3827
|
+
let result200 = null;
|
|
3828
|
+
let resultData200 = _responseText;
|
|
3829
|
+
result200 = JSON.parse(resultData200);
|
|
3830
|
+
return Promise.resolve(result200);
|
|
3831
|
+
}
|
|
3832
|
+
else if (status === 404) {
|
|
3833
|
+
const _responseText = response.data;
|
|
3834
|
+
let result404 = null;
|
|
3835
|
+
let resultData404 = _responseText;
|
|
3836
|
+
result404 = JSON.parse(resultData404);
|
|
3837
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3838
|
+
}
|
|
3839
|
+
else if (status === 409) {
|
|
3840
|
+
const _responseText = response.data;
|
|
3841
|
+
let result409 = null;
|
|
3842
|
+
let resultData409 = _responseText;
|
|
3843
|
+
result409 = JSON.parse(resultData409);
|
|
3844
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3845
|
+
}
|
|
3846
|
+
else if (status === 401) {
|
|
3847
|
+
const _responseText = response.data;
|
|
3848
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3849
|
+
}
|
|
3850
|
+
else if (status === 403) {
|
|
3851
|
+
const _responseText = response.data;
|
|
3852
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3853
|
+
}
|
|
3854
|
+
else if (status !== 200 && status !== 204) {
|
|
3855
|
+
const _responseText = response.data;
|
|
3856
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3857
|
+
}
|
|
3858
|
+
return Promise.resolve(null);
|
|
3859
|
+
}
|
|
3860
|
+
/**
|
|
3861
|
+
* Updates a specified print-product surface item in an existing design file with the data provided as a json-serialized item model.
|
|
3862
|
+
* @param id Design identifier.
|
|
3863
|
+
* @param itemId Print-product item identifier.
|
|
3864
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3865
|
+
* @param tenantId (optional) Tenant identifier
|
|
3866
|
+
* @param body (optional) Json-serialized model of a print-product item.
|
|
3867
|
+
* @return Success
|
|
3868
|
+
*/
|
|
3869
|
+
updateDesignSurfaceItemModel(id, itemId, privateStorageOwner, tenantId, body, cancelToken) {
|
|
3870
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/items/{itemId}/model?";
|
|
3871
|
+
if (id === undefined || id === null)
|
|
3872
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3873
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3874
|
+
if (itemId === undefined || itemId === null)
|
|
3875
|
+
throw new Error("The parameter 'itemId' must be defined.");
|
|
3876
|
+
url_ = url_.replace("{itemId}", encodeURIComponent("" + itemId));
|
|
3877
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3878
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3879
|
+
if (tenantId === null)
|
|
3880
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3881
|
+
else if (tenantId !== undefined)
|
|
3882
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3883
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3884
|
+
const content_ = JSON.stringify(body);
|
|
3885
|
+
let options_ = {
|
|
3886
|
+
data: content_,
|
|
3887
|
+
method: "PUT",
|
|
3888
|
+
url: url_,
|
|
3889
|
+
headers: {
|
|
3890
|
+
"Content-Type": "application/json",
|
|
3891
|
+
"Accept": "application/json"
|
|
3892
|
+
},
|
|
3893
|
+
cancelToken
|
|
3894
|
+
};
|
|
3895
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3896
|
+
return this.instance.request(transformedOptions_);
|
|
3897
|
+
}).catch((_error) => {
|
|
3898
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3899
|
+
return _error.response;
|
|
3900
|
+
}
|
|
3901
|
+
else {
|
|
3902
|
+
throw _error;
|
|
3903
|
+
}
|
|
3904
|
+
}).then((_response) => {
|
|
3905
|
+
return this.transformResult(url_, _response, (_response) => this.processUpdateDesignSurfaceItemModel(_response));
|
|
3906
|
+
});
|
|
3907
|
+
}
|
|
3908
|
+
processUpdateDesignSurfaceItemModel(response) {
|
|
3909
|
+
const status = response.status;
|
|
3910
|
+
let _headers = {};
|
|
3911
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3912
|
+
for (let k in response.headers) {
|
|
3913
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3914
|
+
_headers[k] = response.headers[k];
|
|
3915
|
+
}
|
|
3916
|
+
}
|
|
3917
|
+
}
|
|
3918
|
+
if (status === 200) {
|
|
3919
|
+
const _responseText = response.data;
|
|
3920
|
+
let result200 = null;
|
|
3921
|
+
let resultData200 = _responseText;
|
|
3922
|
+
result200 = JSON.parse(resultData200);
|
|
3923
|
+
return Promise.resolve(result200);
|
|
3924
|
+
}
|
|
3925
|
+
else if (status === 400) {
|
|
3926
|
+
const _responseText = response.data;
|
|
3927
|
+
let result400 = null;
|
|
3928
|
+
let resultData400 = _responseText;
|
|
3929
|
+
result400 = JSON.parse(resultData400);
|
|
3930
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
3931
|
+
}
|
|
3932
|
+
else if (status === 404) {
|
|
3933
|
+
const _responseText = response.data;
|
|
3934
|
+
let result404 = null;
|
|
3935
|
+
let resultData404 = _responseText;
|
|
3936
|
+
result404 = JSON.parse(resultData404);
|
|
3937
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3938
|
+
}
|
|
3939
|
+
else if (status === 409) {
|
|
3940
|
+
const _responseText = response.data;
|
|
3941
|
+
let result409 = null;
|
|
3942
|
+
let resultData409 = _responseText;
|
|
3943
|
+
result409 = JSON.parse(resultData409);
|
|
3944
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3945
|
+
}
|
|
3946
|
+
else if (status === 401) {
|
|
3947
|
+
const _responseText = response.data;
|
|
3948
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3949
|
+
}
|
|
3950
|
+
else if (status === 403) {
|
|
3951
|
+
const _responseText = response.data;
|
|
3952
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3953
|
+
}
|
|
3954
|
+
else if (status !== 200 && status !== 204) {
|
|
3955
|
+
const _responseText = response.data;
|
|
3956
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3957
|
+
}
|
|
3958
|
+
return Promise.resolve(null);
|
|
3959
|
+
}
|
|
3960
|
+
/**
|
|
3961
|
+
* Inserts a new print-product item provided as a json-serialized model to the specified surface in an existing design file.
|
|
3962
|
+
Item identifier will be reset by auto-generated value to prevent identifiers collisions.
|
|
3963
|
+
* @param id Design identifier.
|
|
3964
|
+
* @param containerId (optional) Parent surface identifier.
|
|
3965
|
+
* @param index (optional) Item index within the items list of a container.
|
|
3966
|
+
* @param top (optional) Y axis position.
|
|
3967
|
+
* @param left (optional) X axis position.
|
|
3968
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3969
|
+
* @param tenantId (optional) Tenant identifier
|
|
3970
|
+
* @param body (optional) Json-serialized model of a new print-product item.
|
|
3971
|
+
* @return Success
|
|
3972
|
+
*/
|
|
3973
|
+
addDesignSurfaceItemModel(id, containerId, index, top, left, privateStorageOwner, tenantId, body, cancelToken) {
|
|
3974
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/items/model?";
|
|
3975
|
+
if (id === undefined || id === null)
|
|
3976
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3977
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3978
|
+
if (containerId !== undefined && containerId !== null)
|
|
3979
|
+
url_ += "containerId=" + encodeURIComponent("" + containerId) + "&";
|
|
3980
|
+
if (index !== undefined && index !== null)
|
|
3981
|
+
url_ += "index=" + encodeURIComponent("" + index) + "&";
|
|
3982
|
+
if (top === null)
|
|
3983
|
+
throw new Error("The parameter 'top' cannot be null.");
|
|
3984
|
+
else if (top !== undefined)
|
|
3985
|
+
url_ += "top=" + encodeURIComponent("" + top) + "&";
|
|
3986
|
+
if (left === null)
|
|
3987
|
+
throw new Error("The parameter 'left' cannot be null.");
|
|
3988
|
+
else if (left !== undefined)
|
|
3989
|
+
url_ += "left=" + encodeURIComponent("" + left) + "&";
|
|
3990
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3991
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3992
|
+
if (tenantId === null)
|
|
3993
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3994
|
+
else if (tenantId !== undefined)
|
|
3995
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3996
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3997
|
+
const content_ = JSON.stringify(body);
|
|
3998
|
+
let options_ = {
|
|
3999
|
+
data: content_,
|
|
4000
|
+
method: "POST",
|
|
4001
|
+
url: url_,
|
|
4002
|
+
headers: {
|
|
4003
|
+
"Content-Type": "application/json",
|
|
4004
|
+
"Accept": "application/json"
|
|
4005
|
+
},
|
|
4006
|
+
cancelToken
|
|
4007
|
+
};
|
|
4008
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4009
|
+
return this.instance.request(transformedOptions_);
|
|
4010
|
+
}).catch((_error) => {
|
|
4011
|
+
if (isAxiosError(_error) && _error.response) {
|
|
4012
|
+
return _error.response;
|
|
4013
|
+
}
|
|
4014
|
+
else {
|
|
4015
|
+
throw _error;
|
|
4016
|
+
}
|
|
4017
|
+
}).then((_response) => {
|
|
4018
|
+
return this.transformResult(url_, _response, (_response) => this.processAddDesignSurfaceItemModel(_response));
|
|
4019
|
+
});
|
|
4020
|
+
}
|
|
4021
|
+
processAddDesignSurfaceItemModel(response) {
|
|
4022
|
+
const status = response.status;
|
|
4023
|
+
let _headers = {};
|
|
4024
|
+
if (response.headers && typeof response.headers === "object") {
|
|
4025
|
+
for (let k in response.headers) {
|
|
4026
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
4027
|
+
_headers[k] = response.headers[k];
|
|
4028
|
+
}
|
|
4029
|
+
}
|
|
4030
|
+
}
|
|
4031
|
+
if (status === 200) {
|
|
4032
|
+
const _responseText = response.data;
|
|
4033
|
+
let result200 = null;
|
|
4034
|
+
let resultData200 = _responseText;
|
|
4035
|
+
result200 = JSON.parse(resultData200);
|
|
4036
|
+
return Promise.resolve(result200);
|
|
4037
|
+
}
|
|
4038
|
+
else if (status === 400) {
|
|
4039
|
+
const _responseText = response.data;
|
|
4040
|
+
let result400 = null;
|
|
4041
|
+
let resultData400 = _responseText;
|
|
4042
|
+
result400 = JSON.parse(resultData400);
|
|
4043
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
4044
|
+
}
|
|
4045
|
+
else if (status === 404) {
|
|
4046
|
+
const _responseText = response.data;
|
|
4047
|
+
let result404 = null;
|
|
4048
|
+
let resultData404 = _responseText;
|
|
4049
|
+
result404 = JSON.parse(resultData404);
|
|
4050
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
4051
|
+
}
|
|
4052
|
+
else if (status === 401) {
|
|
4053
|
+
const _responseText = response.data;
|
|
4054
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
4055
|
+
}
|
|
4056
|
+
else if (status === 403) {
|
|
4057
|
+
const _responseText = response.data;
|
|
4058
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
4059
|
+
}
|
|
4060
|
+
else if (status !== 200 && status !== 204) {
|
|
4061
|
+
const _responseText = response.data;
|
|
4062
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4063
|
+
}
|
|
4064
|
+
return Promise.resolve(null);
|
|
4065
|
+
}
|
|
4066
|
+
/**
|
|
4067
|
+
* Returns a print-product of the specified design file as a json-serialized model.
|
|
4068
|
+
* @param id Design identifier.
|
|
4069
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
4070
|
+
* @param tenantId (optional) Tenant identifier
|
|
4071
|
+
* @return Success
|
|
4072
|
+
*/
|
|
4073
|
+
getDesignProductModel(id, privateStorageOwner, tenantId, cancelToken) {
|
|
4074
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/model?";
|
|
4075
|
+
if (id === undefined || id === null)
|
|
4076
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
4077
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4078
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4079
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
4080
|
+
if (tenantId === null)
|
|
4081
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4082
|
+
else if (tenantId !== undefined)
|
|
4083
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
4084
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4085
|
+
let options_ = {
|
|
4086
|
+
method: "GET",
|
|
4087
|
+
url: url_,
|
|
4088
|
+
headers: {
|
|
4089
|
+
"Accept": "application/json"
|
|
4090
|
+
},
|
|
4091
|
+
cancelToken
|
|
4092
|
+
};
|
|
4093
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4094
|
+
return this.instance.request(transformedOptions_);
|
|
4095
|
+
}).catch((_error) => {
|
|
4096
|
+
if (isAxiosError(_error) && _error.response) {
|
|
4097
|
+
return _error.response;
|
|
4098
|
+
}
|
|
4099
|
+
else {
|
|
4100
|
+
throw _error;
|
|
4101
|
+
}
|
|
4102
|
+
}).then((_response) => {
|
|
4103
|
+
return this.transformResult(url_, _response, (_response) => this.processGetDesignProductModel(_response));
|
|
4104
|
+
});
|
|
4105
|
+
}
|
|
4106
|
+
processGetDesignProductModel(response) {
|
|
4107
|
+
const status = response.status;
|
|
4108
|
+
let _headers = {};
|
|
4109
|
+
if (response.headers && typeof response.headers === "object") {
|
|
4110
|
+
for (let k in response.headers) {
|
|
4111
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
4112
|
+
_headers[k] = response.headers[k];
|
|
4113
|
+
}
|
|
4114
|
+
}
|
|
4115
|
+
}
|
|
4116
|
+
if (status === 200) {
|
|
4117
|
+
const _responseText = response.data;
|
|
4118
|
+
let result200 = null;
|
|
4119
|
+
let resultData200 = _responseText;
|
|
4120
|
+
result200 = JSON.parse(resultData200);
|
|
4121
|
+
return Promise.resolve(result200);
|
|
2759
4122
|
}
|
|
2760
4123
|
else if (status === 404) {
|
|
2761
4124
|
const _responseText = response.data;
|
|
@@ -2764,13 +4127,6 @@ export class DesignAtomsMockups3dApiClient extends ApiClientBase {
|
|
|
2764
4127
|
result404 = JSON.parse(resultData404);
|
|
2765
4128
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2766
4129
|
}
|
|
2767
|
-
else if (status === 409) {
|
|
2768
|
-
const _responseText = response.data;
|
|
2769
|
-
let result409 = null;
|
|
2770
|
-
let resultData409 = _responseText;
|
|
2771
|
-
result409 = JSON.parse(resultData409);
|
|
2772
|
-
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2773
|
-
}
|
|
2774
4130
|
else if (status === 401) {
|
|
2775
4131
|
const _responseText = response.data;
|
|
2776
4132
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -2785,31 +4141,16 @@ export class DesignAtomsMockups3dApiClient extends ApiClientBase {
|
|
|
2785
4141
|
}
|
|
2786
4142
|
return Promise.resolve(null);
|
|
2787
4143
|
}
|
|
2788
|
-
}
|
|
2789
|
-
export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
2790
|
-
instance;
|
|
2791
|
-
baseUrl;
|
|
2792
|
-
jsonParseReviver = undefined;
|
|
2793
|
-
constructor(configuration, baseUrl, instance) {
|
|
2794
|
-
super(configuration);
|
|
2795
|
-
this.instance = instance ? instance : axios.create();
|
|
2796
|
-
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
2797
|
-
}
|
|
2798
4144
|
/**
|
|
2799
|
-
*
|
|
4145
|
+
* Updates a print-product provided as a json-serialized model is the specified design file.
|
|
2800
4146
|
* @param id Design identifier.
|
|
2801
4147
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
2802
4148
|
* @param tenantId (optional) Tenant identifier
|
|
2803
|
-
* @param
|
|
2804
|
-
* @param replaceImageItemFileInfo_itemName (optional)
|
|
2805
|
-
* @param replaceImageItemFileInfo_sourceFile (optional)
|
|
2806
|
-
* @param replacePlaceholderItemContentInfo_placeholderItemName (optional)
|
|
2807
|
-
* @param replacePlaceholderItemContentInfo_newContentType (optional)
|
|
2808
|
-
* @param replacePlaceholderItemContentInfo_sourceFile (optional)
|
|
4149
|
+
* @param body (optional) Json-serialized model of a print-product .
|
|
2809
4150
|
* @return No Content
|
|
2810
4151
|
*/
|
|
2811
|
-
|
|
2812
|
-
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product?";
|
|
4152
|
+
updateDesignProductModel(id, privateStorageOwner, tenantId, body, cancelToken) {
|
|
4153
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/model?";
|
|
2813
4154
|
if (id === undefined || id === null)
|
|
2814
4155
|
throw new Error("The parameter 'id' must be defined.");
|
|
2815
4156
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
@@ -2820,28 +4161,14 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
2820
4161
|
else if (tenantId !== undefined)
|
|
2821
4162
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2822
4163
|
url_ = url_.replace(/[?&]$/, "");
|
|
2823
|
-
const content_ =
|
|
2824
|
-
if (patchType === null || patchType === undefined)
|
|
2825
|
-
throw new Error("The parameter 'patchType' cannot be null.");
|
|
2826
|
-
else
|
|
2827
|
-
content_.append("patchType", patchType.toString());
|
|
2828
|
-
if (replaceImageItemFileInfo_itemName !== null && replaceImageItemFileInfo_itemName !== undefined)
|
|
2829
|
-
content_.append("replaceImageItemFileInfo.itemName", replaceImageItemFileInfo_itemName.toString());
|
|
2830
|
-
if (replaceImageItemFileInfo_sourceFile !== null && replaceImageItemFileInfo_sourceFile !== undefined)
|
|
2831
|
-
content_.append("replaceImageItemFileInfo.sourceFile", replaceImageItemFileInfo_sourceFile.data, replaceImageItemFileInfo_sourceFile.fileName ? replaceImageItemFileInfo_sourceFile.fileName : "replaceImageItemFileInfo.sourceFile");
|
|
2832
|
-
if (replacePlaceholderItemContentInfo_placeholderItemName !== null && replacePlaceholderItemContentInfo_placeholderItemName !== undefined)
|
|
2833
|
-
content_.append("replacePlaceholderItemContentInfo.placeholderItemName", replacePlaceholderItemContentInfo_placeholderItemName.toString());
|
|
2834
|
-
if (replacePlaceholderItemContentInfo_newContentType === null || replacePlaceholderItemContentInfo_newContentType === undefined)
|
|
2835
|
-
throw new Error("The parameter 'replacePlaceholderItemContentInfo_newContentType' cannot be null.");
|
|
2836
|
-
else
|
|
2837
|
-
content_.append("replacePlaceholderItemContentInfo.newContentType", replacePlaceholderItemContentInfo_newContentType.toString());
|
|
2838
|
-
if (replacePlaceholderItemContentInfo_sourceFile !== null && replacePlaceholderItemContentInfo_sourceFile !== undefined)
|
|
2839
|
-
content_.append("replacePlaceholderItemContentInfo.sourceFile", replacePlaceholderItemContentInfo_sourceFile.data, replacePlaceholderItemContentInfo_sourceFile.fileName ? replacePlaceholderItemContentInfo_sourceFile.fileName : "replacePlaceholderItemContentInfo.sourceFile");
|
|
4164
|
+
const content_ = JSON.stringify(body);
|
|
2840
4165
|
let options_ = {
|
|
2841
4166
|
data: content_,
|
|
2842
|
-
method: "
|
|
4167
|
+
method: "PUT",
|
|
2843
4168
|
url: url_,
|
|
2844
|
-
headers: {
|
|
4169
|
+
headers: {
|
|
4170
|
+
"Content-Type": "application/json",
|
|
4171
|
+
},
|
|
2845
4172
|
cancelToken
|
|
2846
4173
|
};
|
|
2847
4174
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
@@ -2854,10 +4181,10 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
2854
4181
|
throw _error;
|
|
2855
4182
|
}
|
|
2856
4183
|
}).then((_response) => {
|
|
2857
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
4184
|
+
return this.transformResult(url_, _response, (_response) => this.processUpdateDesignProductModel(_response));
|
|
2858
4185
|
});
|
|
2859
4186
|
}
|
|
2860
|
-
|
|
4187
|
+
processUpdateDesignProductModel(response) {
|
|
2861
4188
|
const status = response.status;
|
|
2862
4189
|
let _headers = {};
|
|
2863
4190
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -2893,17 +4220,20 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
2893
4220
|
return Promise.resolve(null);
|
|
2894
4221
|
}
|
|
2895
4222
|
/**
|
|
2896
|
-
* Returns a print-
|
|
4223
|
+
* Returns a list of print-area descriptions of the specified design file.
|
|
2897
4224
|
* @param id Design identifier.
|
|
4225
|
+
* @param surfaceId (optional)
|
|
2898
4226
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
2899
4227
|
* @param tenantId (optional) Tenant identifier
|
|
2900
4228
|
* @return Success
|
|
2901
4229
|
*/
|
|
2902
|
-
|
|
2903
|
-
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/
|
|
4230
|
+
getDesignPrintAreas(id, surfaceId, privateStorageOwner, tenantId, cancelToken) {
|
|
4231
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/print-areas?";
|
|
2904
4232
|
if (id === undefined || id === null)
|
|
2905
4233
|
throw new Error("The parameter 'id' must be defined.");
|
|
2906
4234
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4235
|
+
if (surfaceId !== undefined && surfaceId !== null)
|
|
4236
|
+
url_ += "surfaceId=" + encodeURIComponent("" + surfaceId) + "&";
|
|
2907
4237
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
2908
4238
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
2909
4239
|
if (tenantId === null)
|
|
@@ -2929,10 +4259,10 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
2929
4259
|
throw _error;
|
|
2930
4260
|
}
|
|
2931
4261
|
}).then((_response) => {
|
|
2932
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
4262
|
+
return this.transformResult(url_, _response, (_response) => this.processGetDesignPrintAreas(_response));
|
|
2933
4263
|
});
|
|
2934
4264
|
}
|
|
2935
|
-
|
|
4265
|
+
processGetDesignPrintAreas(response) {
|
|
2936
4266
|
const status = response.status;
|
|
2937
4267
|
let _headers = {};
|
|
2938
4268
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -2971,15 +4301,16 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
2971
4301
|
return Promise.resolve(null);
|
|
2972
4302
|
}
|
|
2973
4303
|
/**
|
|
2974
|
-
*
|
|
4304
|
+
* Inserts a new print-area created by the description at the specified position in an existing design file.
|
|
4305
|
+
Print-area identifier will be reset by auto-generated value to prevent identifiers collisions.
|
|
2975
4306
|
* @param id Design identifier.
|
|
2976
4307
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
2977
4308
|
* @param tenantId (optional) Tenant identifier
|
|
2978
|
-
* @param body (optional)
|
|
2979
|
-
* @return
|
|
4309
|
+
* @param body (optional) Print-area description model.
|
|
4310
|
+
* @return Success
|
|
2980
4311
|
*/
|
|
2981
|
-
|
|
2982
|
-
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/
|
|
4312
|
+
addDesignPrintArea(id, privateStorageOwner, tenantId, body, cancelToken) {
|
|
4313
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/print-areas?";
|
|
2983
4314
|
if (id === undefined || id === null)
|
|
2984
4315
|
throw new Error("The parameter 'id' must be defined.");
|
|
2985
4316
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
@@ -2993,10 +4324,11 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
2993
4324
|
const content_ = JSON.stringify(body);
|
|
2994
4325
|
let options_ = {
|
|
2995
4326
|
data: content_,
|
|
2996
|
-
method: "
|
|
4327
|
+
method: "POST",
|
|
2997
4328
|
url: url_,
|
|
2998
4329
|
headers: {
|
|
2999
4330
|
"Content-Type": "application/json",
|
|
4331
|
+
"Accept": "application/json"
|
|
3000
4332
|
},
|
|
3001
4333
|
cancelToken
|
|
3002
4334
|
};
|
|
@@ -3010,10 +4342,10 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3010
4342
|
throw _error;
|
|
3011
4343
|
}
|
|
3012
4344
|
}).then((_response) => {
|
|
3013
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
4345
|
+
return this.transformResult(url_, _response, (_response) => this.processAddDesignPrintArea(_response));
|
|
3014
4346
|
});
|
|
3015
4347
|
}
|
|
3016
|
-
|
|
4348
|
+
processAddDesignPrintArea(response) {
|
|
3017
4349
|
const status = response.status;
|
|
3018
4350
|
let _headers = {};
|
|
3019
4351
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -3023,9 +4355,19 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3023
4355
|
}
|
|
3024
4356
|
}
|
|
3025
4357
|
}
|
|
3026
|
-
if (status ===
|
|
4358
|
+
if (status === 200) {
|
|
3027
4359
|
const _responseText = response.data;
|
|
3028
|
-
|
|
4360
|
+
let result200 = null;
|
|
4361
|
+
let resultData200 = _responseText;
|
|
4362
|
+
result200 = JSON.parse(resultData200);
|
|
4363
|
+
return Promise.resolve(result200);
|
|
4364
|
+
}
|
|
4365
|
+
else if (status === 400) {
|
|
4366
|
+
const _responseText = response.data;
|
|
4367
|
+
let result400 = null;
|
|
4368
|
+
let resultData400 = _responseText;
|
|
4369
|
+
result400 = JSON.parse(resultData400);
|
|
4370
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
3029
4371
|
}
|
|
3030
4372
|
else if (status === 404) {
|
|
3031
4373
|
const _responseText = response.data;
|
|
@@ -3049,20 +4391,22 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3049
4391
|
return Promise.resolve(null);
|
|
3050
4392
|
}
|
|
3051
4393
|
/**
|
|
3052
|
-
*
|
|
4394
|
+
* Updates a specified print-area using a description in an existing design file.
|
|
3053
4395
|
* @param id Design identifier.
|
|
3054
|
-
* @param
|
|
4396
|
+
* @param printAreaId Design print-area identifier.
|
|
3055
4397
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3056
4398
|
* @param tenantId (optional) Tenant identifier
|
|
4399
|
+
* @param body (optional) Print-area description model.
|
|
3057
4400
|
* @return Success
|
|
3058
4401
|
*/
|
|
3059
|
-
|
|
3060
|
-
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/print-areas?";
|
|
4402
|
+
updateDesignPrintArea(id, printAreaId, privateStorageOwner, tenantId, body, cancelToken) {
|
|
4403
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/print-areas/{printAreaId}?";
|
|
3061
4404
|
if (id === undefined || id === null)
|
|
3062
4405
|
throw new Error("The parameter 'id' must be defined.");
|
|
3063
4406
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3064
|
-
if (
|
|
3065
|
-
|
|
4407
|
+
if (printAreaId === undefined || printAreaId === null)
|
|
4408
|
+
throw new Error("The parameter 'printAreaId' must be defined.");
|
|
4409
|
+
url_ = url_.replace("{printAreaId}", encodeURIComponent("" + printAreaId));
|
|
3066
4410
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3067
4411
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3068
4412
|
if (tenantId === null)
|
|
@@ -3070,10 +4414,13 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3070
4414
|
else if (tenantId !== undefined)
|
|
3071
4415
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3072
4416
|
url_ = url_.replace(/[?&]$/, "");
|
|
4417
|
+
const content_ = JSON.stringify(body);
|
|
3073
4418
|
let options_ = {
|
|
3074
|
-
|
|
4419
|
+
data: content_,
|
|
4420
|
+
method: "PUT",
|
|
3075
4421
|
url: url_,
|
|
3076
4422
|
headers: {
|
|
4423
|
+
"Content-Type": "application/json",
|
|
3077
4424
|
"Accept": "application/json"
|
|
3078
4425
|
},
|
|
3079
4426
|
cancelToken
|
|
@@ -3088,10 +4435,10 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3088
4435
|
throw _error;
|
|
3089
4436
|
}
|
|
3090
4437
|
}).then((_response) => {
|
|
3091
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
4438
|
+
return this.transformResult(url_, _response, (_response) => this.processUpdateDesignPrintArea(_response));
|
|
3092
4439
|
});
|
|
3093
4440
|
}
|
|
3094
|
-
|
|
4441
|
+
processUpdateDesignPrintArea(response) {
|
|
3095
4442
|
const status = response.status;
|
|
3096
4443
|
let _headers = {};
|
|
3097
4444
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -3108,6 +4455,13 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3108
4455
|
result200 = JSON.parse(resultData200);
|
|
3109
4456
|
return Promise.resolve(result200);
|
|
3110
4457
|
}
|
|
4458
|
+
else if (status === 400) {
|
|
4459
|
+
const _responseText = response.data;
|
|
4460
|
+
let result400 = null;
|
|
4461
|
+
let resultData400 = _responseText;
|
|
4462
|
+
result400 = JSON.parse(resultData400);
|
|
4463
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
4464
|
+
}
|
|
3111
4465
|
else if (status === 404) {
|
|
3112
4466
|
const _responseText = response.data;
|
|
3113
4467
|
let result404 = null;
|
|
@@ -3115,6 +4469,13 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3115
4469
|
result404 = JSON.parse(resultData404);
|
|
3116
4470
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3117
4471
|
}
|
|
4472
|
+
else if (status === 409) {
|
|
4473
|
+
const _responseText = response.data;
|
|
4474
|
+
let result409 = null;
|
|
4475
|
+
let resultData409 = _responseText;
|
|
4476
|
+
result409 = JSON.parse(resultData409);
|
|
4477
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
4478
|
+
}
|
|
3118
4479
|
else if (status === 401) {
|
|
3119
4480
|
const _responseText = response.data;
|
|
3120
4481
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -3308,7 +4669,7 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3308
4669
|
* @param printAreaId Design print-area identifier.
|
|
3309
4670
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3310
4671
|
* @param tenantId (optional) Tenant identifier
|
|
3311
|
-
* @param body (optional)
|
|
4672
|
+
* @param body (optional) Json-serialized model of a print-area.
|
|
3312
4673
|
* @return Success
|
|
3313
4674
|
*/
|
|
3314
4675
|
updateDesignPrintAreaModel(id, printAreaId, privateStorageOwner, tenantId, body, cancelToken) {
|
|
@@ -3409,7 +4770,7 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3409
4770
|
* @param surfaceId (optional) Parent surface identifier.
|
|
3410
4771
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3411
4772
|
* @param tenantId (optional) Tenant identifier
|
|
3412
|
-
* @param body (optional)
|
|
4773
|
+
* @param body (optional) Json serialized model of a print-area.
|
|
3413
4774
|
* @return Success
|
|
3414
4775
|
*/
|
|
3415
4776
|
addDesignPrintAreaModel(id, surfaceId, privateStorageOwner, tenantId, body, cancelToken) {
|
|
@@ -3576,7 +4937,7 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3576
4937
|
/**
|
|
3577
4938
|
* Deletes a specified print-product surface in an existing design file.
|
|
3578
4939
|
* @param id Design identifier.
|
|
3579
|
-
* @param surfaceId
|
|
4940
|
+
* @param surfaceId Print-product surface identifier.
|
|
3580
4941
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3581
4942
|
* @param tenantId (optional) Tenant identifier
|
|
3582
4943
|
* @return No Content
|
|
@@ -3658,9 +5019,9 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3658
5019
|
return Promise.resolve(null);
|
|
3659
5020
|
}
|
|
3660
5021
|
/**
|
|
3661
|
-
* Returns a down-mockup description of the specified surface in an existing design file.
|
|
5022
|
+
* Returns a down-mockup description of the specified print-product surface in an existing design file.
|
|
3662
5023
|
* @param id Design identifier.
|
|
3663
|
-
* @param surfaceId
|
|
5024
|
+
* @param surfaceId Print product surface identifier.
|
|
3664
5025
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3665
5026
|
* @param tenantId (optional) Tenant identifier
|
|
3666
5027
|
* @return Success
|
|
@@ -3754,9 +5115,9 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3754
5115
|
return Promise.resolve(null);
|
|
3755
5116
|
}
|
|
3756
5117
|
/**
|
|
3757
|
-
* Updates a content file of down-mockup for the specified surface in an existing design file.
|
|
5118
|
+
* Updates a content file of down-mockup for the specified print-product surface in an existing design file.
|
|
3758
5119
|
* @param id Design identifier.
|
|
3759
|
-
* @param surfaceId
|
|
5120
|
+
* @param surfaceId Print-product surface identifier.
|
|
3760
5121
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3761
5122
|
* @param tenantId (optional) Tenant identifier
|
|
3762
5123
|
* @param position_top (optional)
|
|
@@ -3865,9 +5226,9 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3865
5226
|
return Promise.resolve(null);
|
|
3866
5227
|
}
|
|
3867
5228
|
/**
|
|
3868
|
-
* Returns a content file for down-mockup of the specified surface in an existing design file.
|
|
5229
|
+
* Returns a content file for down-mockup of the specified print-product surface in an existing design file.
|
|
3869
5230
|
* @param id Design identifier.
|
|
3870
|
-
* @param surfaceId
|
|
5231
|
+
* @param surfaceId Print-product surface identifier.
|
|
3871
5232
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3872
5233
|
* @param tenantId (optional) Tenant identifier
|
|
3873
5234
|
* @return Success
|
|
@@ -3892,7 +5253,7 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3892
5253
|
method: "GET",
|
|
3893
5254
|
url: url_,
|
|
3894
5255
|
headers: {
|
|
3895
|
-
"Accept": "application/
|
|
5256
|
+
"Accept": "application/octet-stream"
|
|
3896
5257
|
},
|
|
3897
5258
|
cancelToken
|
|
3898
5259
|
};
|
|
@@ -3961,9 +5322,9 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3961
5322
|
return Promise.resolve(null);
|
|
3962
5323
|
}
|
|
3963
5324
|
/**
|
|
3964
|
-
* Returns an up-mockup description of the specified surface in an existing design file.
|
|
5325
|
+
* Returns an up-mockup description of the specified print-product surface in an existing design file.
|
|
3965
5326
|
* @param id Design identifier.
|
|
3966
|
-
* @param surfaceId
|
|
5327
|
+
* @param surfaceId Print-product surface identifier.
|
|
3967
5328
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3968
5329
|
* @param tenantId (optional) Tenant identifier
|
|
3969
5330
|
* @return Success
|
|
@@ -4057,9 +5418,9 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
4057
5418
|
return Promise.resolve(null);
|
|
4058
5419
|
}
|
|
4059
5420
|
/**
|
|
4060
|
-
* Updates a content file of up-mockup for the specified surface in an existing design.
|
|
5421
|
+
* Updates a content file of up-mockup for the specified print-product surface in an existing design.
|
|
4061
5422
|
* @param id Design identifier.
|
|
4062
|
-
* @param surfaceId
|
|
5423
|
+
* @param surfaceId Print-product surface identifier.
|
|
4063
5424
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
4064
5425
|
* @param tenantId (optional) Tenant identifier
|
|
4065
5426
|
* @param position_top (optional)
|
|
@@ -4168,9 +5529,9 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
4168
5529
|
return Promise.resolve(null);
|
|
4169
5530
|
}
|
|
4170
5531
|
/**
|
|
4171
|
-
* Returns a content file for up-mockup of the specified surface in an existing design file.
|
|
5532
|
+
* Returns a content file for up-mockup of the specified print-product surface in an existing design file.
|
|
4172
5533
|
* @param id Design identifier.
|
|
4173
|
-
* @param surfaceId
|
|
5534
|
+
* @param surfaceId Print-product surface identifier.
|
|
4174
5535
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
4175
5536
|
* @param tenantId (optional) Tenant identifier
|
|
4176
5537
|
* @return Success
|
|
@@ -4195,7 +5556,7 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
4195
5556
|
method: "GET",
|
|
4196
5557
|
url: url_,
|
|
4197
5558
|
headers: {
|
|
4198
|
-
"Accept": "application/
|
|
5559
|
+
"Accept": "application/octet-stream"
|
|
4199
5560
|
},
|
|
4200
5561
|
cancelToken
|
|
4201
5562
|
};
|
|
@@ -4228,10 +5589,6 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
4228
5589
|
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
4229
5590
|
return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
|
|
4230
5591
|
}
|
|
4231
|
-
else if (status === 204) {
|
|
4232
|
-
const _responseText = response.data;
|
|
4233
|
-
return throwException("No Content", status, _responseText, _headers);
|
|
4234
|
-
}
|
|
4235
5592
|
else if (status === 400) {
|
|
4236
5593
|
const _responseText = response.data;
|
|
4237
5594
|
let result400 = null;
|
|
@@ -4358,12 +5715,12 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
4358
5715
|
}
|
|
4359
5716
|
/**
|
|
4360
5717
|
* Replaces a specified print-product surface in an existing design file with the data provided as a json-serialized surface model.
|
|
4361
|
-
All identifiers
|
|
5718
|
+
All design elements identifiers within the surface (including surface identifier) will be reset by auto-generated values to prevent identifiers collisions.
|
|
4362
5719
|
* @param id Design identifier.
|
|
4363
|
-
* @param surfaceId
|
|
5720
|
+
* @param surfaceId Print-product surface identifier.
|
|
4364
5721
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
4365
5722
|
* @param tenantId (optional) Tenant identifier
|
|
4366
|
-
* @param body (optional)
|
|
5723
|
+
* @param body (optional) Json-serialized model of a print-product surface.
|
|
4367
5724
|
* @return Success
|
|
4368
5725
|
*/
|
|
4369
5726
|
replaceDesignSurfaceModel(id, surfaceId, privateStorageOwner, tenantId, body, cancelToken) {
|
|
@@ -4459,23 +5816,21 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
4459
5816
|
}
|
|
4460
5817
|
/**
|
|
4461
5818
|
* Inserts a new surface provided as a json-serialized model at the specified position in an existing design file.
|
|
4462
|
-
All identifiers
|
|
5819
|
+
All design elements identifiers within the surface (including surface identifier) will be reset by auto-generated values to prevent identifiers collisions.
|
|
4463
5820
|
* @param id Design identifier.
|
|
4464
|
-
* @param
|
|
5821
|
+
* @param index (optional) Surface index within the surfaces list of a design.
|
|
4465
5822
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
4466
5823
|
* @param tenantId (optional) Tenant identifier
|
|
4467
|
-
* @param body (optional)
|
|
5824
|
+
* @param body (optional) Json-serialized model of a print-prouduct surface.
|
|
4468
5825
|
* @return Success
|
|
4469
5826
|
*/
|
|
4470
|
-
addDesignSurfaceModel(id,
|
|
5827
|
+
addDesignSurfaceModel(id, index, privateStorageOwner, tenantId, body, cancelToken) {
|
|
4471
5828
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/surfaces/model?";
|
|
4472
5829
|
if (id === undefined || id === null)
|
|
4473
5830
|
throw new Error("The parameter 'id' must be defined.");
|
|
4474
5831
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4475
|
-
if (
|
|
4476
|
-
|
|
4477
|
-
else if (surfaceIndex !== undefined)
|
|
4478
|
-
url_ += "surfaceIndex=" + encodeURIComponent("" + surfaceIndex) + "&";
|
|
5832
|
+
if (index !== undefined && index !== null)
|
|
5833
|
+
url_ += "index=" + encodeURIComponent("" + index) + "&";
|
|
4479
5834
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4480
5835
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
4481
5836
|
if (tenantId === null)
|
|
@@ -4562,6 +5917,74 @@ export class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
4562
5917
|
this.instance = instance ? instance : axios.create();
|
|
4563
5918
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
4564
5919
|
}
|
|
5920
|
+
/**
|
|
5921
|
+
* Apply effects to print-product item image.
|
|
5922
|
+
* @param tenantId (optional) Tenant identifier
|
|
5923
|
+
* @param body (optional)
|
|
5924
|
+
* @return Success
|
|
5925
|
+
*/
|
|
5926
|
+
applyItemEffects(tenantId, body, cancelToken) {
|
|
5927
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/print-product/items/apply-effects?";
|
|
5928
|
+
if (tenantId === null)
|
|
5929
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
5930
|
+
else if (tenantId !== undefined)
|
|
5931
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
5932
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
5933
|
+
const content_ = JSON.stringify(body);
|
|
5934
|
+
let options_ = {
|
|
5935
|
+
data: content_,
|
|
5936
|
+
method: "POST",
|
|
5937
|
+
url: url_,
|
|
5938
|
+
headers: {
|
|
5939
|
+
"Content-Type": "application/json",
|
|
5940
|
+
"Accept": "application/json"
|
|
5941
|
+
},
|
|
5942
|
+
cancelToken
|
|
5943
|
+
};
|
|
5944
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5945
|
+
return this.instance.request(transformedOptions_);
|
|
5946
|
+
}).catch((_error) => {
|
|
5947
|
+
if (isAxiosError(_error) && _error.response) {
|
|
5948
|
+
return _error.response;
|
|
5949
|
+
}
|
|
5950
|
+
else {
|
|
5951
|
+
throw _error;
|
|
5952
|
+
}
|
|
5953
|
+
}).then((_response) => {
|
|
5954
|
+
return this.transformResult(url_, _response, (_response) => this.processApplyItemEffects(_response));
|
|
5955
|
+
});
|
|
5956
|
+
}
|
|
5957
|
+
processApplyItemEffects(response) {
|
|
5958
|
+
const status = response.status;
|
|
5959
|
+
let _headers = {};
|
|
5960
|
+
if (response.headers && typeof response.headers === "object") {
|
|
5961
|
+
for (let k in response.headers) {
|
|
5962
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
5963
|
+
_headers[k] = response.headers[k];
|
|
5964
|
+
}
|
|
5965
|
+
}
|
|
5966
|
+
}
|
|
5967
|
+
if (status === 200) {
|
|
5968
|
+
const _responseText = response.data;
|
|
5969
|
+
let result200 = null;
|
|
5970
|
+
let resultData200 = _responseText;
|
|
5971
|
+
result200 = JSON.parse(resultData200);
|
|
5972
|
+
return Promise.resolve(result200);
|
|
5973
|
+
}
|
|
5974
|
+
else if (status === 401) {
|
|
5975
|
+
const _responseText = response.data;
|
|
5976
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
5977
|
+
}
|
|
5978
|
+
else if (status === 403) {
|
|
5979
|
+
const _responseText = response.data;
|
|
5980
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
5981
|
+
}
|
|
5982
|
+
else if (status !== 200 && status !== 204) {
|
|
5983
|
+
const _responseText = response.data;
|
|
5984
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5985
|
+
}
|
|
5986
|
+
return Promise.resolve(null);
|
|
5987
|
+
}
|
|
4565
5988
|
/**
|
|
4566
5989
|
* Extracts print-product item image.
|
|
4567
5990
|
* @param tenantId (optional) Tenant identifier
|
|
@@ -4632,12 +6055,15 @@ export class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
4632
6055
|
}
|
|
4633
6056
|
/**
|
|
4634
6057
|
* Flattens print-product items.
|
|
6058
|
+
* @param paletteUID (optional)
|
|
4635
6059
|
* @param tenantId (optional) Tenant identifier
|
|
4636
6060
|
* @param body (optional) List of print-product items to flatten.
|
|
4637
6061
|
* @return Success
|
|
4638
6062
|
*/
|
|
4639
|
-
flattenItems(tenantId, body, cancelToken) {
|
|
6063
|
+
flattenItems(paletteUID, tenantId, body, cancelToken) {
|
|
4640
6064
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/print-product/items/flatten?";
|
|
6065
|
+
if (paletteUID !== undefined && paletteUID !== null)
|
|
6066
|
+
url_ += "paletteUID=" + encodeURIComponent("" + paletteUID) + "&";
|
|
4641
6067
|
if (tenantId === null)
|
|
4642
6068
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4643
6069
|
else if (tenantId !== undefined)
|
|
@@ -4703,9 +6129,11 @@ export class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
4703
6129
|
* @param itemType (optional) Desired item type.
|
|
4704
6130
|
* @param tenantId (optional) Tenant identifier
|
|
4705
6131
|
* @param sourceFile (optional)
|
|
6132
|
+
* @param paletteUID (optional)
|
|
6133
|
+
* @param preserveOriginalFile (optional)
|
|
4706
6134
|
* @return Success
|
|
4707
6135
|
*/
|
|
4708
|
-
createItemFromFile(itemType, tenantId, sourceFile, cancelToken) {
|
|
6136
|
+
createItemFromFile(itemType, tenantId, sourceFile, paletteUID, preserveOriginalFile, cancelToken) {
|
|
4709
6137
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/print-product/items/from-file?";
|
|
4710
6138
|
if (itemType !== undefined && itemType !== null)
|
|
4711
6139
|
url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
|
|
@@ -4717,6 +6145,10 @@ export class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
4717
6145
|
const content_ = new FormData();
|
|
4718
6146
|
if (sourceFile !== null && sourceFile !== undefined)
|
|
4719
6147
|
content_.append("sourceFile", sourceFile.data, sourceFile.fileName ? sourceFile.fileName : "sourceFile");
|
|
6148
|
+
if (paletteUID !== null && paletteUID !== undefined)
|
|
6149
|
+
content_.append("paletteUID", paletteUID.toString());
|
|
6150
|
+
if (preserveOriginalFile !== null && preserveOriginalFile !== undefined)
|
|
6151
|
+
content_.append("preserveOriginalFile", preserveOriginalFile.toString());
|
|
4720
6152
|
let options_ = {
|
|
4721
6153
|
data: content_,
|
|
4722
6154
|
method: "POST",
|
|
@@ -4789,9 +6221,11 @@ export class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
4789
6221
|
* @param itemType (optional) Desired print-product items type.
|
|
4790
6222
|
* @param tenantId (optional) Tenant identifier
|
|
4791
6223
|
* @param sourceFiles (optional)
|
|
6224
|
+
* @param paletteUID (optional)
|
|
6225
|
+
* @param preserveOriginalFile (optional)
|
|
4792
6226
|
* @return Success
|
|
4793
6227
|
*/
|
|
4794
|
-
batchCreateItemsFromFile(itemType, tenantId, sourceFiles, cancelToken) {
|
|
6228
|
+
batchCreateItemsFromFile(itemType, tenantId, sourceFiles, paletteUID, preserveOriginalFile, cancelToken) {
|
|
4795
6229
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/print-product/items/from-file/batch-create?";
|
|
4796
6230
|
if (itemType !== undefined && itemType !== null)
|
|
4797
6231
|
url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
|
|
@@ -4803,6 +6237,10 @@ export class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
4803
6237
|
const content_ = new FormData();
|
|
4804
6238
|
if (sourceFiles !== null && sourceFiles !== undefined)
|
|
4805
6239
|
sourceFiles.forEach(item_ => content_.append("sourceFiles", item_.data, item_.fileName ? item_.fileName : "sourceFiles"));
|
|
6240
|
+
if (paletteUID !== null && paletteUID !== undefined)
|
|
6241
|
+
content_.append("paletteUID", paletteUID.toString());
|
|
6242
|
+
if (preserveOriginalFile !== null && preserveOriginalFile !== undefined)
|
|
6243
|
+
content_.append("preserveOriginalFile", preserveOriginalFile.toString());
|
|
4806
6244
|
let options_ = {
|
|
4807
6245
|
data: content_,
|
|
4808
6246
|
method: "POST",
|
|
@@ -5277,6 +6715,13 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
5277
6715
|
result201 = JSON.parse(resultData201);
|
|
5278
6716
|
return Promise.resolve(result201);
|
|
5279
6717
|
}
|
|
6718
|
+
else if (status === 409) {
|
|
6719
|
+
const _responseText = response.data;
|
|
6720
|
+
let result409 = null;
|
|
6721
|
+
let resultData409 = _responseText;
|
|
6722
|
+
result409 = JSON.parse(resultData409);
|
|
6723
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
6724
|
+
}
|
|
5280
6725
|
else if (status === 401) {
|
|
5281
6726
|
const _responseText = response.data;
|
|
5282
6727
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -6468,6 +7913,13 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
6468
7913
|
result200 = JSON.parse(resultData200);
|
|
6469
7914
|
return Promise.resolve(result200);
|
|
6470
7915
|
}
|
|
7916
|
+
else if (status === 404) {
|
|
7917
|
+
const _responseText = response.data;
|
|
7918
|
+
let result404 = null;
|
|
7919
|
+
let resultData404 = _responseText;
|
|
7920
|
+
result404 = JSON.parse(resultData404);
|
|
7921
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
7922
|
+
}
|
|
6471
7923
|
else if (status === 409) {
|
|
6472
7924
|
const _responseText = response.data;
|
|
6473
7925
|
let result409 = null;
|
|
@@ -6547,6 +7999,13 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
6547
7999
|
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
6548
8000
|
return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
|
|
6549
8001
|
}
|
|
8002
|
+
else if (status === 404) {
|
|
8003
|
+
const _responseText = response.data;
|
|
8004
|
+
let result404 = null;
|
|
8005
|
+
let resultData404 = _responseText;
|
|
8006
|
+
result404 = JSON.parse(resultData404);
|
|
8007
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
8008
|
+
}
|
|
6550
8009
|
else if (status === 401) {
|
|
6551
8010
|
const _responseText = response.data;
|
|
6552
8011
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -7463,6 +8922,13 @@ export class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
7463
8922
|
result200 = JSON.parse(resultData200);
|
|
7464
8923
|
return Promise.resolve(result200);
|
|
7465
8924
|
}
|
|
8925
|
+
else if (status === 400) {
|
|
8926
|
+
const _responseText = response.data;
|
|
8927
|
+
let result400 = null;
|
|
8928
|
+
let resultData400 = _responseText;
|
|
8929
|
+
result400 = JSON.parse(resultData400);
|
|
8930
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
8931
|
+
}
|
|
7466
8932
|
else if (status === 401) {
|
|
7467
8933
|
const _responseText = response.data;
|
|
7468
8934
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -7530,6 +8996,13 @@ export class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
7530
8996
|
result200 = JSON.parse(resultData200);
|
|
7531
8997
|
return Promise.resolve(result200);
|
|
7532
8998
|
}
|
|
8999
|
+
else if (status === 400) {
|
|
9000
|
+
const _responseText = response.data;
|
|
9001
|
+
let result400 = null;
|
|
9002
|
+
let resultData400 = _responseText;
|
|
9003
|
+
result400 = JSON.parse(resultData400);
|
|
9004
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
9005
|
+
}
|
|
7533
9006
|
else if (status === 401) {
|
|
7534
9007
|
const _responseText = response.data;
|
|
7535
9008
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -7563,7 +9036,7 @@ export class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
7563
9036
|
method: "GET",
|
|
7564
9037
|
url: url_,
|
|
7565
9038
|
headers: {
|
|
7566
|
-
"Accept": "application/
|
|
9039
|
+
"Accept": "application/octet-stream"
|
|
7567
9040
|
},
|
|
7568
9041
|
cancelToken
|
|
7569
9042
|
};
|
|
@@ -7951,7 +9424,7 @@ export class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
7951
9424
|
method: "GET",
|
|
7952
9425
|
url: url_,
|
|
7953
9426
|
headers: {
|
|
7954
|
-
"Accept": "application/
|
|
9427
|
+
"Accept": "application/octet-stream"
|
|
7955
9428
|
},
|
|
7956
9429
|
cancelToken
|
|
7957
9430
|
};
|
|
@@ -8091,7 +9564,7 @@ export class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
8091
9564
|
method: "GET",
|
|
8092
9565
|
url: url_,
|
|
8093
9566
|
headers: {
|
|
8094
|
-
"Accept": "application/
|
|
9567
|
+
"Accept": "application/octet-stream"
|
|
8095
9568
|
},
|
|
8096
9569
|
cancelToken
|
|
8097
9570
|
};
|
|
@@ -8168,7 +9641,7 @@ export class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
8168
9641
|
method: "GET",
|
|
8169
9642
|
url: url_,
|
|
8170
9643
|
headers: {
|
|
8171
|
-
"Accept": "application/
|
|
9644
|
+
"Accept": "application/octet-stream"
|
|
8172
9645
|
},
|
|
8173
9646
|
cancelToken
|
|
8174
9647
|
};
|
|
@@ -8292,7 +9765,7 @@ export class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
8292
9765
|
method: "GET",
|
|
8293
9766
|
url: url_,
|
|
8294
9767
|
headers: {
|
|
8295
|
-
"Accept": "application/
|
|
9768
|
+
"Accept": "application/octet-stream"
|
|
8296
9769
|
},
|
|
8297
9770
|
cancelToken
|
|
8298
9771
|
};
|
|
@@ -8369,7 +9842,7 @@ export class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
8369
9842
|
method: "GET",
|
|
8370
9843
|
url: url_,
|
|
8371
9844
|
headers: {
|
|
8372
|
-
"Accept": "application/
|
|
9845
|
+
"Accept": "application/octet-stream"
|
|
8373
9846
|
},
|
|
8374
9847
|
cancelToken
|
|
8375
9848
|
};
|
|
@@ -9165,6 +10638,22 @@ export class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
9165
10638
|
return Promise.resolve(null);
|
|
9166
10639
|
}
|
|
9167
10640
|
}
|
|
10641
|
+
export var ColorSpace;
|
|
10642
|
+
(function (ColorSpace) {
|
|
10643
|
+
ColorSpace["Rgb"] = "Rgb";
|
|
10644
|
+
ColorSpace["Cmyk"] = "Cmyk";
|
|
10645
|
+
ColorSpace["Grayscale"] = "Grayscale";
|
|
10646
|
+
ColorSpace["Lab"] = "Lab";
|
|
10647
|
+
ColorSpace["Spot"] = "Spot";
|
|
10648
|
+
})(ColorSpace || (ColorSpace = {}));
|
|
10649
|
+
/** Conflict types. */
|
|
10650
|
+
export var ConflictType;
|
|
10651
|
+
(function (ConflictType) {
|
|
10652
|
+
ConflictType["NameConflict"] = "NameConflict";
|
|
10653
|
+
ConflictType["FolderOverwriteConflict"] = "FolderOverwriteConflict";
|
|
10654
|
+
ConflictType["IdConflict"] = "IdConflict";
|
|
10655
|
+
ConflictType["GeneralConflict"] = "GeneralConflict";
|
|
10656
|
+
})(ConflictType || (ConflictType = {}));
|
|
9168
10657
|
export var DesignElementType;
|
|
9169
10658
|
(function (DesignElementType) {
|
|
9170
10659
|
DesignElementType["Product"] = "Product";
|