@aurigma/axios-design-atoms-api-client 2.65.1 → 2.67.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
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
//----------------------
|
|
9
9
|
// ReSharper disable InconsistentNaming
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.ApiException = exports.ProductProofInterpolationMode = exports.ProductProofFormat = exports.ProductPreviewFormat = exports.ProductPatchType = exports.PlaceholderItemContentType = exports.ItemType = exports.ItemSourceType = exports.ImagePreviewFormat = exports.ImagePreviewFitMode = exports.DesignElementType = exports.DesignAtomsViewerApiClient = exports.DesignAtomsServiceApiClient = exports.DesignAtomsPrintProductItemsApiClient = exports.DesignAtomsPrintProductApiClient = exports.DesignAtomsMockups3dApiClient = exports.DesignAtomsImagesApiClient = exports.DesignAtomsCompatibilityApiClient = exports.BuildInfoApiClient = exports.ApiClientBase = exports.ApiClientConfiguration = void 0;
|
|
11
|
+
exports.ApiException = exports.ProductProofInterpolationMode = exports.ProductProofFormat = exports.ProductPreviewFormat = exports.ProductPatchType = exports.PlaceholderItemContentType = exports.ItemType = exports.ItemSourceType = exports.ImagePreviewFormat = exports.ImagePreviewFitMode = exports.DesignElementType = exports.ConflictType = exports.ColorSpace = exports.DesignAtomsViewerApiClient = exports.DesignAtomsServiceApiClient = exports.DesignAtomsPrintProductItemsApiClient = exports.DesignAtomsPrintProductApiClient = exports.DesignAtomsPalettesApiClient = exports.DesignAtomsMockups3dApiClient = exports.DesignAtomsImagesApiClient = exports.DesignAtomsCompatibilityApiClient = exports.BuildInfoApiClient = exports.ApiClientBase = exports.ApiClientConfiguration = void 0;
|
|
12
12
|
const axios_1 = require("axios");
|
|
13
13
|
class ApiClientConfiguration {
|
|
14
14
|
apiUrl;
|
|
@@ -357,6 +357,13 @@ class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
357
357
|
result200 = JSON.parse(resultData200);
|
|
358
358
|
return Promise.resolve(result200);
|
|
359
359
|
}
|
|
360
|
+
else if (status === 400) {
|
|
361
|
+
const _responseText = response.data;
|
|
362
|
+
let result400 = null;
|
|
363
|
+
let resultData400 = _responseText;
|
|
364
|
+
result400 = JSON.parse(resultData400);
|
|
365
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
366
|
+
}
|
|
360
367
|
else if (status === 401) {
|
|
361
368
|
const _responseText = response.data;
|
|
362
369
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -422,6 +429,13 @@ class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
422
429
|
result200 = JSON.parse(resultData200);
|
|
423
430
|
return Promise.resolve(result200);
|
|
424
431
|
}
|
|
432
|
+
else if (status === 400) {
|
|
433
|
+
const _responseText = response.data;
|
|
434
|
+
let result400 = null;
|
|
435
|
+
let resultData400 = _responseText;
|
|
436
|
+
result400 = JSON.parse(resultData400);
|
|
437
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
438
|
+
}
|
|
425
439
|
else if (status === 401) {
|
|
426
440
|
const _responseText = response.data;
|
|
427
441
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -453,7 +467,7 @@ class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
453
467
|
method: "GET",
|
|
454
468
|
url: url_,
|
|
455
469
|
headers: {
|
|
456
|
-
"Accept": "application/
|
|
470
|
+
"Accept": "application/octet-stream"
|
|
457
471
|
},
|
|
458
472
|
cancelToken
|
|
459
473
|
};
|
|
@@ -831,7 +845,7 @@ class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
831
845
|
method: "GET",
|
|
832
846
|
url: url_,
|
|
833
847
|
headers: {
|
|
834
|
-
"Accept": "application/
|
|
848
|
+
"Accept": "application/octet-stream"
|
|
835
849
|
},
|
|
836
850
|
cancelToken
|
|
837
851
|
};
|
|
@@ -967,7 +981,7 @@ class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
967
981
|
method: "GET",
|
|
968
982
|
url: url_,
|
|
969
983
|
headers: {
|
|
970
|
-
"Accept": "application/
|
|
984
|
+
"Accept": "application/octet-stream"
|
|
971
985
|
},
|
|
972
986
|
cancelToken
|
|
973
987
|
};
|
|
@@ -1042,7 +1056,7 @@ class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
1042
1056
|
method: "GET",
|
|
1043
1057
|
url: url_,
|
|
1044
1058
|
headers: {
|
|
1045
|
-
"Accept": "application/
|
|
1059
|
+
"Accept": "application/octet-stream"
|
|
1046
1060
|
},
|
|
1047
1061
|
cancelToken
|
|
1048
1062
|
};
|
|
@@ -1164,7 +1178,7 @@ class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
1164
1178
|
method: "GET",
|
|
1165
1179
|
url: url_,
|
|
1166
1180
|
headers: {
|
|
1167
|
-
"Accept": "application/
|
|
1181
|
+
"Accept": "application/octet-stream"
|
|
1168
1182
|
},
|
|
1169
1183
|
cancelToken
|
|
1170
1184
|
};
|
|
@@ -1239,7 +1253,7 @@ class DesignAtomsCompatibilityApiClient extends ApiClientBase {
|
|
|
1239
1253
|
method: "GET",
|
|
1240
1254
|
url: url_,
|
|
1241
1255
|
headers: {
|
|
1242
|
-
"Accept": "application/
|
|
1256
|
+
"Accept": "application/octet-stream"
|
|
1243
1257
|
},
|
|
1244
1258
|
cancelToken
|
|
1245
1259
|
};
|
|
@@ -2081,6 +2095,13 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2081
2095
|
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
2082
2096
|
return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
|
|
2083
2097
|
}
|
|
2098
|
+
else if (status === 404) {
|
|
2099
|
+
const _responseText = response.data;
|
|
2100
|
+
let result404 = null;
|
|
2101
|
+
let resultData404 = _responseText;
|
|
2102
|
+
result404 = JSON.parse(resultData404);
|
|
2103
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2104
|
+
}
|
|
2084
2105
|
else if (status === 401) {
|
|
2085
2106
|
const _responseText = response.data;
|
|
2086
2107
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -2172,6 +2193,13 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2172
2193
|
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
2173
2194
|
return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
|
|
2174
2195
|
}
|
|
2196
|
+
else if (status === 404) {
|
|
2197
|
+
const _responseText = response.data;
|
|
2198
|
+
let result404 = null;
|
|
2199
|
+
let resultData404 = _responseText;
|
|
2200
|
+
result404 = JSON.parse(resultData404);
|
|
2201
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2202
|
+
}
|
|
2175
2203
|
else if (status === 401) {
|
|
2176
2204
|
const _responseText = response.data;
|
|
2177
2205
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -2223,13 +2251,9 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2223
2251
|
content_.append("resourceSourceId", resourceSourceId.toString());
|
|
2224
2252
|
if (resourceType !== null && resourceType !== undefined)
|
|
2225
2253
|
content_.append("resourceType", resourceType.toString());
|
|
2226
|
-
if (anonymousAccess
|
|
2227
|
-
throw new Error("The parameter 'anonymousAccess' cannot be null.");
|
|
2228
|
-
else
|
|
2254
|
+
if (anonymousAccess !== null && anonymousAccess !== undefined)
|
|
2229
2255
|
content_.append("anonymousAccess", anonymousAccess.toString());
|
|
2230
|
-
if (overwriteExistingResource
|
|
2231
|
-
throw new Error("The parameter 'overwriteExistingResource' cannot be null.");
|
|
2232
|
-
else
|
|
2256
|
+
if (overwriteExistingResource !== null && overwriteExistingResource !== undefined)
|
|
2233
2257
|
content_.append("overwriteExistingResource", overwriteExistingResource.toString());
|
|
2234
2258
|
if (sourceFile !== null && sourceFile !== undefined)
|
|
2235
2259
|
content_.append("sourceFile", sourceFile.data, sourceFile.fileName ? sourceFile.fileName : "sourceFile");
|
|
@@ -2284,6 +2308,13 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2284
2308
|
result200 = JSON.parse(resultData200);
|
|
2285
2309
|
return Promise.resolve(result200);
|
|
2286
2310
|
}
|
|
2311
|
+
else if (status === 404) {
|
|
2312
|
+
const _responseText = response.data;
|
|
2313
|
+
let result404 = null;
|
|
2314
|
+
let resultData404 = _responseText;
|
|
2315
|
+
result404 = JSON.parse(resultData404);
|
|
2316
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2317
|
+
}
|
|
2287
2318
|
else if (status === 409) {
|
|
2288
2319
|
const _responseText = response.data;
|
|
2289
2320
|
let result409 = null;
|
|
@@ -2363,6 +2394,13 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2363
2394
|
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
2364
2395
|
return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
|
|
2365
2396
|
}
|
|
2397
|
+
else if (status === 404) {
|
|
2398
|
+
const _responseText = response.data;
|
|
2399
|
+
let result404 = null;
|
|
2400
|
+
let resultData404 = _responseText;
|
|
2401
|
+
result404 = JSON.parse(resultData404);
|
|
2402
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2403
|
+
}
|
|
2366
2404
|
else if (status === 401) {
|
|
2367
2405
|
const _responseText = response.data;
|
|
2368
2406
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -2431,6 +2469,13 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2431
2469
|
result200 = JSON.parse(resultData200);
|
|
2432
2470
|
return Promise.resolve(result200);
|
|
2433
2471
|
}
|
|
2472
|
+
else if (status === 404) {
|
|
2473
|
+
const _responseText = response.data;
|
|
2474
|
+
let result404 = null;
|
|
2475
|
+
let resultData404 = _responseText;
|
|
2476
|
+
result404 = JSON.parse(resultData404);
|
|
2477
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2478
|
+
}
|
|
2434
2479
|
else if (status === 409) {
|
|
2435
2480
|
const _responseText = response.data;
|
|
2436
2481
|
let result409 = null;
|
|
@@ -2506,6 +2551,13 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2506
2551
|
result200 = JSON.parse(resultData200);
|
|
2507
2552
|
return Promise.resolve(result200);
|
|
2508
2553
|
}
|
|
2554
|
+
else if (status === 404) {
|
|
2555
|
+
const _responseText = response.data;
|
|
2556
|
+
let result404 = null;
|
|
2557
|
+
let resultData404 = _responseText;
|
|
2558
|
+
result404 = JSON.parse(resultData404);
|
|
2559
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2560
|
+
}
|
|
2509
2561
|
else if (status === 409) {
|
|
2510
2562
|
const _responseText = response.data;
|
|
2511
2563
|
let result409 = null;
|
|
@@ -2647,7 +2699,7 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
|
|
|
2647
2699
|
method: "GET",
|
|
2648
2700
|
url: url_,
|
|
2649
2701
|
headers: {
|
|
2650
|
-
"Accept": "application/
|
|
2702
|
+
"Accept": "application/octet-stream"
|
|
2651
2703
|
},
|
|
2652
2704
|
cancelToken
|
|
2653
2705
|
};
|
|
@@ -2732,7 +2784,7 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
|
|
|
2732
2784
|
method: "GET",
|
|
2733
2785
|
url: url_,
|
|
2734
2786
|
headers: {
|
|
2735
|
-
"Accept": "application/
|
|
2787
|
+
"Accept": "application/octet-stream"
|
|
2736
2788
|
},
|
|
2737
2789
|
cancelToken
|
|
2738
2790
|
};
|
|
@@ -2772,13 +2824,1319 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
|
|
|
2772
2824
|
result404 = JSON.parse(resultData404);
|
|
2773
2825
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2774
2826
|
}
|
|
2775
|
-
else if (status === 409) {
|
|
2776
|
-
const _responseText = response.data;
|
|
2777
|
-
let result409 = null;
|
|
2778
|
-
let resultData409 = _responseText;
|
|
2779
|
-
result409 = JSON.parse(resultData409);
|
|
2780
|
-
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2781
|
-
}
|
|
2827
|
+
else if (status === 409) {
|
|
2828
|
+
const _responseText = response.data;
|
|
2829
|
+
let result409 = null;
|
|
2830
|
+
let resultData409 = _responseText;
|
|
2831
|
+
result409 = JSON.parse(resultData409);
|
|
2832
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2833
|
+
}
|
|
2834
|
+
else if (status === 401) {
|
|
2835
|
+
const _responseText = response.data;
|
|
2836
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2837
|
+
}
|
|
2838
|
+
else if (status === 403) {
|
|
2839
|
+
const _responseText = response.data;
|
|
2840
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2841
|
+
}
|
|
2842
|
+
else if (status !== 200 && status !== 204) {
|
|
2843
|
+
const _responseText = response.data;
|
|
2844
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2845
|
+
}
|
|
2846
|
+
return Promise.resolve(null);
|
|
2847
|
+
}
|
|
2848
|
+
}
|
|
2849
|
+
exports.DesignAtomsMockups3dApiClient = DesignAtomsMockups3dApiClient;
|
|
2850
|
+
class DesignAtomsPalettesApiClient extends ApiClientBase {
|
|
2851
|
+
instance;
|
|
2852
|
+
baseUrl;
|
|
2853
|
+
jsonParseReviver = undefined;
|
|
2854
|
+
constructor(configuration, baseUrl, instance) {
|
|
2855
|
+
super(configuration);
|
|
2856
|
+
this.instance = instance ? instance : axios_1.create();
|
|
2857
|
+
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
2858
|
+
}
|
|
2859
|
+
/**
|
|
2860
|
+
* Returns a closest color to provided color in a specified palette.
|
|
2861
|
+
* @param paletteUID (optional) Palette UID.
|
|
2862
|
+
* @param tenantId (optional) Tenant identifier
|
|
2863
|
+
* @param body (optional) Source color.
|
|
2864
|
+
* @return Success
|
|
2865
|
+
*/
|
|
2866
|
+
findPaletteColor(paletteUID, tenantId, body, cancelToken) {
|
|
2867
|
+
let url_ = this.baseUrl + "/api/atoms/v1/palettes/find-color?";
|
|
2868
|
+
if (paletteUID !== undefined && paletteUID !== null)
|
|
2869
|
+
url_ += "paletteUID=" + encodeURIComponent("" + paletteUID) + "&";
|
|
2870
|
+
if (tenantId === null)
|
|
2871
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2872
|
+
else if (tenantId !== undefined)
|
|
2873
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2874
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2875
|
+
const content_ = JSON.stringify(body);
|
|
2876
|
+
let options_ = {
|
|
2877
|
+
data: content_,
|
|
2878
|
+
method: "POST",
|
|
2879
|
+
url: url_,
|
|
2880
|
+
headers: {
|
|
2881
|
+
"Content-Type": "application/json",
|
|
2882
|
+
"Accept": "application/json"
|
|
2883
|
+
},
|
|
2884
|
+
cancelToken
|
|
2885
|
+
};
|
|
2886
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2887
|
+
return this.instance.request(transformedOptions_);
|
|
2888
|
+
}).catch((_error) => {
|
|
2889
|
+
if (isAxiosError(_error) && _error.response) {
|
|
2890
|
+
return _error.response;
|
|
2891
|
+
}
|
|
2892
|
+
else {
|
|
2893
|
+
throw _error;
|
|
2894
|
+
}
|
|
2895
|
+
}).then((_response) => {
|
|
2896
|
+
return this.transformResult(url_, _response, (_response) => this.processFindPaletteColor(_response));
|
|
2897
|
+
});
|
|
2898
|
+
}
|
|
2899
|
+
processFindPaletteColor(response) {
|
|
2900
|
+
const status = response.status;
|
|
2901
|
+
let _headers = {};
|
|
2902
|
+
if (response.headers && typeof response.headers === "object") {
|
|
2903
|
+
for (let k in response.headers) {
|
|
2904
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
2905
|
+
_headers[k] = response.headers[k];
|
|
2906
|
+
}
|
|
2907
|
+
}
|
|
2908
|
+
}
|
|
2909
|
+
if (status === 200) {
|
|
2910
|
+
const _responseText = response.data;
|
|
2911
|
+
let result200 = null;
|
|
2912
|
+
let resultData200 = _responseText;
|
|
2913
|
+
result200 = JSON.parse(resultData200);
|
|
2914
|
+
return Promise.resolve(result200);
|
|
2915
|
+
}
|
|
2916
|
+
else if (status === 400) {
|
|
2917
|
+
const _responseText = response.data;
|
|
2918
|
+
let result400 = null;
|
|
2919
|
+
let resultData400 = _responseText;
|
|
2920
|
+
result400 = JSON.parse(resultData400);
|
|
2921
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
2922
|
+
}
|
|
2923
|
+
else if (status === 404) {
|
|
2924
|
+
const _responseText = response.data;
|
|
2925
|
+
let result404 = null;
|
|
2926
|
+
let resultData404 = _responseText;
|
|
2927
|
+
result404 = JSON.parse(resultData404);
|
|
2928
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2929
|
+
}
|
|
2930
|
+
else if (status === 409) {
|
|
2931
|
+
const _responseText = response.data;
|
|
2932
|
+
let result409 = null;
|
|
2933
|
+
let resultData409 = _responseText;
|
|
2934
|
+
result409 = JSON.parse(resultData409);
|
|
2935
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2936
|
+
}
|
|
2937
|
+
else if (status === 401) {
|
|
2938
|
+
const _responseText = response.data;
|
|
2939
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2940
|
+
}
|
|
2941
|
+
else if (status === 403) {
|
|
2942
|
+
const _responseText = response.data;
|
|
2943
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2944
|
+
}
|
|
2945
|
+
else if (status !== 200 && status !== 204) {
|
|
2946
|
+
const _responseText = response.data;
|
|
2947
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2948
|
+
}
|
|
2949
|
+
return Promise.resolve(null);
|
|
2950
|
+
}
|
|
2951
|
+
/**
|
|
2952
|
+
* Returns a serialized palette model by its identifier or UID.
|
|
2953
|
+
* @param id (optional) Palette identifier.
|
|
2954
|
+
* @param uid (optional) Palette UID.
|
|
2955
|
+
* @param tenantId (optional) Tenant identifier
|
|
2956
|
+
* @return Success
|
|
2957
|
+
*/
|
|
2958
|
+
getPaletteModel(id, uid, tenantId, cancelToken) {
|
|
2959
|
+
let url_ = this.baseUrl + "/api/atoms/v1/palettes/model?";
|
|
2960
|
+
if (id !== undefined && id !== null)
|
|
2961
|
+
url_ += "id=" + encodeURIComponent("" + id) + "&";
|
|
2962
|
+
if (uid !== undefined && uid !== null)
|
|
2963
|
+
url_ += "uid=" + encodeURIComponent("" + uid) + "&";
|
|
2964
|
+
if (tenantId === null)
|
|
2965
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2966
|
+
else if (tenantId !== undefined)
|
|
2967
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2968
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2969
|
+
let options_ = {
|
|
2970
|
+
method: "GET",
|
|
2971
|
+
url: url_,
|
|
2972
|
+
headers: {
|
|
2973
|
+
"Accept": "application/json"
|
|
2974
|
+
},
|
|
2975
|
+
cancelToken
|
|
2976
|
+
};
|
|
2977
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2978
|
+
return this.instance.request(transformedOptions_);
|
|
2979
|
+
}).catch((_error) => {
|
|
2980
|
+
if (isAxiosError(_error) && _error.response) {
|
|
2981
|
+
return _error.response;
|
|
2982
|
+
}
|
|
2983
|
+
else {
|
|
2984
|
+
throw _error;
|
|
2985
|
+
}
|
|
2986
|
+
}).then((_response) => {
|
|
2987
|
+
return this.transformResult(url_, _response, (_response) => this.processGetPaletteModel(_response));
|
|
2988
|
+
});
|
|
2989
|
+
}
|
|
2990
|
+
processGetPaletteModel(response) {
|
|
2991
|
+
const status = response.status;
|
|
2992
|
+
let _headers = {};
|
|
2993
|
+
if (response.headers && typeof response.headers === "object") {
|
|
2994
|
+
for (let k in response.headers) {
|
|
2995
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
2996
|
+
_headers[k] = response.headers[k];
|
|
2997
|
+
}
|
|
2998
|
+
}
|
|
2999
|
+
}
|
|
3000
|
+
if (status === 200) {
|
|
3001
|
+
const _responseText = response.data;
|
|
3002
|
+
let result200 = null;
|
|
3003
|
+
let resultData200 = _responseText;
|
|
3004
|
+
result200 = JSON.parse(resultData200);
|
|
3005
|
+
return Promise.resolve(result200);
|
|
3006
|
+
}
|
|
3007
|
+
else if (status === 400) {
|
|
3008
|
+
const _responseText = response.data;
|
|
3009
|
+
let result400 = null;
|
|
3010
|
+
let resultData400 = _responseText;
|
|
3011
|
+
result400 = JSON.parse(resultData400);
|
|
3012
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
3013
|
+
}
|
|
3014
|
+
else if (status === 404) {
|
|
3015
|
+
const _responseText = response.data;
|
|
3016
|
+
let result404 = null;
|
|
3017
|
+
let resultData404 = _responseText;
|
|
3018
|
+
result404 = JSON.parse(resultData404);
|
|
3019
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3020
|
+
}
|
|
3021
|
+
else if (status === 409) {
|
|
3022
|
+
const _responseText = response.data;
|
|
3023
|
+
let result409 = null;
|
|
3024
|
+
let resultData409 = _responseText;
|
|
3025
|
+
result409 = JSON.parse(resultData409);
|
|
3026
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3027
|
+
}
|
|
3028
|
+
else if (status === 401) {
|
|
3029
|
+
const _responseText = response.data;
|
|
3030
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3031
|
+
}
|
|
3032
|
+
else if (status === 403) {
|
|
3033
|
+
const _responseText = response.data;
|
|
3034
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3035
|
+
}
|
|
3036
|
+
else if (status !== 200 && status !== 204) {
|
|
3037
|
+
const _responseText = response.data;
|
|
3038
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3039
|
+
}
|
|
3040
|
+
return Promise.resolve(null);
|
|
3041
|
+
}
|
|
3042
|
+
}
|
|
3043
|
+
exports.DesignAtomsPalettesApiClient = DesignAtomsPalettesApiClient;
|
|
3044
|
+
class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
3045
|
+
instance;
|
|
3046
|
+
baseUrl;
|
|
3047
|
+
jsonParseReviver = undefined;
|
|
3048
|
+
constructor(configuration, baseUrl, instance) {
|
|
3049
|
+
super(configuration);
|
|
3050
|
+
this.instance = instance ? instance : axios_1.create();
|
|
3051
|
+
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
3052
|
+
}
|
|
3053
|
+
/**
|
|
3054
|
+
* Patches a print-product of the specified design file.
|
|
3055
|
+
* @param id Design identifier.
|
|
3056
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3057
|
+
* @param tenantId (optional) Tenant identifier
|
|
3058
|
+
* @param patchType (optional)
|
|
3059
|
+
* @param replaceImageItemFileInfo_itemName (optional)
|
|
3060
|
+
* @param replaceImageItemFileInfo_sourceFile (optional)
|
|
3061
|
+
* @param replacePlaceholderItemContentInfo_placeholderItemName (optional)
|
|
3062
|
+
* @param replacePlaceholderItemContentInfo_newContentType (optional)
|
|
3063
|
+
* @param replacePlaceholderItemContentInfo_sourceFile (optional)
|
|
3064
|
+
* @return No Content
|
|
3065
|
+
*/
|
|
3066
|
+
patchDesignProduct(id, privateStorageOwner, tenantId, patchType, replaceImageItemFileInfo_itemName, replaceImageItemFileInfo_sourceFile, replacePlaceholderItemContentInfo_placeholderItemName, replacePlaceholderItemContentInfo_newContentType, replacePlaceholderItemContentInfo_sourceFile, cancelToken) {
|
|
3067
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product?";
|
|
3068
|
+
if (id === undefined || id === null)
|
|
3069
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3070
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3071
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3072
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3073
|
+
if (tenantId === null)
|
|
3074
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3075
|
+
else if (tenantId !== undefined)
|
|
3076
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3077
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3078
|
+
const content_ = new FormData();
|
|
3079
|
+
if (patchType === null || patchType === undefined)
|
|
3080
|
+
throw new Error("The parameter 'patchType' cannot be null.");
|
|
3081
|
+
else
|
|
3082
|
+
content_.append("patchType", patchType.toString());
|
|
3083
|
+
if (replaceImageItemFileInfo_itemName !== null && replaceImageItemFileInfo_itemName !== undefined)
|
|
3084
|
+
content_.append("replaceImageItemFileInfo.itemName", replaceImageItemFileInfo_itemName.toString());
|
|
3085
|
+
if (replaceImageItemFileInfo_sourceFile !== null && replaceImageItemFileInfo_sourceFile !== undefined)
|
|
3086
|
+
content_.append("replaceImageItemFileInfo.sourceFile", replaceImageItemFileInfo_sourceFile.data, replaceImageItemFileInfo_sourceFile.fileName ? replaceImageItemFileInfo_sourceFile.fileName : "replaceImageItemFileInfo.sourceFile");
|
|
3087
|
+
if (replacePlaceholderItemContentInfo_placeholderItemName !== null && replacePlaceholderItemContentInfo_placeholderItemName !== undefined)
|
|
3088
|
+
content_.append("replacePlaceholderItemContentInfo.placeholderItemName", replacePlaceholderItemContentInfo_placeholderItemName.toString());
|
|
3089
|
+
if (replacePlaceholderItemContentInfo_newContentType === null || replacePlaceholderItemContentInfo_newContentType === undefined)
|
|
3090
|
+
throw new Error("The parameter 'replacePlaceholderItemContentInfo_newContentType' cannot be null.");
|
|
3091
|
+
else
|
|
3092
|
+
content_.append("replacePlaceholderItemContentInfo.newContentType", replacePlaceholderItemContentInfo_newContentType.toString());
|
|
3093
|
+
if (replacePlaceholderItemContentInfo_sourceFile !== null && replacePlaceholderItemContentInfo_sourceFile !== undefined)
|
|
3094
|
+
content_.append("replacePlaceholderItemContentInfo.sourceFile", replacePlaceholderItemContentInfo_sourceFile.data, replacePlaceholderItemContentInfo_sourceFile.fileName ? replacePlaceholderItemContentInfo_sourceFile.fileName : "replacePlaceholderItemContentInfo.sourceFile");
|
|
3095
|
+
let options_ = {
|
|
3096
|
+
data: content_,
|
|
3097
|
+
method: "PATCH",
|
|
3098
|
+
url: url_,
|
|
3099
|
+
headers: {},
|
|
3100
|
+
cancelToken
|
|
3101
|
+
};
|
|
3102
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3103
|
+
return this.instance.request(transformedOptions_);
|
|
3104
|
+
}).catch((_error) => {
|
|
3105
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3106
|
+
return _error.response;
|
|
3107
|
+
}
|
|
3108
|
+
else {
|
|
3109
|
+
throw _error;
|
|
3110
|
+
}
|
|
3111
|
+
}).then((_response) => {
|
|
3112
|
+
return this.transformResult(url_, _response, (_response) => this.processPatchDesignProduct(_response));
|
|
3113
|
+
});
|
|
3114
|
+
}
|
|
3115
|
+
processPatchDesignProduct(response) {
|
|
3116
|
+
const status = response.status;
|
|
3117
|
+
let _headers = {};
|
|
3118
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3119
|
+
for (let k in response.headers) {
|
|
3120
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3121
|
+
_headers[k] = response.headers[k];
|
|
3122
|
+
}
|
|
3123
|
+
}
|
|
3124
|
+
}
|
|
3125
|
+
if (status === 204) {
|
|
3126
|
+
const _responseText = response.data;
|
|
3127
|
+
return Promise.resolve(null);
|
|
3128
|
+
}
|
|
3129
|
+
else if (status === 404) {
|
|
3130
|
+
const _responseText = response.data;
|
|
3131
|
+
let result404 = null;
|
|
3132
|
+
let resultData404 = _responseText;
|
|
3133
|
+
result404 = JSON.parse(resultData404);
|
|
3134
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3135
|
+
}
|
|
3136
|
+
else if (status === 401) {
|
|
3137
|
+
const _responseText = response.data;
|
|
3138
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3139
|
+
}
|
|
3140
|
+
else if (status === 403) {
|
|
3141
|
+
const _responseText = response.data;
|
|
3142
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3143
|
+
}
|
|
3144
|
+
else if (status !== 200 && status !== 204) {
|
|
3145
|
+
const _responseText = response.data;
|
|
3146
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3147
|
+
}
|
|
3148
|
+
return Promise.resolve(null);
|
|
3149
|
+
}
|
|
3150
|
+
/**
|
|
3151
|
+
* Returns a list of print-product container descriptions of the specified design file.
|
|
3152
|
+
* @param id Design identifier.
|
|
3153
|
+
* @param surfaceId (optional) Print-product surface identifier.
|
|
3154
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3155
|
+
* @param tenantId (optional) Tenant identifier
|
|
3156
|
+
* @return Success
|
|
3157
|
+
*/
|
|
3158
|
+
getDesignSurfaceContainers(id, surfaceId, privateStorageOwner, tenantId, cancelToken) {
|
|
3159
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/containers?";
|
|
3160
|
+
if (id === undefined || id === null)
|
|
3161
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3162
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3163
|
+
if (surfaceId !== undefined && surfaceId !== null)
|
|
3164
|
+
url_ += "surfaceId=" + encodeURIComponent("" + surfaceId) + "&";
|
|
3165
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3166
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3167
|
+
if (tenantId === null)
|
|
3168
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3169
|
+
else if (tenantId !== undefined)
|
|
3170
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3171
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3172
|
+
let options_ = {
|
|
3173
|
+
method: "GET",
|
|
3174
|
+
url: url_,
|
|
3175
|
+
headers: {
|
|
3176
|
+
"Accept": "application/json"
|
|
3177
|
+
},
|
|
3178
|
+
cancelToken
|
|
3179
|
+
};
|
|
3180
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3181
|
+
return this.instance.request(transformedOptions_);
|
|
3182
|
+
}).catch((_error) => {
|
|
3183
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3184
|
+
return _error.response;
|
|
3185
|
+
}
|
|
3186
|
+
else {
|
|
3187
|
+
throw _error;
|
|
3188
|
+
}
|
|
3189
|
+
}).then((_response) => {
|
|
3190
|
+
return this.transformResult(url_, _response, (_response) => this.processGetDesignSurfaceContainers(_response));
|
|
3191
|
+
});
|
|
3192
|
+
}
|
|
3193
|
+
processGetDesignSurfaceContainers(response) {
|
|
3194
|
+
const status = response.status;
|
|
3195
|
+
let _headers = {};
|
|
3196
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3197
|
+
for (let k in response.headers) {
|
|
3198
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3199
|
+
_headers[k] = response.headers[k];
|
|
3200
|
+
}
|
|
3201
|
+
}
|
|
3202
|
+
}
|
|
3203
|
+
if (status === 200) {
|
|
3204
|
+
const _responseText = response.data;
|
|
3205
|
+
let result200 = null;
|
|
3206
|
+
let resultData200 = _responseText;
|
|
3207
|
+
result200 = JSON.parse(resultData200);
|
|
3208
|
+
return Promise.resolve(result200);
|
|
3209
|
+
}
|
|
3210
|
+
else if (status === 404) {
|
|
3211
|
+
const _responseText = response.data;
|
|
3212
|
+
let result404 = null;
|
|
3213
|
+
let resultData404 = _responseText;
|
|
3214
|
+
result404 = JSON.parse(resultData404);
|
|
3215
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3216
|
+
}
|
|
3217
|
+
else if (status === 401) {
|
|
3218
|
+
const _responseText = response.data;
|
|
3219
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3220
|
+
}
|
|
3221
|
+
else if (status === 403) {
|
|
3222
|
+
const _responseText = response.data;
|
|
3223
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3224
|
+
}
|
|
3225
|
+
else if (status !== 200 && status !== 204) {
|
|
3226
|
+
const _responseText = response.data;
|
|
3227
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3228
|
+
}
|
|
3229
|
+
return Promise.resolve(null);
|
|
3230
|
+
}
|
|
3231
|
+
/**
|
|
3232
|
+
* Deletes a specified print-product container in an existing design file.
|
|
3233
|
+
* @param id Design identifier.
|
|
3234
|
+
* @param containerId Print-product container identifier.
|
|
3235
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3236
|
+
* @param tenantId (optional) Tenant identifier
|
|
3237
|
+
* @return No Content
|
|
3238
|
+
*/
|
|
3239
|
+
deleteDesignSurfaceContainer(id, containerId, privateStorageOwner, tenantId, cancelToken) {
|
|
3240
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/containers/{containerId}?";
|
|
3241
|
+
if (id === undefined || id === null)
|
|
3242
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3243
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3244
|
+
if (containerId === undefined || containerId === null)
|
|
3245
|
+
throw new Error("The parameter 'containerId' must be defined.");
|
|
3246
|
+
url_ = url_.replace("{containerId}", encodeURIComponent("" + containerId));
|
|
3247
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3248
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3249
|
+
if (tenantId === null)
|
|
3250
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3251
|
+
else if (tenantId !== undefined)
|
|
3252
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3253
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3254
|
+
let options_ = {
|
|
3255
|
+
method: "DELETE",
|
|
3256
|
+
url: url_,
|
|
3257
|
+
headers: {},
|
|
3258
|
+
cancelToken
|
|
3259
|
+
};
|
|
3260
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3261
|
+
return this.instance.request(transformedOptions_);
|
|
3262
|
+
}).catch((_error) => {
|
|
3263
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3264
|
+
return _error.response;
|
|
3265
|
+
}
|
|
3266
|
+
else {
|
|
3267
|
+
throw _error;
|
|
3268
|
+
}
|
|
3269
|
+
}).then((_response) => {
|
|
3270
|
+
return this.transformResult(url_, _response, (_response) => this.processDeleteDesignSurfaceContainer(_response));
|
|
3271
|
+
});
|
|
3272
|
+
}
|
|
3273
|
+
processDeleteDesignSurfaceContainer(response) {
|
|
3274
|
+
const status = response.status;
|
|
3275
|
+
let _headers = {};
|
|
3276
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3277
|
+
for (let k in response.headers) {
|
|
3278
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3279
|
+
_headers[k] = response.headers[k];
|
|
3280
|
+
}
|
|
3281
|
+
}
|
|
3282
|
+
}
|
|
3283
|
+
if (status === 204) {
|
|
3284
|
+
const _responseText = response.data;
|
|
3285
|
+
return Promise.resolve(null);
|
|
3286
|
+
}
|
|
3287
|
+
else if (status === 404) {
|
|
3288
|
+
const _responseText = response.data;
|
|
3289
|
+
let result404 = null;
|
|
3290
|
+
let resultData404 = _responseText;
|
|
3291
|
+
result404 = JSON.parse(resultData404);
|
|
3292
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3293
|
+
}
|
|
3294
|
+
else if (status === 409) {
|
|
3295
|
+
const _responseText = response.data;
|
|
3296
|
+
let result409 = null;
|
|
3297
|
+
let resultData409 = _responseText;
|
|
3298
|
+
result409 = JSON.parse(resultData409);
|
|
3299
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3300
|
+
}
|
|
3301
|
+
else if (status === 401) {
|
|
3302
|
+
const _responseText = response.data;
|
|
3303
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3304
|
+
}
|
|
3305
|
+
else if (status === 403) {
|
|
3306
|
+
const _responseText = response.data;
|
|
3307
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3308
|
+
}
|
|
3309
|
+
else if (status !== 200 && status !== 204) {
|
|
3310
|
+
const _responseText = response.data;
|
|
3311
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3312
|
+
}
|
|
3313
|
+
return Promise.resolve(null);
|
|
3314
|
+
}
|
|
3315
|
+
/**
|
|
3316
|
+
* Returns a print-product container of the specified design file as a json-serialized model.
|
|
3317
|
+
* @param id Design identifier.
|
|
3318
|
+
* @param containerId Print-product container identifier.
|
|
3319
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3320
|
+
* @param tenantId (optional) Tenant identifier
|
|
3321
|
+
* @return Success
|
|
3322
|
+
*/
|
|
3323
|
+
getDesignSurfaceContainerModel(id, containerId, privateStorageOwner, tenantId, cancelToken) {
|
|
3324
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/containers/{containerId}/model?";
|
|
3325
|
+
if (id === undefined || id === null)
|
|
3326
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3327
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3328
|
+
if (containerId === undefined || containerId === null)
|
|
3329
|
+
throw new Error("The parameter 'containerId' must be defined.");
|
|
3330
|
+
url_ = url_.replace("{containerId}", encodeURIComponent("" + containerId));
|
|
3331
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3332
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3333
|
+
if (tenantId === null)
|
|
3334
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3335
|
+
else if (tenantId !== undefined)
|
|
3336
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3337
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3338
|
+
let options_ = {
|
|
3339
|
+
method: "GET",
|
|
3340
|
+
url: url_,
|
|
3341
|
+
headers: {
|
|
3342
|
+
"Accept": "application/json"
|
|
3343
|
+
},
|
|
3344
|
+
cancelToken
|
|
3345
|
+
};
|
|
3346
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3347
|
+
return this.instance.request(transformedOptions_);
|
|
3348
|
+
}).catch((_error) => {
|
|
3349
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3350
|
+
return _error.response;
|
|
3351
|
+
}
|
|
3352
|
+
else {
|
|
3353
|
+
throw _error;
|
|
3354
|
+
}
|
|
3355
|
+
}).then((_response) => {
|
|
3356
|
+
return this.transformResult(url_, _response, (_response) => this.processGetDesignSurfaceContainerModel(_response));
|
|
3357
|
+
});
|
|
3358
|
+
}
|
|
3359
|
+
processGetDesignSurfaceContainerModel(response) {
|
|
3360
|
+
const status = response.status;
|
|
3361
|
+
let _headers = {};
|
|
3362
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3363
|
+
for (let k in response.headers) {
|
|
3364
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3365
|
+
_headers[k] = response.headers[k];
|
|
3366
|
+
}
|
|
3367
|
+
}
|
|
3368
|
+
}
|
|
3369
|
+
if (status === 200) {
|
|
3370
|
+
const _responseText = response.data;
|
|
3371
|
+
let result200 = null;
|
|
3372
|
+
let resultData200 = _responseText;
|
|
3373
|
+
result200 = JSON.parse(resultData200);
|
|
3374
|
+
return Promise.resolve(result200);
|
|
3375
|
+
}
|
|
3376
|
+
else if (status === 404) {
|
|
3377
|
+
const _responseText = response.data;
|
|
3378
|
+
let result404 = null;
|
|
3379
|
+
let resultData404 = _responseText;
|
|
3380
|
+
result404 = JSON.parse(resultData404);
|
|
3381
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3382
|
+
}
|
|
3383
|
+
else if (status === 409) {
|
|
3384
|
+
const _responseText = response.data;
|
|
3385
|
+
let result409 = null;
|
|
3386
|
+
let resultData409 = _responseText;
|
|
3387
|
+
result409 = JSON.parse(resultData409);
|
|
3388
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3389
|
+
}
|
|
3390
|
+
else if (status === 401) {
|
|
3391
|
+
const _responseText = response.data;
|
|
3392
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3393
|
+
}
|
|
3394
|
+
else if (status === 403) {
|
|
3395
|
+
const _responseText = response.data;
|
|
3396
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3397
|
+
}
|
|
3398
|
+
else if (status !== 200 && status !== 204) {
|
|
3399
|
+
const _responseText = response.data;
|
|
3400
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3401
|
+
}
|
|
3402
|
+
return Promise.resolve(null);
|
|
3403
|
+
}
|
|
3404
|
+
/**
|
|
3405
|
+
* Updates a specified print-product container in an existing design file with the data provided as a json-serialized model.
|
|
3406
|
+
* @param id Design identifier.
|
|
3407
|
+
* @param containerId Print-product container identifier.
|
|
3408
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3409
|
+
* @param tenantId (optional) Tenant identifier
|
|
3410
|
+
* @param body (optional) Json-serialized model of a print-product container.
|
|
3411
|
+
* @return Success
|
|
3412
|
+
*/
|
|
3413
|
+
updateDesignSurfaceContainerModel(id, containerId, privateStorageOwner, tenantId, body, cancelToken) {
|
|
3414
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/containers/{containerId}/model?";
|
|
3415
|
+
if (id === undefined || id === null)
|
|
3416
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3417
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3418
|
+
if (containerId === undefined || containerId === null)
|
|
3419
|
+
throw new Error("The parameter 'containerId' must be defined.");
|
|
3420
|
+
url_ = url_.replace("{containerId}", encodeURIComponent("" + containerId));
|
|
3421
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3422
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3423
|
+
if (tenantId === null)
|
|
3424
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3425
|
+
else if (tenantId !== undefined)
|
|
3426
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3427
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3428
|
+
const content_ = JSON.stringify(body);
|
|
3429
|
+
let options_ = {
|
|
3430
|
+
data: content_,
|
|
3431
|
+
method: "PUT",
|
|
3432
|
+
url: url_,
|
|
3433
|
+
headers: {
|
|
3434
|
+
"Content-Type": "application/json",
|
|
3435
|
+
"Accept": "application/json"
|
|
3436
|
+
},
|
|
3437
|
+
cancelToken
|
|
3438
|
+
};
|
|
3439
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3440
|
+
return this.instance.request(transformedOptions_);
|
|
3441
|
+
}).catch((_error) => {
|
|
3442
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3443
|
+
return _error.response;
|
|
3444
|
+
}
|
|
3445
|
+
else {
|
|
3446
|
+
throw _error;
|
|
3447
|
+
}
|
|
3448
|
+
}).then((_response) => {
|
|
3449
|
+
return this.transformResult(url_, _response, (_response) => this.processUpdateDesignSurfaceContainerModel(_response));
|
|
3450
|
+
});
|
|
3451
|
+
}
|
|
3452
|
+
processUpdateDesignSurfaceContainerModel(response) {
|
|
3453
|
+
const status = response.status;
|
|
3454
|
+
let _headers = {};
|
|
3455
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3456
|
+
for (let k in response.headers) {
|
|
3457
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3458
|
+
_headers[k] = response.headers[k];
|
|
3459
|
+
}
|
|
3460
|
+
}
|
|
3461
|
+
}
|
|
3462
|
+
if (status === 200) {
|
|
3463
|
+
const _responseText = response.data;
|
|
3464
|
+
let result200 = null;
|
|
3465
|
+
let resultData200 = _responseText;
|
|
3466
|
+
result200 = JSON.parse(resultData200);
|
|
3467
|
+
return Promise.resolve(result200);
|
|
3468
|
+
}
|
|
3469
|
+
else if (status === 400) {
|
|
3470
|
+
const _responseText = response.data;
|
|
3471
|
+
let result400 = null;
|
|
3472
|
+
let resultData400 = _responseText;
|
|
3473
|
+
result400 = JSON.parse(resultData400);
|
|
3474
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
3475
|
+
}
|
|
3476
|
+
else if (status === 404) {
|
|
3477
|
+
const _responseText = response.data;
|
|
3478
|
+
let result404 = null;
|
|
3479
|
+
let resultData404 = _responseText;
|
|
3480
|
+
result404 = JSON.parse(resultData404);
|
|
3481
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3482
|
+
}
|
|
3483
|
+
else if (status === 409) {
|
|
3484
|
+
const _responseText = response.data;
|
|
3485
|
+
let result409 = null;
|
|
3486
|
+
let resultData409 = _responseText;
|
|
3487
|
+
result409 = JSON.parse(resultData409);
|
|
3488
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3489
|
+
}
|
|
3490
|
+
else if (status === 401) {
|
|
3491
|
+
const _responseText = response.data;
|
|
3492
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3493
|
+
}
|
|
3494
|
+
else if (status === 403) {
|
|
3495
|
+
const _responseText = response.data;
|
|
3496
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3497
|
+
}
|
|
3498
|
+
else if (status !== 200 && status !== 204) {
|
|
3499
|
+
const _responseText = response.data;
|
|
3500
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3501
|
+
}
|
|
3502
|
+
return Promise.resolve(null);
|
|
3503
|
+
}
|
|
3504
|
+
/**
|
|
3505
|
+
* Inserts a new print-product container provided as a json-serialized model to the certain surface in an existing design file.
|
|
3506
|
+
Print-product container identifier will be reset by auto-generated value to prevent identifiers collisions.
|
|
3507
|
+
* @param id Design identifier.
|
|
3508
|
+
* @param surfaceId (optional) Print-product surface identifier.
|
|
3509
|
+
* @param index (optional) Container index within the conatiners list of a surface.
|
|
3510
|
+
* @param top (optional) Y axis position.
|
|
3511
|
+
* @param left (optional) X axis position.
|
|
3512
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3513
|
+
* @param tenantId (optional) Tenant identifier
|
|
3514
|
+
* @param body (optional) Json-serialized model of a new print-product container.
|
|
3515
|
+
* @return Success
|
|
3516
|
+
*/
|
|
3517
|
+
addDesignSurfaceContainerModel(id, surfaceId, index, top, left, privateStorageOwner, tenantId, body, cancelToken) {
|
|
3518
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/containers/model?";
|
|
3519
|
+
if (id === undefined || id === null)
|
|
3520
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3521
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3522
|
+
if (surfaceId !== undefined && surfaceId !== null)
|
|
3523
|
+
url_ += "surfaceId=" + encodeURIComponent("" + surfaceId) + "&";
|
|
3524
|
+
if (index !== undefined && index !== null)
|
|
3525
|
+
url_ += "index=" + encodeURIComponent("" + index) + "&";
|
|
3526
|
+
if (top === null)
|
|
3527
|
+
throw new Error("The parameter 'top' cannot be null.");
|
|
3528
|
+
else if (top !== undefined)
|
|
3529
|
+
url_ += "top=" + encodeURIComponent("" + top) + "&";
|
|
3530
|
+
if (left === null)
|
|
3531
|
+
throw new Error("The parameter 'left' cannot be null.");
|
|
3532
|
+
else if (left !== undefined)
|
|
3533
|
+
url_ += "left=" + encodeURIComponent("" + left) + "&";
|
|
3534
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3535
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3536
|
+
if (tenantId === null)
|
|
3537
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3538
|
+
else if (tenantId !== undefined)
|
|
3539
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3540
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3541
|
+
const content_ = JSON.stringify(body);
|
|
3542
|
+
let options_ = {
|
|
3543
|
+
data: content_,
|
|
3544
|
+
method: "POST",
|
|
3545
|
+
url: url_,
|
|
3546
|
+
headers: {
|
|
3547
|
+
"Content-Type": "application/json",
|
|
3548
|
+
"Accept": "application/json"
|
|
3549
|
+
},
|
|
3550
|
+
cancelToken
|
|
3551
|
+
};
|
|
3552
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3553
|
+
return this.instance.request(transformedOptions_);
|
|
3554
|
+
}).catch((_error) => {
|
|
3555
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3556
|
+
return _error.response;
|
|
3557
|
+
}
|
|
3558
|
+
else {
|
|
3559
|
+
throw _error;
|
|
3560
|
+
}
|
|
3561
|
+
}).then((_response) => {
|
|
3562
|
+
return this.transformResult(url_, _response, (_response) => this.processAddDesignSurfaceContainerModel(_response));
|
|
3563
|
+
});
|
|
3564
|
+
}
|
|
3565
|
+
processAddDesignSurfaceContainerModel(response) {
|
|
3566
|
+
const status = response.status;
|
|
3567
|
+
let _headers = {};
|
|
3568
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3569
|
+
for (let k in response.headers) {
|
|
3570
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3571
|
+
_headers[k] = response.headers[k];
|
|
3572
|
+
}
|
|
3573
|
+
}
|
|
3574
|
+
}
|
|
3575
|
+
if (status === 200) {
|
|
3576
|
+
const _responseText = response.data;
|
|
3577
|
+
let result200 = null;
|
|
3578
|
+
let resultData200 = _responseText;
|
|
3579
|
+
result200 = JSON.parse(resultData200);
|
|
3580
|
+
return Promise.resolve(result200);
|
|
3581
|
+
}
|
|
3582
|
+
else if (status === 400) {
|
|
3583
|
+
const _responseText = response.data;
|
|
3584
|
+
let result400 = null;
|
|
3585
|
+
let resultData400 = _responseText;
|
|
3586
|
+
result400 = JSON.parse(resultData400);
|
|
3587
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
3588
|
+
}
|
|
3589
|
+
else if (status === 404) {
|
|
3590
|
+
const _responseText = response.data;
|
|
3591
|
+
let result404 = null;
|
|
3592
|
+
let resultData404 = _responseText;
|
|
3593
|
+
result404 = JSON.parse(resultData404);
|
|
3594
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3595
|
+
}
|
|
3596
|
+
else if (status === 401) {
|
|
3597
|
+
const _responseText = response.data;
|
|
3598
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3599
|
+
}
|
|
3600
|
+
else if (status === 403) {
|
|
3601
|
+
const _responseText = response.data;
|
|
3602
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3603
|
+
}
|
|
3604
|
+
else if (status !== 200 && status !== 204) {
|
|
3605
|
+
const _responseText = response.data;
|
|
3606
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3607
|
+
}
|
|
3608
|
+
return Promise.resolve(null);
|
|
3609
|
+
}
|
|
3610
|
+
/**
|
|
3611
|
+
* Returns a list of print-product items descriptions of the specified design file.
|
|
3612
|
+
* @param id Design identifier.
|
|
3613
|
+
* @param surfaceId (optional) Print-product surface identifier.
|
|
3614
|
+
* @param containerId (optional) Print-product container identifier.
|
|
3615
|
+
* @param parentItemId (optional) Print-product item identifier.
|
|
3616
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3617
|
+
* @param tenantId (optional) Tenant identifier
|
|
3618
|
+
* @return Success
|
|
3619
|
+
*/
|
|
3620
|
+
getDesignSurfaceItems(id, surfaceId, containerId, parentItemId, privateStorageOwner, tenantId, cancelToken) {
|
|
3621
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/items?";
|
|
3622
|
+
if (id === undefined || id === null)
|
|
3623
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3624
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3625
|
+
if (surfaceId !== undefined && surfaceId !== null)
|
|
3626
|
+
url_ += "surfaceId=" + encodeURIComponent("" + surfaceId) + "&";
|
|
3627
|
+
if (containerId !== undefined && containerId !== null)
|
|
3628
|
+
url_ += "containerId=" + encodeURIComponent("" + containerId) + "&";
|
|
3629
|
+
if (parentItemId !== undefined && parentItemId !== null)
|
|
3630
|
+
url_ += "parentItemId=" + encodeURIComponent("" + parentItemId) + "&";
|
|
3631
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3632
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3633
|
+
if (tenantId === null)
|
|
3634
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3635
|
+
else if (tenantId !== undefined)
|
|
3636
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3637
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3638
|
+
let options_ = {
|
|
3639
|
+
method: "GET",
|
|
3640
|
+
url: url_,
|
|
3641
|
+
headers: {
|
|
3642
|
+
"Accept": "application/json"
|
|
3643
|
+
},
|
|
3644
|
+
cancelToken
|
|
3645
|
+
};
|
|
3646
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3647
|
+
return this.instance.request(transformedOptions_);
|
|
3648
|
+
}).catch((_error) => {
|
|
3649
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3650
|
+
return _error.response;
|
|
3651
|
+
}
|
|
3652
|
+
else {
|
|
3653
|
+
throw _error;
|
|
3654
|
+
}
|
|
3655
|
+
}).then((_response) => {
|
|
3656
|
+
return this.transformResult(url_, _response, (_response) => this.processGetDesignSurfaceItems(_response));
|
|
3657
|
+
});
|
|
3658
|
+
}
|
|
3659
|
+
processGetDesignSurfaceItems(response) {
|
|
3660
|
+
const status = response.status;
|
|
3661
|
+
let _headers = {};
|
|
3662
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3663
|
+
for (let k in response.headers) {
|
|
3664
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3665
|
+
_headers[k] = response.headers[k];
|
|
3666
|
+
}
|
|
3667
|
+
}
|
|
3668
|
+
}
|
|
3669
|
+
if (status === 200) {
|
|
3670
|
+
const _responseText = response.data;
|
|
3671
|
+
let result200 = null;
|
|
3672
|
+
let resultData200 = _responseText;
|
|
3673
|
+
result200 = JSON.parse(resultData200);
|
|
3674
|
+
return Promise.resolve(result200);
|
|
3675
|
+
}
|
|
3676
|
+
else if (status === 404) {
|
|
3677
|
+
const _responseText = response.data;
|
|
3678
|
+
let result404 = null;
|
|
3679
|
+
let resultData404 = _responseText;
|
|
3680
|
+
result404 = JSON.parse(resultData404);
|
|
3681
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3682
|
+
}
|
|
3683
|
+
else if (status === 401) {
|
|
3684
|
+
const _responseText = response.data;
|
|
3685
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3686
|
+
}
|
|
3687
|
+
else if (status === 403) {
|
|
3688
|
+
const _responseText = response.data;
|
|
3689
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3690
|
+
}
|
|
3691
|
+
else if (status !== 200 && status !== 204) {
|
|
3692
|
+
const _responseText = response.data;
|
|
3693
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3694
|
+
}
|
|
3695
|
+
return Promise.resolve(null);
|
|
3696
|
+
}
|
|
3697
|
+
/**
|
|
3698
|
+
* Deletes a specified print-product item in an existing design file.
|
|
3699
|
+
* @param id Design identifier.
|
|
3700
|
+
* @param itemId Print-product item identifier.
|
|
3701
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3702
|
+
* @param tenantId (optional) Tenant identifier
|
|
3703
|
+
* @return No Content
|
|
3704
|
+
*/
|
|
3705
|
+
deleteDesignSurfaceItem(id, itemId, privateStorageOwner, tenantId, cancelToken) {
|
|
3706
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/items/{itemId}?";
|
|
3707
|
+
if (id === undefined || id === null)
|
|
3708
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3709
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3710
|
+
if (itemId === undefined || itemId === null)
|
|
3711
|
+
throw new Error("The parameter 'itemId' must be defined.");
|
|
3712
|
+
url_ = url_.replace("{itemId}", encodeURIComponent("" + itemId));
|
|
3713
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3714
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3715
|
+
if (tenantId === null)
|
|
3716
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3717
|
+
else if (tenantId !== undefined)
|
|
3718
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3719
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3720
|
+
let options_ = {
|
|
3721
|
+
method: "DELETE",
|
|
3722
|
+
url: url_,
|
|
3723
|
+
headers: {},
|
|
3724
|
+
cancelToken
|
|
3725
|
+
};
|
|
3726
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3727
|
+
return this.instance.request(transformedOptions_);
|
|
3728
|
+
}).catch((_error) => {
|
|
3729
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3730
|
+
return _error.response;
|
|
3731
|
+
}
|
|
3732
|
+
else {
|
|
3733
|
+
throw _error;
|
|
3734
|
+
}
|
|
3735
|
+
}).then((_response) => {
|
|
3736
|
+
return this.transformResult(url_, _response, (_response) => this.processDeleteDesignSurfaceItem(_response));
|
|
3737
|
+
});
|
|
3738
|
+
}
|
|
3739
|
+
processDeleteDesignSurfaceItem(response) {
|
|
3740
|
+
const status = response.status;
|
|
3741
|
+
let _headers = {};
|
|
3742
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3743
|
+
for (let k in response.headers) {
|
|
3744
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3745
|
+
_headers[k] = response.headers[k];
|
|
3746
|
+
}
|
|
3747
|
+
}
|
|
3748
|
+
}
|
|
3749
|
+
if (status === 204) {
|
|
3750
|
+
const _responseText = response.data;
|
|
3751
|
+
return Promise.resolve(null);
|
|
3752
|
+
}
|
|
3753
|
+
else if (status === 404) {
|
|
3754
|
+
const _responseText = response.data;
|
|
3755
|
+
let result404 = null;
|
|
3756
|
+
let resultData404 = _responseText;
|
|
3757
|
+
result404 = JSON.parse(resultData404);
|
|
3758
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3759
|
+
}
|
|
3760
|
+
else if (status === 409) {
|
|
3761
|
+
const _responseText = response.data;
|
|
3762
|
+
let result409 = null;
|
|
3763
|
+
let resultData409 = _responseText;
|
|
3764
|
+
result409 = JSON.parse(resultData409);
|
|
3765
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3766
|
+
}
|
|
3767
|
+
else if (status === 401) {
|
|
3768
|
+
const _responseText = response.data;
|
|
3769
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3770
|
+
}
|
|
3771
|
+
else if (status === 403) {
|
|
3772
|
+
const _responseText = response.data;
|
|
3773
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3774
|
+
}
|
|
3775
|
+
else if (status !== 200 && status !== 204) {
|
|
3776
|
+
const _responseText = response.data;
|
|
3777
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3778
|
+
}
|
|
3779
|
+
return Promise.resolve(null);
|
|
3780
|
+
}
|
|
3781
|
+
/**
|
|
3782
|
+
* Returns a print-product item of the specified design file as a json-serialized model.
|
|
3783
|
+
* @param id Design identifier.
|
|
3784
|
+
* @param itemId Print-product item identifier.
|
|
3785
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3786
|
+
* @param tenantId (optional) Tenant identifier
|
|
3787
|
+
* @return Success
|
|
3788
|
+
*/
|
|
3789
|
+
getDesignSurfaceItemModel(id, itemId, privateStorageOwner, tenantId, cancelToken) {
|
|
3790
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/items/{itemId}/model?";
|
|
3791
|
+
if (id === undefined || id === null)
|
|
3792
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3793
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3794
|
+
if (itemId === undefined || itemId === null)
|
|
3795
|
+
throw new Error("The parameter 'itemId' must be defined.");
|
|
3796
|
+
url_ = url_.replace("{itemId}", encodeURIComponent("" + itemId));
|
|
3797
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3798
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3799
|
+
if (tenantId === null)
|
|
3800
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3801
|
+
else if (tenantId !== undefined)
|
|
3802
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3803
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3804
|
+
let options_ = {
|
|
3805
|
+
method: "GET",
|
|
3806
|
+
url: url_,
|
|
3807
|
+
headers: {
|
|
3808
|
+
"Accept": "application/json"
|
|
3809
|
+
},
|
|
3810
|
+
cancelToken
|
|
3811
|
+
};
|
|
3812
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3813
|
+
return this.instance.request(transformedOptions_);
|
|
3814
|
+
}).catch((_error) => {
|
|
3815
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3816
|
+
return _error.response;
|
|
3817
|
+
}
|
|
3818
|
+
else {
|
|
3819
|
+
throw _error;
|
|
3820
|
+
}
|
|
3821
|
+
}).then((_response) => {
|
|
3822
|
+
return this.transformResult(url_, _response, (_response) => this.processGetDesignSurfaceItemModel(_response));
|
|
3823
|
+
});
|
|
3824
|
+
}
|
|
3825
|
+
processGetDesignSurfaceItemModel(response) {
|
|
3826
|
+
const status = response.status;
|
|
3827
|
+
let _headers = {};
|
|
3828
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3829
|
+
for (let k in response.headers) {
|
|
3830
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3831
|
+
_headers[k] = response.headers[k];
|
|
3832
|
+
}
|
|
3833
|
+
}
|
|
3834
|
+
}
|
|
3835
|
+
if (status === 200) {
|
|
3836
|
+
const _responseText = response.data;
|
|
3837
|
+
let result200 = null;
|
|
3838
|
+
let resultData200 = _responseText;
|
|
3839
|
+
result200 = JSON.parse(resultData200);
|
|
3840
|
+
return Promise.resolve(result200);
|
|
3841
|
+
}
|
|
3842
|
+
else if (status === 404) {
|
|
3843
|
+
const _responseText = response.data;
|
|
3844
|
+
let result404 = null;
|
|
3845
|
+
let resultData404 = _responseText;
|
|
3846
|
+
result404 = JSON.parse(resultData404);
|
|
3847
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3848
|
+
}
|
|
3849
|
+
else if (status === 409) {
|
|
3850
|
+
const _responseText = response.data;
|
|
3851
|
+
let result409 = null;
|
|
3852
|
+
let resultData409 = _responseText;
|
|
3853
|
+
result409 = JSON.parse(resultData409);
|
|
3854
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3855
|
+
}
|
|
3856
|
+
else if (status === 401) {
|
|
3857
|
+
const _responseText = response.data;
|
|
3858
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3859
|
+
}
|
|
3860
|
+
else if (status === 403) {
|
|
3861
|
+
const _responseText = response.data;
|
|
3862
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3863
|
+
}
|
|
3864
|
+
else if (status !== 200 && status !== 204) {
|
|
3865
|
+
const _responseText = response.data;
|
|
3866
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3867
|
+
}
|
|
3868
|
+
return Promise.resolve(null);
|
|
3869
|
+
}
|
|
3870
|
+
/**
|
|
3871
|
+
* Updates a specified print-product surface item in an existing design file with the data provided as a json-serialized item model.
|
|
3872
|
+
* @param id Design identifier.
|
|
3873
|
+
* @param itemId Print-product item identifier.
|
|
3874
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3875
|
+
* @param tenantId (optional) Tenant identifier
|
|
3876
|
+
* @param body (optional) Json-serialized model of a print-product item.
|
|
3877
|
+
* @return Success
|
|
3878
|
+
*/
|
|
3879
|
+
updateDesignSurfaceItemModel(id, itemId, privateStorageOwner, tenantId, body, cancelToken) {
|
|
3880
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/items/{itemId}/model?";
|
|
3881
|
+
if (id === undefined || id === null)
|
|
3882
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3883
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3884
|
+
if (itemId === undefined || itemId === null)
|
|
3885
|
+
throw new Error("The parameter 'itemId' must be defined.");
|
|
3886
|
+
url_ = url_.replace("{itemId}", encodeURIComponent("" + itemId));
|
|
3887
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3888
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3889
|
+
if (tenantId === null)
|
|
3890
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3891
|
+
else if (tenantId !== undefined)
|
|
3892
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3893
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3894
|
+
const content_ = JSON.stringify(body);
|
|
3895
|
+
let options_ = {
|
|
3896
|
+
data: content_,
|
|
3897
|
+
method: "PUT",
|
|
3898
|
+
url: url_,
|
|
3899
|
+
headers: {
|
|
3900
|
+
"Content-Type": "application/json",
|
|
3901
|
+
"Accept": "application/json"
|
|
3902
|
+
},
|
|
3903
|
+
cancelToken
|
|
3904
|
+
};
|
|
3905
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3906
|
+
return this.instance.request(transformedOptions_);
|
|
3907
|
+
}).catch((_error) => {
|
|
3908
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3909
|
+
return _error.response;
|
|
3910
|
+
}
|
|
3911
|
+
else {
|
|
3912
|
+
throw _error;
|
|
3913
|
+
}
|
|
3914
|
+
}).then((_response) => {
|
|
3915
|
+
return this.transformResult(url_, _response, (_response) => this.processUpdateDesignSurfaceItemModel(_response));
|
|
3916
|
+
});
|
|
3917
|
+
}
|
|
3918
|
+
processUpdateDesignSurfaceItemModel(response) {
|
|
3919
|
+
const status = response.status;
|
|
3920
|
+
let _headers = {};
|
|
3921
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3922
|
+
for (let k in response.headers) {
|
|
3923
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3924
|
+
_headers[k] = response.headers[k];
|
|
3925
|
+
}
|
|
3926
|
+
}
|
|
3927
|
+
}
|
|
3928
|
+
if (status === 200) {
|
|
3929
|
+
const _responseText = response.data;
|
|
3930
|
+
let result200 = null;
|
|
3931
|
+
let resultData200 = _responseText;
|
|
3932
|
+
result200 = JSON.parse(resultData200);
|
|
3933
|
+
return Promise.resolve(result200);
|
|
3934
|
+
}
|
|
3935
|
+
else if (status === 400) {
|
|
3936
|
+
const _responseText = response.data;
|
|
3937
|
+
let result400 = null;
|
|
3938
|
+
let resultData400 = _responseText;
|
|
3939
|
+
result400 = JSON.parse(resultData400);
|
|
3940
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
3941
|
+
}
|
|
3942
|
+
else if (status === 404) {
|
|
3943
|
+
const _responseText = response.data;
|
|
3944
|
+
let result404 = null;
|
|
3945
|
+
let resultData404 = _responseText;
|
|
3946
|
+
result404 = JSON.parse(resultData404);
|
|
3947
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3948
|
+
}
|
|
3949
|
+
else if (status === 409) {
|
|
3950
|
+
const _responseText = response.data;
|
|
3951
|
+
let result409 = null;
|
|
3952
|
+
let resultData409 = _responseText;
|
|
3953
|
+
result409 = JSON.parse(resultData409);
|
|
3954
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3955
|
+
}
|
|
3956
|
+
else if (status === 401) {
|
|
3957
|
+
const _responseText = response.data;
|
|
3958
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3959
|
+
}
|
|
3960
|
+
else if (status === 403) {
|
|
3961
|
+
const _responseText = response.data;
|
|
3962
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3963
|
+
}
|
|
3964
|
+
else if (status !== 200 && status !== 204) {
|
|
3965
|
+
const _responseText = response.data;
|
|
3966
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3967
|
+
}
|
|
3968
|
+
return Promise.resolve(null);
|
|
3969
|
+
}
|
|
3970
|
+
/**
|
|
3971
|
+
* Inserts a new print-product item provided as a json-serialized model to the specified surface in an existing design file.
|
|
3972
|
+
Item identifier will be reset by auto-generated value to prevent identifiers collisions.
|
|
3973
|
+
* @param id Design identifier.
|
|
3974
|
+
* @param containerId (optional) Parent surface identifier.
|
|
3975
|
+
* @param index (optional) Item index within the items list of a container.
|
|
3976
|
+
* @param top (optional) Y axis position.
|
|
3977
|
+
* @param left (optional) X axis position.
|
|
3978
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3979
|
+
* @param tenantId (optional) Tenant identifier
|
|
3980
|
+
* @param body (optional) Json-serialized model of a new print-product item.
|
|
3981
|
+
* @return Success
|
|
3982
|
+
*/
|
|
3983
|
+
addDesignSurfaceItemModel(id, containerId, index, top, left, privateStorageOwner, tenantId, body, cancelToken) {
|
|
3984
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/items/model?";
|
|
3985
|
+
if (id === undefined || id === null)
|
|
3986
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3987
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3988
|
+
if (containerId !== undefined && containerId !== null)
|
|
3989
|
+
url_ += "containerId=" + encodeURIComponent("" + containerId) + "&";
|
|
3990
|
+
if (index !== undefined && index !== null)
|
|
3991
|
+
url_ += "index=" + encodeURIComponent("" + index) + "&";
|
|
3992
|
+
if (top === null)
|
|
3993
|
+
throw new Error("The parameter 'top' cannot be null.");
|
|
3994
|
+
else if (top !== undefined)
|
|
3995
|
+
url_ += "top=" + encodeURIComponent("" + top) + "&";
|
|
3996
|
+
if (left === null)
|
|
3997
|
+
throw new Error("The parameter 'left' cannot be null.");
|
|
3998
|
+
else if (left !== undefined)
|
|
3999
|
+
url_ += "left=" + encodeURIComponent("" + left) + "&";
|
|
4000
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4001
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
4002
|
+
if (tenantId === null)
|
|
4003
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4004
|
+
else if (tenantId !== undefined)
|
|
4005
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
4006
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4007
|
+
const content_ = JSON.stringify(body);
|
|
4008
|
+
let options_ = {
|
|
4009
|
+
data: content_,
|
|
4010
|
+
method: "POST",
|
|
4011
|
+
url: url_,
|
|
4012
|
+
headers: {
|
|
4013
|
+
"Content-Type": "application/json",
|
|
4014
|
+
"Accept": "application/json"
|
|
4015
|
+
},
|
|
4016
|
+
cancelToken
|
|
4017
|
+
};
|
|
4018
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4019
|
+
return this.instance.request(transformedOptions_);
|
|
4020
|
+
}).catch((_error) => {
|
|
4021
|
+
if (isAxiosError(_error) && _error.response) {
|
|
4022
|
+
return _error.response;
|
|
4023
|
+
}
|
|
4024
|
+
else {
|
|
4025
|
+
throw _error;
|
|
4026
|
+
}
|
|
4027
|
+
}).then((_response) => {
|
|
4028
|
+
return this.transformResult(url_, _response, (_response) => this.processAddDesignSurfaceItemModel(_response));
|
|
4029
|
+
});
|
|
4030
|
+
}
|
|
4031
|
+
processAddDesignSurfaceItemModel(response) {
|
|
4032
|
+
const status = response.status;
|
|
4033
|
+
let _headers = {};
|
|
4034
|
+
if (response.headers && typeof response.headers === "object") {
|
|
4035
|
+
for (let k in response.headers) {
|
|
4036
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
4037
|
+
_headers[k] = response.headers[k];
|
|
4038
|
+
}
|
|
4039
|
+
}
|
|
4040
|
+
}
|
|
4041
|
+
if (status === 200) {
|
|
4042
|
+
const _responseText = response.data;
|
|
4043
|
+
let result200 = null;
|
|
4044
|
+
let resultData200 = _responseText;
|
|
4045
|
+
result200 = JSON.parse(resultData200);
|
|
4046
|
+
return Promise.resolve(result200);
|
|
4047
|
+
}
|
|
4048
|
+
else if (status === 400) {
|
|
4049
|
+
const _responseText = response.data;
|
|
4050
|
+
let result400 = null;
|
|
4051
|
+
let resultData400 = _responseText;
|
|
4052
|
+
result400 = JSON.parse(resultData400);
|
|
4053
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
4054
|
+
}
|
|
4055
|
+
else if (status === 404) {
|
|
4056
|
+
const _responseText = response.data;
|
|
4057
|
+
let result404 = null;
|
|
4058
|
+
let resultData404 = _responseText;
|
|
4059
|
+
result404 = JSON.parse(resultData404);
|
|
4060
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
4061
|
+
}
|
|
4062
|
+
else if (status === 401) {
|
|
4063
|
+
const _responseText = response.data;
|
|
4064
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
4065
|
+
}
|
|
4066
|
+
else if (status === 403) {
|
|
4067
|
+
const _responseText = response.data;
|
|
4068
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
4069
|
+
}
|
|
4070
|
+
else if (status !== 200 && status !== 204) {
|
|
4071
|
+
const _responseText = response.data;
|
|
4072
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4073
|
+
}
|
|
4074
|
+
return Promise.resolve(null);
|
|
4075
|
+
}
|
|
4076
|
+
/**
|
|
4077
|
+
* Returns a print-product of the specified design file as a json-serialized model.
|
|
4078
|
+
* @param id Design identifier.
|
|
4079
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
4080
|
+
* @param tenantId (optional) Tenant identifier
|
|
4081
|
+
* @return Success
|
|
4082
|
+
*/
|
|
4083
|
+
getDesignProductModel(id, privateStorageOwner, tenantId, cancelToken) {
|
|
4084
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/model?";
|
|
4085
|
+
if (id === undefined || id === null)
|
|
4086
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
4087
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4088
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4089
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
4090
|
+
if (tenantId === null)
|
|
4091
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4092
|
+
else if (tenantId !== undefined)
|
|
4093
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
4094
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4095
|
+
let options_ = {
|
|
4096
|
+
method: "GET",
|
|
4097
|
+
url: url_,
|
|
4098
|
+
headers: {
|
|
4099
|
+
"Accept": "application/json"
|
|
4100
|
+
},
|
|
4101
|
+
cancelToken
|
|
4102
|
+
};
|
|
4103
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4104
|
+
return this.instance.request(transformedOptions_);
|
|
4105
|
+
}).catch((_error) => {
|
|
4106
|
+
if (isAxiosError(_error) && _error.response) {
|
|
4107
|
+
return _error.response;
|
|
4108
|
+
}
|
|
4109
|
+
else {
|
|
4110
|
+
throw _error;
|
|
4111
|
+
}
|
|
4112
|
+
}).then((_response) => {
|
|
4113
|
+
return this.transformResult(url_, _response, (_response) => this.processGetDesignProductModel(_response));
|
|
4114
|
+
});
|
|
4115
|
+
}
|
|
4116
|
+
processGetDesignProductModel(response) {
|
|
4117
|
+
const status = response.status;
|
|
4118
|
+
let _headers = {};
|
|
4119
|
+
if (response.headers && typeof response.headers === "object") {
|
|
4120
|
+
for (let k in response.headers) {
|
|
4121
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
4122
|
+
_headers[k] = response.headers[k];
|
|
4123
|
+
}
|
|
4124
|
+
}
|
|
4125
|
+
}
|
|
4126
|
+
if (status === 200) {
|
|
4127
|
+
const _responseText = response.data;
|
|
4128
|
+
let result200 = null;
|
|
4129
|
+
let resultData200 = _responseText;
|
|
4130
|
+
result200 = JSON.parse(resultData200);
|
|
4131
|
+
return Promise.resolve(result200);
|
|
4132
|
+
}
|
|
4133
|
+
else if (status === 404) {
|
|
4134
|
+
const _responseText = response.data;
|
|
4135
|
+
let result404 = null;
|
|
4136
|
+
let resultData404 = _responseText;
|
|
4137
|
+
result404 = JSON.parse(resultData404);
|
|
4138
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
4139
|
+
}
|
|
2782
4140
|
else if (status === 401) {
|
|
2783
4141
|
const _responseText = response.data;
|
|
2784
4142
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -2793,32 +4151,16 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
|
|
|
2793
4151
|
}
|
|
2794
4152
|
return Promise.resolve(null);
|
|
2795
4153
|
}
|
|
2796
|
-
}
|
|
2797
|
-
exports.DesignAtomsMockups3dApiClient = DesignAtomsMockups3dApiClient;
|
|
2798
|
-
class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
2799
|
-
instance;
|
|
2800
|
-
baseUrl;
|
|
2801
|
-
jsonParseReviver = undefined;
|
|
2802
|
-
constructor(configuration, baseUrl, instance) {
|
|
2803
|
-
super(configuration);
|
|
2804
|
-
this.instance = instance ? instance : axios_1.create();
|
|
2805
|
-
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
2806
|
-
}
|
|
2807
4154
|
/**
|
|
2808
|
-
*
|
|
4155
|
+
* Updates a print-product provided as a json-serialized model is the specified design file.
|
|
2809
4156
|
* @param id Design identifier.
|
|
2810
4157
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
2811
4158
|
* @param tenantId (optional) Tenant identifier
|
|
2812
|
-
* @param
|
|
2813
|
-
* @param replaceImageItemFileInfo_itemName (optional)
|
|
2814
|
-
* @param replaceImageItemFileInfo_sourceFile (optional)
|
|
2815
|
-
* @param replacePlaceholderItemContentInfo_placeholderItemName (optional)
|
|
2816
|
-
* @param replacePlaceholderItemContentInfo_newContentType (optional)
|
|
2817
|
-
* @param replacePlaceholderItemContentInfo_sourceFile (optional)
|
|
4159
|
+
* @param body (optional) Json-serialized model of a print-product .
|
|
2818
4160
|
* @return No Content
|
|
2819
4161
|
*/
|
|
2820
|
-
|
|
2821
|
-
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product?";
|
|
4162
|
+
updateDesignProductModel(id, privateStorageOwner, tenantId, body, cancelToken) {
|
|
4163
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/model?";
|
|
2822
4164
|
if (id === undefined || id === null)
|
|
2823
4165
|
throw new Error("The parameter 'id' must be defined.");
|
|
2824
4166
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
@@ -2829,28 +4171,14 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
2829
4171
|
else if (tenantId !== undefined)
|
|
2830
4172
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2831
4173
|
url_ = url_.replace(/[?&]$/, "");
|
|
2832
|
-
const content_ =
|
|
2833
|
-
if (patchType === null || patchType === undefined)
|
|
2834
|
-
throw new Error("The parameter 'patchType' cannot be null.");
|
|
2835
|
-
else
|
|
2836
|
-
content_.append("patchType", patchType.toString());
|
|
2837
|
-
if (replaceImageItemFileInfo_itemName !== null && replaceImageItemFileInfo_itemName !== undefined)
|
|
2838
|
-
content_.append("replaceImageItemFileInfo.itemName", replaceImageItemFileInfo_itemName.toString());
|
|
2839
|
-
if (replaceImageItemFileInfo_sourceFile !== null && replaceImageItemFileInfo_sourceFile !== undefined)
|
|
2840
|
-
content_.append("replaceImageItemFileInfo.sourceFile", replaceImageItemFileInfo_sourceFile.data, replaceImageItemFileInfo_sourceFile.fileName ? replaceImageItemFileInfo_sourceFile.fileName : "replaceImageItemFileInfo.sourceFile");
|
|
2841
|
-
if (replacePlaceholderItemContentInfo_placeholderItemName !== null && replacePlaceholderItemContentInfo_placeholderItemName !== undefined)
|
|
2842
|
-
content_.append("replacePlaceholderItemContentInfo.placeholderItemName", replacePlaceholderItemContentInfo_placeholderItemName.toString());
|
|
2843
|
-
if (replacePlaceholderItemContentInfo_newContentType === null || replacePlaceholderItemContentInfo_newContentType === undefined)
|
|
2844
|
-
throw new Error("The parameter 'replacePlaceholderItemContentInfo_newContentType' cannot be null.");
|
|
2845
|
-
else
|
|
2846
|
-
content_.append("replacePlaceholderItemContentInfo.newContentType", replacePlaceholderItemContentInfo_newContentType.toString());
|
|
2847
|
-
if (replacePlaceholderItemContentInfo_sourceFile !== null && replacePlaceholderItemContentInfo_sourceFile !== undefined)
|
|
2848
|
-
content_.append("replacePlaceholderItemContentInfo.sourceFile", replacePlaceholderItemContentInfo_sourceFile.data, replacePlaceholderItemContentInfo_sourceFile.fileName ? replacePlaceholderItemContentInfo_sourceFile.fileName : "replacePlaceholderItemContentInfo.sourceFile");
|
|
4174
|
+
const content_ = JSON.stringify(body);
|
|
2849
4175
|
let options_ = {
|
|
2850
4176
|
data: content_,
|
|
2851
|
-
method: "
|
|
4177
|
+
method: "PUT",
|
|
2852
4178
|
url: url_,
|
|
2853
|
-
headers: {
|
|
4179
|
+
headers: {
|
|
4180
|
+
"Content-Type": "application/json",
|
|
4181
|
+
},
|
|
2854
4182
|
cancelToken
|
|
2855
4183
|
};
|
|
2856
4184
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
@@ -2863,10 +4191,10 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
2863
4191
|
throw _error;
|
|
2864
4192
|
}
|
|
2865
4193
|
}).then((_response) => {
|
|
2866
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
4194
|
+
return this.transformResult(url_, _response, (_response) => this.processUpdateDesignProductModel(_response));
|
|
2867
4195
|
});
|
|
2868
4196
|
}
|
|
2869
|
-
|
|
4197
|
+
processUpdateDesignProductModel(response) {
|
|
2870
4198
|
const status = response.status;
|
|
2871
4199
|
let _headers = {};
|
|
2872
4200
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -2902,17 +4230,20 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
2902
4230
|
return Promise.resolve(null);
|
|
2903
4231
|
}
|
|
2904
4232
|
/**
|
|
2905
|
-
* Returns a print-
|
|
4233
|
+
* Returns a list of print-area descriptions of the specified design file.
|
|
2906
4234
|
* @param id Design identifier.
|
|
4235
|
+
* @param surfaceId (optional)
|
|
2907
4236
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
2908
4237
|
* @param tenantId (optional) Tenant identifier
|
|
2909
4238
|
* @return Success
|
|
2910
4239
|
*/
|
|
2911
|
-
|
|
2912
|
-
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/
|
|
4240
|
+
getDesignPrintAreas(id, surfaceId, privateStorageOwner, tenantId, cancelToken) {
|
|
4241
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/print-areas?";
|
|
2913
4242
|
if (id === undefined || id === null)
|
|
2914
4243
|
throw new Error("The parameter 'id' must be defined.");
|
|
2915
4244
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4245
|
+
if (surfaceId !== undefined && surfaceId !== null)
|
|
4246
|
+
url_ += "surfaceId=" + encodeURIComponent("" + surfaceId) + "&";
|
|
2916
4247
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
2917
4248
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
2918
4249
|
if (tenantId === null)
|
|
@@ -2938,10 +4269,10 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
2938
4269
|
throw _error;
|
|
2939
4270
|
}
|
|
2940
4271
|
}).then((_response) => {
|
|
2941
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
4272
|
+
return this.transformResult(url_, _response, (_response) => this.processGetDesignPrintAreas(_response));
|
|
2942
4273
|
});
|
|
2943
4274
|
}
|
|
2944
|
-
|
|
4275
|
+
processGetDesignPrintAreas(response) {
|
|
2945
4276
|
const status = response.status;
|
|
2946
4277
|
let _headers = {};
|
|
2947
4278
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -2980,15 +4311,16 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
2980
4311
|
return Promise.resolve(null);
|
|
2981
4312
|
}
|
|
2982
4313
|
/**
|
|
2983
|
-
*
|
|
4314
|
+
* Inserts a new print-area created by the description at the specified position in an existing design file.
|
|
4315
|
+
Print-area identifier will be reset by auto-generated value to prevent identifiers collisions.
|
|
2984
4316
|
* @param id Design identifier.
|
|
2985
4317
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
2986
4318
|
* @param tenantId (optional) Tenant identifier
|
|
2987
|
-
* @param body (optional)
|
|
2988
|
-
* @return
|
|
4319
|
+
* @param body (optional) Print-area description model.
|
|
4320
|
+
* @return Success
|
|
2989
4321
|
*/
|
|
2990
|
-
|
|
2991
|
-
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/
|
|
4322
|
+
addDesignPrintArea(id, privateStorageOwner, tenantId, body, cancelToken) {
|
|
4323
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/print-areas?";
|
|
2992
4324
|
if (id === undefined || id === null)
|
|
2993
4325
|
throw new Error("The parameter 'id' must be defined.");
|
|
2994
4326
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
@@ -3002,10 +4334,11 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3002
4334
|
const content_ = JSON.stringify(body);
|
|
3003
4335
|
let options_ = {
|
|
3004
4336
|
data: content_,
|
|
3005
|
-
method: "
|
|
4337
|
+
method: "POST",
|
|
3006
4338
|
url: url_,
|
|
3007
4339
|
headers: {
|
|
3008
4340
|
"Content-Type": "application/json",
|
|
4341
|
+
"Accept": "application/json"
|
|
3009
4342
|
},
|
|
3010
4343
|
cancelToken
|
|
3011
4344
|
};
|
|
@@ -3019,10 +4352,10 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3019
4352
|
throw _error;
|
|
3020
4353
|
}
|
|
3021
4354
|
}).then((_response) => {
|
|
3022
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
4355
|
+
return this.transformResult(url_, _response, (_response) => this.processAddDesignPrintArea(_response));
|
|
3023
4356
|
});
|
|
3024
4357
|
}
|
|
3025
|
-
|
|
4358
|
+
processAddDesignPrintArea(response) {
|
|
3026
4359
|
const status = response.status;
|
|
3027
4360
|
let _headers = {};
|
|
3028
4361
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -3032,9 +4365,19 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3032
4365
|
}
|
|
3033
4366
|
}
|
|
3034
4367
|
}
|
|
3035
|
-
if (status ===
|
|
4368
|
+
if (status === 200) {
|
|
3036
4369
|
const _responseText = response.data;
|
|
3037
|
-
|
|
4370
|
+
let result200 = null;
|
|
4371
|
+
let resultData200 = _responseText;
|
|
4372
|
+
result200 = JSON.parse(resultData200);
|
|
4373
|
+
return Promise.resolve(result200);
|
|
4374
|
+
}
|
|
4375
|
+
else if (status === 400) {
|
|
4376
|
+
const _responseText = response.data;
|
|
4377
|
+
let result400 = null;
|
|
4378
|
+
let resultData400 = _responseText;
|
|
4379
|
+
result400 = JSON.parse(resultData400);
|
|
4380
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
3038
4381
|
}
|
|
3039
4382
|
else if (status === 404) {
|
|
3040
4383
|
const _responseText = response.data;
|
|
@@ -3058,20 +4401,22 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3058
4401
|
return Promise.resolve(null);
|
|
3059
4402
|
}
|
|
3060
4403
|
/**
|
|
3061
|
-
*
|
|
4404
|
+
* Updates a specified print-area using a description in an existing design file.
|
|
3062
4405
|
* @param id Design identifier.
|
|
3063
|
-
* @param
|
|
4406
|
+
* @param printAreaId Design print-area identifier.
|
|
3064
4407
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3065
4408
|
* @param tenantId (optional) Tenant identifier
|
|
4409
|
+
* @param body (optional) Print-area description model.
|
|
3066
4410
|
* @return Success
|
|
3067
4411
|
*/
|
|
3068
|
-
|
|
3069
|
-
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/print-areas?";
|
|
4412
|
+
updateDesignPrintArea(id, printAreaId, privateStorageOwner, tenantId, body, cancelToken) {
|
|
4413
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/print-areas/{printAreaId}?";
|
|
3070
4414
|
if (id === undefined || id === null)
|
|
3071
4415
|
throw new Error("The parameter 'id' must be defined.");
|
|
3072
4416
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3073
|
-
if (
|
|
3074
|
-
|
|
4417
|
+
if (printAreaId === undefined || printAreaId === null)
|
|
4418
|
+
throw new Error("The parameter 'printAreaId' must be defined.");
|
|
4419
|
+
url_ = url_.replace("{printAreaId}", encodeURIComponent("" + printAreaId));
|
|
3075
4420
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3076
4421
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3077
4422
|
if (tenantId === null)
|
|
@@ -3079,10 +4424,13 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3079
4424
|
else if (tenantId !== undefined)
|
|
3080
4425
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3081
4426
|
url_ = url_.replace(/[?&]$/, "");
|
|
4427
|
+
const content_ = JSON.stringify(body);
|
|
3082
4428
|
let options_ = {
|
|
3083
|
-
|
|
4429
|
+
data: content_,
|
|
4430
|
+
method: "PUT",
|
|
3084
4431
|
url: url_,
|
|
3085
4432
|
headers: {
|
|
4433
|
+
"Content-Type": "application/json",
|
|
3086
4434
|
"Accept": "application/json"
|
|
3087
4435
|
},
|
|
3088
4436
|
cancelToken
|
|
@@ -3097,10 +4445,10 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3097
4445
|
throw _error;
|
|
3098
4446
|
}
|
|
3099
4447
|
}).then((_response) => {
|
|
3100
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
4448
|
+
return this.transformResult(url_, _response, (_response) => this.processUpdateDesignPrintArea(_response));
|
|
3101
4449
|
});
|
|
3102
4450
|
}
|
|
3103
|
-
|
|
4451
|
+
processUpdateDesignPrintArea(response) {
|
|
3104
4452
|
const status = response.status;
|
|
3105
4453
|
let _headers = {};
|
|
3106
4454
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -3117,6 +4465,13 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3117
4465
|
result200 = JSON.parse(resultData200);
|
|
3118
4466
|
return Promise.resolve(result200);
|
|
3119
4467
|
}
|
|
4468
|
+
else if (status === 400) {
|
|
4469
|
+
const _responseText = response.data;
|
|
4470
|
+
let result400 = null;
|
|
4471
|
+
let resultData400 = _responseText;
|
|
4472
|
+
result400 = JSON.parse(resultData400);
|
|
4473
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
4474
|
+
}
|
|
3120
4475
|
else if (status === 404) {
|
|
3121
4476
|
const _responseText = response.data;
|
|
3122
4477
|
let result404 = null;
|
|
@@ -3124,6 +4479,13 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3124
4479
|
result404 = JSON.parse(resultData404);
|
|
3125
4480
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3126
4481
|
}
|
|
4482
|
+
else if (status === 409) {
|
|
4483
|
+
const _responseText = response.data;
|
|
4484
|
+
let result409 = null;
|
|
4485
|
+
let resultData409 = _responseText;
|
|
4486
|
+
result409 = JSON.parse(resultData409);
|
|
4487
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
4488
|
+
}
|
|
3127
4489
|
else if (status === 401) {
|
|
3128
4490
|
const _responseText = response.data;
|
|
3129
4491
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -3317,7 +4679,7 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3317
4679
|
* @param printAreaId Design print-area identifier.
|
|
3318
4680
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3319
4681
|
* @param tenantId (optional) Tenant identifier
|
|
3320
|
-
* @param body (optional)
|
|
4682
|
+
* @param body (optional) Json-serialized model of a print-area.
|
|
3321
4683
|
* @return Success
|
|
3322
4684
|
*/
|
|
3323
4685
|
updateDesignPrintAreaModel(id, printAreaId, privateStorageOwner, tenantId, body, cancelToken) {
|
|
@@ -3418,7 +4780,7 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3418
4780
|
* @param surfaceId (optional) Parent surface identifier.
|
|
3419
4781
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3420
4782
|
* @param tenantId (optional) Tenant identifier
|
|
3421
|
-
* @param body (optional)
|
|
4783
|
+
* @param body (optional) Json serialized model of a print-area.
|
|
3422
4784
|
* @return Success
|
|
3423
4785
|
*/
|
|
3424
4786
|
addDesignPrintAreaModel(id, surfaceId, privateStorageOwner, tenantId, body, cancelToken) {
|
|
@@ -3585,7 +4947,7 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3585
4947
|
/**
|
|
3586
4948
|
* Deletes a specified print-product surface in an existing design file.
|
|
3587
4949
|
* @param id Design identifier.
|
|
3588
|
-
* @param surfaceId
|
|
4950
|
+
* @param surfaceId Print-product surface identifier.
|
|
3589
4951
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3590
4952
|
* @param tenantId (optional) Tenant identifier
|
|
3591
4953
|
* @return No Content
|
|
@@ -3667,9 +5029,9 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3667
5029
|
return Promise.resolve(null);
|
|
3668
5030
|
}
|
|
3669
5031
|
/**
|
|
3670
|
-
* Returns a down-mockup description of the specified surface in an existing design file.
|
|
5032
|
+
* Returns a down-mockup description of the specified print-product surface in an existing design file.
|
|
3671
5033
|
* @param id Design identifier.
|
|
3672
|
-
* @param surfaceId
|
|
5034
|
+
* @param surfaceId Print product surface identifier.
|
|
3673
5035
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3674
5036
|
* @param tenantId (optional) Tenant identifier
|
|
3675
5037
|
* @return Success
|
|
@@ -3763,9 +5125,9 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3763
5125
|
return Promise.resolve(null);
|
|
3764
5126
|
}
|
|
3765
5127
|
/**
|
|
3766
|
-
* Updates a content file of down-mockup for the specified surface in an existing design file.
|
|
5128
|
+
* Updates a content file of down-mockup for the specified print-product surface in an existing design file.
|
|
3767
5129
|
* @param id Design identifier.
|
|
3768
|
-
* @param surfaceId
|
|
5130
|
+
* @param surfaceId Print-product surface identifier.
|
|
3769
5131
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3770
5132
|
* @param tenantId (optional) Tenant identifier
|
|
3771
5133
|
* @param position_top (optional)
|
|
@@ -3874,9 +5236,9 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3874
5236
|
return Promise.resolve(null);
|
|
3875
5237
|
}
|
|
3876
5238
|
/**
|
|
3877
|
-
* Returns a content file for down-mockup of the specified surface in an existing design file.
|
|
5239
|
+
* Returns a content file for down-mockup of the specified print-product surface in an existing design file.
|
|
3878
5240
|
* @param id Design identifier.
|
|
3879
|
-
* @param surfaceId
|
|
5241
|
+
* @param surfaceId Print-product surface identifier.
|
|
3880
5242
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3881
5243
|
* @param tenantId (optional) Tenant identifier
|
|
3882
5244
|
* @return Success
|
|
@@ -3901,7 +5263,7 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3901
5263
|
method: "GET",
|
|
3902
5264
|
url: url_,
|
|
3903
5265
|
headers: {
|
|
3904
|
-
"Accept": "application/
|
|
5266
|
+
"Accept": "application/octet-stream"
|
|
3905
5267
|
},
|
|
3906
5268
|
cancelToken
|
|
3907
5269
|
};
|
|
@@ -3970,9 +5332,9 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
3970
5332
|
return Promise.resolve(null);
|
|
3971
5333
|
}
|
|
3972
5334
|
/**
|
|
3973
|
-
* Returns an up-mockup description of the specified surface in an existing design file.
|
|
5335
|
+
* Returns an up-mockup description of the specified print-product surface in an existing design file.
|
|
3974
5336
|
* @param id Design identifier.
|
|
3975
|
-
* @param surfaceId
|
|
5337
|
+
* @param surfaceId Print-product surface identifier.
|
|
3976
5338
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3977
5339
|
* @param tenantId (optional) Tenant identifier
|
|
3978
5340
|
* @return Success
|
|
@@ -4066,9 +5428,9 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
4066
5428
|
return Promise.resolve(null);
|
|
4067
5429
|
}
|
|
4068
5430
|
/**
|
|
4069
|
-
* Updates a content file of up-mockup for the specified surface in an existing design.
|
|
5431
|
+
* Updates a content file of up-mockup for the specified print-product surface in an existing design.
|
|
4070
5432
|
* @param id Design identifier.
|
|
4071
|
-
* @param surfaceId
|
|
5433
|
+
* @param surfaceId Print-product surface identifier.
|
|
4072
5434
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
4073
5435
|
* @param tenantId (optional) Tenant identifier
|
|
4074
5436
|
* @param position_top (optional)
|
|
@@ -4177,9 +5539,9 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
4177
5539
|
return Promise.resolve(null);
|
|
4178
5540
|
}
|
|
4179
5541
|
/**
|
|
4180
|
-
* Returns a content file for up-mockup of the specified surface in an existing design file.
|
|
5542
|
+
* Returns a content file for up-mockup of the specified print-product surface in an existing design file.
|
|
4181
5543
|
* @param id Design identifier.
|
|
4182
|
-
* @param surfaceId
|
|
5544
|
+
* @param surfaceId Print-product surface identifier.
|
|
4183
5545
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
4184
5546
|
* @param tenantId (optional) Tenant identifier
|
|
4185
5547
|
* @return Success
|
|
@@ -4204,7 +5566,7 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
4204
5566
|
method: "GET",
|
|
4205
5567
|
url: url_,
|
|
4206
5568
|
headers: {
|
|
4207
|
-
"Accept": "application/
|
|
5569
|
+
"Accept": "application/octet-stream"
|
|
4208
5570
|
},
|
|
4209
5571
|
cancelToken
|
|
4210
5572
|
};
|
|
@@ -4237,10 +5599,6 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
4237
5599
|
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
4238
5600
|
return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
|
|
4239
5601
|
}
|
|
4240
|
-
else if (status === 204) {
|
|
4241
|
-
const _responseText = response.data;
|
|
4242
|
-
return throwException("No Content", status, _responseText, _headers);
|
|
4243
|
-
}
|
|
4244
5602
|
else if (status === 400) {
|
|
4245
5603
|
const _responseText = response.data;
|
|
4246
5604
|
let result400 = null;
|
|
@@ -4367,12 +5725,12 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
4367
5725
|
}
|
|
4368
5726
|
/**
|
|
4369
5727
|
* Replaces a specified print-product surface in an existing design file with the data provided as a json-serialized surface model.
|
|
4370
|
-
All identifiers
|
|
5728
|
+
All design elements identifiers within the surface (including surface identifier) will be reset by auto-generated values to prevent identifiers collisions.
|
|
4371
5729
|
* @param id Design identifier.
|
|
4372
|
-
* @param surfaceId
|
|
5730
|
+
* @param surfaceId Print-product surface identifier.
|
|
4373
5731
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
4374
5732
|
* @param tenantId (optional) Tenant identifier
|
|
4375
|
-
* @param body (optional)
|
|
5733
|
+
* @param body (optional) Json-serialized model of a print-product surface.
|
|
4376
5734
|
* @return Success
|
|
4377
5735
|
*/
|
|
4378
5736
|
replaceDesignSurfaceModel(id, surfaceId, privateStorageOwner, tenantId, body, cancelToken) {
|
|
@@ -4468,23 +5826,21 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
4468
5826
|
}
|
|
4469
5827
|
/**
|
|
4470
5828
|
* Inserts a new surface provided as a json-serialized model at the specified position in an existing design file.
|
|
4471
|
-
All identifiers
|
|
5829
|
+
All design elements identifiers within the surface (including surface identifier) will be reset by auto-generated values to prevent identifiers collisions.
|
|
4472
5830
|
* @param id Design identifier.
|
|
4473
|
-
* @param
|
|
5831
|
+
* @param index (optional) Surface index within the surfaces list of a design.
|
|
4474
5832
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
4475
5833
|
* @param tenantId (optional) Tenant identifier
|
|
4476
|
-
* @param body (optional)
|
|
5834
|
+
* @param body (optional) Json-serialized model of a print-prouduct surface.
|
|
4477
5835
|
* @return Success
|
|
4478
5836
|
*/
|
|
4479
|
-
addDesignSurfaceModel(id,
|
|
5837
|
+
addDesignSurfaceModel(id, index, privateStorageOwner, tenantId, body, cancelToken) {
|
|
4480
5838
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/surfaces/model?";
|
|
4481
5839
|
if (id === undefined || id === null)
|
|
4482
5840
|
throw new Error("The parameter 'id' must be defined.");
|
|
4483
5841
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4484
|
-
if (
|
|
4485
|
-
|
|
4486
|
-
else if (surfaceIndex !== undefined)
|
|
4487
|
-
url_ += "surfaceIndex=" + encodeURIComponent("" + surfaceIndex) + "&";
|
|
5842
|
+
if (index !== undefined && index !== null)
|
|
5843
|
+
url_ += "index=" + encodeURIComponent("" + index) + "&";
|
|
4488
5844
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4489
5845
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
4490
5846
|
if (tenantId === null)
|
|
@@ -4572,6 +5928,74 @@ class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
4572
5928
|
this.instance = instance ? instance : axios_1.create();
|
|
4573
5929
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
4574
5930
|
}
|
|
5931
|
+
/**
|
|
5932
|
+
* Apply effects to print-product item image.
|
|
5933
|
+
* @param tenantId (optional) Tenant identifier
|
|
5934
|
+
* @param body (optional)
|
|
5935
|
+
* @return Success
|
|
5936
|
+
*/
|
|
5937
|
+
applyItemEffects(tenantId, body, cancelToken) {
|
|
5938
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/print-product/items/apply-effects?";
|
|
5939
|
+
if (tenantId === null)
|
|
5940
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
5941
|
+
else if (tenantId !== undefined)
|
|
5942
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
5943
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
5944
|
+
const content_ = JSON.stringify(body);
|
|
5945
|
+
let options_ = {
|
|
5946
|
+
data: content_,
|
|
5947
|
+
method: "POST",
|
|
5948
|
+
url: url_,
|
|
5949
|
+
headers: {
|
|
5950
|
+
"Content-Type": "application/json",
|
|
5951
|
+
"Accept": "application/json"
|
|
5952
|
+
},
|
|
5953
|
+
cancelToken
|
|
5954
|
+
};
|
|
5955
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5956
|
+
return this.instance.request(transformedOptions_);
|
|
5957
|
+
}).catch((_error) => {
|
|
5958
|
+
if (isAxiosError(_error) && _error.response) {
|
|
5959
|
+
return _error.response;
|
|
5960
|
+
}
|
|
5961
|
+
else {
|
|
5962
|
+
throw _error;
|
|
5963
|
+
}
|
|
5964
|
+
}).then((_response) => {
|
|
5965
|
+
return this.transformResult(url_, _response, (_response) => this.processApplyItemEffects(_response));
|
|
5966
|
+
});
|
|
5967
|
+
}
|
|
5968
|
+
processApplyItemEffects(response) {
|
|
5969
|
+
const status = response.status;
|
|
5970
|
+
let _headers = {};
|
|
5971
|
+
if (response.headers && typeof response.headers === "object") {
|
|
5972
|
+
for (let k in response.headers) {
|
|
5973
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
5974
|
+
_headers[k] = response.headers[k];
|
|
5975
|
+
}
|
|
5976
|
+
}
|
|
5977
|
+
}
|
|
5978
|
+
if (status === 200) {
|
|
5979
|
+
const _responseText = response.data;
|
|
5980
|
+
let result200 = null;
|
|
5981
|
+
let resultData200 = _responseText;
|
|
5982
|
+
result200 = JSON.parse(resultData200);
|
|
5983
|
+
return Promise.resolve(result200);
|
|
5984
|
+
}
|
|
5985
|
+
else if (status === 401) {
|
|
5986
|
+
const _responseText = response.data;
|
|
5987
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
5988
|
+
}
|
|
5989
|
+
else if (status === 403) {
|
|
5990
|
+
const _responseText = response.data;
|
|
5991
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
5992
|
+
}
|
|
5993
|
+
else if (status !== 200 && status !== 204) {
|
|
5994
|
+
const _responseText = response.data;
|
|
5995
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5996
|
+
}
|
|
5997
|
+
return Promise.resolve(null);
|
|
5998
|
+
}
|
|
4575
5999
|
/**
|
|
4576
6000
|
* Extracts print-product item image.
|
|
4577
6001
|
* @param tenantId (optional) Tenant identifier
|
|
@@ -4642,12 +6066,15 @@ class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
4642
6066
|
}
|
|
4643
6067
|
/**
|
|
4644
6068
|
* Flattens print-product items.
|
|
6069
|
+
* @param paletteUID (optional)
|
|
4645
6070
|
* @param tenantId (optional) Tenant identifier
|
|
4646
6071
|
* @param body (optional) List of print-product items to flatten.
|
|
4647
6072
|
* @return Success
|
|
4648
6073
|
*/
|
|
4649
|
-
flattenItems(tenantId, body, cancelToken) {
|
|
6074
|
+
flattenItems(paletteUID, tenantId, body, cancelToken) {
|
|
4650
6075
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/print-product/items/flatten?";
|
|
6076
|
+
if (paletteUID !== undefined && paletteUID !== null)
|
|
6077
|
+
url_ += "paletteUID=" + encodeURIComponent("" + paletteUID) + "&";
|
|
4651
6078
|
if (tenantId === null)
|
|
4652
6079
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4653
6080
|
else if (tenantId !== undefined)
|
|
@@ -4713,9 +6140,11 @@ class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
4713
6140
|
* @param itemType (optional) Desired item type.
|
|
4714
6141
|
* @param tenantId (optional) Tenant identifier
|
|
4715
6142
|
* @param sourceFile (optional)
|
|
6143
|
+
* @param paletteUID (optional)
|
|
6144
|
+
* @param preserveOriginalFile (optional)
|
|
4716
6145
|
* @return Success
|
|
4717
6146
|
*/
|
|
4718
|
-
createItemFromFile(itemType, tenantId, sourceFile, cancelToken) {
|
|
6147
|
+
createItemFromFile(itemType, tenantId, sourceFile, paletteUID, preserveOriginalFile, cancelToken) {
|
|
4719
6148
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/print-product/items/from-file?";
|
|
4720
6149
|
if (itemType !== undefined && itemType !== null)
|
|
4721
6150
|
url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
|
|
@@ -4727,6 +6156,10 @@ class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
4727
6156
|
const content_ = new FormData();
|
|
4728
6157
|
if (sourceFile !== null && sourceFile !== undefined)
|
|
4729
6158
|
content_.append("sourceFile", sourceFile.data, sourceFile.fileName ? sourceFile.fileName : "sourceFile");
|
|
6159
|
+
if (paletteUID !== null && paletteUID !== undefined)
|
|
6160
|
+
content_.append("paletteUID", paletteUID.toString());
|
|
6161
|
+
if (preserveOriginalFile !== null && preserveOriginalFile !== undefined)
|
|
6162
|
+
content_.append("preserveOriginalFile", preserveOriginalFile.toString());
|
|
4730
6163
|
let options_ = {
|
|
4731
6164
|
data: content_,
|
|
4732
6165
|
method: "POST",
|
|
@@ -4799,9 +6232,11 @@ class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
4799
6232
|
* @param itemType (optional) Desired print-product items type.
|
|
4800
6233
|
* @param tenantId (optional) Tenant identifier
|
|
4801
6234
|
* @param sourceFiles (optional)
|
|
6235
|
+
* @param paletteUID (optional)
|
|
6236
|
+
* @param preserveOriginalFile (optional)
|
|
4802
6237
|
* @return Success
|
|
4803
6238
|
*/
|
|
4804
|
-
batchCreateItemsFromFile(itemType, tenantId, sourceFiles, cancelToken) {
|
|
6239
|
+
batchCreateItemsFromFile(itemType, tenantId, sourceFiles, paletteUID, preserveOriginalFile, cancelToken) {
|
|
4805
6240
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/print-product/items/from-file/batch-create?";
|
|
4806
6241
|
if (itemType !== undefined && itemType !== null)
|
|
4807
6242
|
url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
|
|
@@ -4813,6 +6248,10 @@ class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
|
4813
6248
|
const content_ = new FormData();
|
|
4814
6249
|
if (sourceFiles !== null && sourceFiles !== undefined)
|
|
4815
6250
|
sourceFiles.forEach(item_ => content_.append("sourceFiles", item_.data, item_.fileName ? item_.fileName : "sourceFiles"));
|
|
6251
|
+
if (paletteUID !== null && paletteUID !== undefined)
|
|
6252
|
+
content_.append("paletteUID", paletteUID.toString());
|
|
6253
|
+
if (preserveOriginalFile !== null && preserveOriginalFile !== undefined)
|
|
6254
|
+
content_.append("preserveOriginalFile", preserveOriginalFile.toString());
|
|
4816
6255
|
let options_ = {
|
|
4817
6256
|
data: content_,
|
|
4818
6257
|
method: "POST",
|
|
@@ -5288,6 +6727,13 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
5288
6727
|
result201 = JSON.parse(resultData201);
|
|
5289
6728
|
return Promise.resolve(result201);
|
|
5290
6729
|
}
|
|
6730
|
+
else if (status === 409) {
|
|
6731
|
+
const _responseText = response.data;
|
|
6732
|
+
let result409 = null;
|
|
6733
|
+
let resultData409 = _responseText;
|
|
6734
|
+
result409 = JSON.parse(resultData409);
|
|
6735
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
6736
|
+
}
|
|
5291
6737
|
else if (status === 401) {
|
|
5292
6738
|
const _responseText = response.data;
|
|
5293
6739
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -6479,6 +7925,13 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
6479
7925
|
result200 = JSON.parse(resultData200);
|
|
6480
7926
|
return Promise.resolve(result200);
|
|
6481
7927
|
}
|
|
7928
|
+
else if (status === 404) {
|
|
7929
|
+
const _responseText = response.data;
|
|
7930
|
+
let result404 = null;
|
|
7931
|
+
let resultData404 = _responseText;
|
|
7932
|
+
result404 = JSON.parse(resultData404);
|
|
7933
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
7934
|
+
}
|
|
6482
7935
|
else if (status === 409) {
|
|
6483
7936
|
const _responseText = response.data;
|
|
6484
7937
|
let result409 = null;
|
|
@@ -6558,6 +8011,13 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
6558
8011
|
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
6559
8012
|
return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
|
|
6560
8013
|
}
|
|
8014
|
+
else if (status === 404) {
|
|
8015
|
+
const _responseText = response.data;
|
|
8016
|
+
let result404 = null;
|
|
8017
|
+
let resultData404 = _responseText;
|
|
8018
|
+
result404 = JSON.parse(resultData404);
|
|
8019
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
8020
|
+
}
|
|
6561
8021
|
else if (status === 401) {
|
|
6562
8022
|
const _responseText = response.data;
|
|
6563
8023
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -7475,6 +8935,13 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
7475
8935
|
result200 = JSON.parse(resultData200);
|
|
7476
8936
|
return Promise.resolve(result200);
|
|
7477
8937
|
}
|
|
8938
|
+
else if (status === 400) {
|
|
8939
|
+
const _responseText = response.data;
|
|
8940
|
+
let result400 = null;
|
|
8941
|
+
let resultData400 = _responseText;
|
|
8942
|
+
result400 = JSON.parse(resultData400);
|
|
8943
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
8944
|
+
}
|
|
7478
8945
|
else if (status === 401) {
|
|
7479
8946
|
const _responseText = response.data;
|
|
7480
8947
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -7542,6 +9009,13 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
7542
9009
|
result200 = JSON.parse(resultData200);
|
|
7543
9010
|
return Promise.resolve(result200);
|
|
7544
9011
|
}
|
|
9012
|
+
else if (status === 400) {
|
|
9013
|
+
const _responseText = response.data;
|
|
9014
|
+
let result400 = null;
|
|
9015
|
+
let resultData400 = _responseText;
|
|
9016
|
+
result400 = JSON.parse(resultData400);
|
|
9017
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
9018
|
+
}
|
|
7545
9019
|
else if (status === 401) {
|
|
7546
9020
|
const _responseText = response.data;
|
|
7547
9021
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -7575,7 +9049,7 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
7575
9049
|
method: "GET",
|
|
7576
9050
|
url: url_,
|
|
7577
9051
|
headers: {
|
|
7578
|
-
"Accept": "application/
|
|
9052
|
+
"Accept": "application/octet-stream"
|
|
7579
9053
|
},
|
|
7580
9054
|
cancelToken
|
|
7581
9055
|
};
|
|
@@ -7963,7 +9437,7 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
7963
9437
|
method: "GET",
|
|
7964
9438
|
url: url_,
|
|
7965
9439
|
headers: {
|
|
7966
|
-
"Accept": "application/
|
|
9440
|
+
"Accept": "application/octet-stream"
|
|
7967
9441
|
},
|
|
7968
9442
|
cancelToken
|
|
7969
9443
|
};
|
|
@@ -8103,7 +9577,7 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
8103
9577
|
method: "GET",
|
|
8104
9578
|
url: url_,
|
|
8105
9579
|
headers: {
|
|
8106
|
-
"Accept": "application/
|
|
9580
|
+
"Accept": "application/octet-stream"
|
|
8107
9581
|
},
|
|
8108
9582
|
cancelToken
|
|
8109
9583
|
};
|
|
@@ -8180,7 +9654,7 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
8180
9654
|
method: "GET",
|
|
8181
9655
|
url: url_,
|
|
8182
9656
|
headers: {
|
|
8183
|
-
"Accept": "application/
|
|
9657
|
+
"Accept": "application/octet-stream"
|
|
8184
9658
|
},
|
|
8185
9659
|
cancelToken
|
|
8186
9660
|
};
|
|
@@ -8304,7 +9778,7 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
8304
9778
|
method: "GET",
|
|
8305
9779
|
url: url_,
|
|
8306
9780
|
headers: {
|
|
8307
|
-
"Accept": "application/
|
|
9781
|
+
"Accept": "application/octet-stream"
|
|
8308
9782
|
},
|
|
8309
9783
|
cancelToken
|
|
8310
9784
|
};
|
|
@@ -8381,7 +9855,7 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
8381
9855
|
method: "GET",
|
|
8382
9856
|
url: url_,
|
|
8383
9857
|
headers: {
|
|
8384
|
-
"Accept": "application/
|
|
9858
|
+
"Accept": "application/octet-stream"
|
|
8385
9859
|
},
|
|
8386
9860
|
cancelToken
|
|
8387
9861
|
};
|
|
@@ -9178,6 +10652,22 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
|
|
|
9178
10652
|
}
|
|
9179
10653
|
}
|
|
9180
10654
|
exports.DesignAtomsViewerApiClient = DesignAtomsViewerApiClient;
|
|
10655
|
+
var ColorSpace;
|
|
10656
|
+
(function (ColorSpace) {
|
|
10657
|
+
ColorSpace["Rgb"] = "Rgb";
|
|
10658
|
+
ColorSpace["Cmyk"] = "Cmyk";
|
|
10659
|
+
ColorSpace["Grayscale"] = "Grayscale";
|
|
10660
|
+
ColorSpace["Lab"] = "Lab";
|
|
10661
|
+
ColorSpace["Spot"] = "Spot";
|
|
10662
|
+
})(ColorSpace = exports.ColorSpace || (exports.ColorSpace = {}));
|
|
10663
|
+
/** Conflict types. */
|
|
10664
|
+
var ConflictType;
|
|
10665
|
+
(function (ConflictType) {
|
|
10666
|
+
ConflictType["NameConflict"] = "NameConflict";
|
|
10667
|
+
ConflictType["FolderOverwriteConflict"] = "FolderOverwriteConflict";
|
|
10668
|
+
ConflictType["IdConflict"] = "IdConflict";
|
|
10669
|
+
ConflictType["GeneralConflict"] = "GeneralConflict";
|
|
10670
|
+
})(ConflictType = exports.ConflictType || (exports.ConflictType = {}));
|
|
9181
10671
|
var DesignElementType;
|
|
9182
10672
|
(function (DesignElementType) {
|
|
9183
10673
|
DesignElementType["Product"] = "Product";
|