@aurigma/axios-design-atoms-api-client 2.54.3 → 2.56.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 +166 -176
- package/dist/cjs/design-atoms-api-client.js +209 -240
- package/dist/cjs/design-atoms-api-client.js.map +1 -1
- package/dist/esm/design-atoms-api-client.d.ts +166 -176
- package/dist/esm/design-atoms-api-client.js +208 -239
- 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.
|
|
11
|
+
exports.ApiException = exports.ProductPreviewFormat = exports.ProductProofInterpolationMode = exports.ProductProofFormat = exports.ItemSourceType = exports.ItemType = exports.PlaceholderItemContentType = exports.ProductPatchType = exports.DesignElementType = exports.ImagePreviewFitMode = exports.ImagePreviewFormat = exports.ColorSpace = exports.DesignAtomsViewerApiClient = exports.DesignAtomsServiceApiClient = 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;
|
|
@@ -2020,7 +2020,7 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2020
2020
|
* @return Success
|
|
2021
2021
|
*/
|
|
2022
2022
|
renderImagePreview(attachment, tenantId, body, cancelToken) {
|
|
2023
|
-
let url_ = this.baseUrl + "/api/atoms/v1/images/render-
|
|
2023
|
+
let url_ = this.baseUrl + "/api/atoms/v1/images/render-preview?";
|
|
2024
2024
|
if (attachment !== undefined && attachment !== null)
|
|
2025
2025
|
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
2026
2026
|
if (tenantId === null)
|
|
@@ -2097,7 +2097,7 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2097
2097
|
* @return Success
|
|
2098
2098
|
*/
|
|
2099
2099
|
renderImagePreviewToResource(tenantId, body, cancelToken) {
|
|
2100
|
-
let url_ = this.baseUrl + "/api/atoms/v1/images/render-
|
|
2100
|
+
let url_ = this.baseUrl + "/api/atoms/v1/images/render-preview/to-resource?";
|
|
2101
2101
|
if (tenantId === null)
|
|
2102
2102
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2103
2103
|
else if (tenantId !== undefined)
|
|
@@ -2463,100 +2463,15 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2463
2463
|
this.instance = instance ? instance : axios_1.create();
|
|
2464
2464
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
2465
2465
|
}
|
|
2466
|
-
/**
|
|
2467
|
-
* Converts colors
|
|
2468
|
-
* @param tenantId (optional) Tenant identifier
|
|
2469
|
-
* @param body (optional) Convert colors operation parameters
|
|
2470
|
-
* @return Success
|
|
2471
|
-
*/
|
|
2472
|
-
convertColors(tenantId, body, cancelToken) {
|
|
2473
|
-
let url_ = this.baseUrl + "/api/atoms/v1/colorConverter?";
|
|
2474
|
-
if (tenantId === null)
|
|
2475
|
-
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2476
|
-
else if (tenantId !== undefined)
|
|
2477
|
-
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2478
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
2479
|
-
const content_ = JSON.stringify(body);
|
|
2480
|
-
let options_ = {
|
|
2481
|
-
data: content_,
|
|
2482
|
-
method: "POST",
|
|
2483
|
-
url: url_,
|
|
2484
|
-
headers: {
|
|
2485
|
-
"Content-Type": "application/json",
|
|
2486
|
-
"Accept": "application/json"
|
|
2487
|
-
},
|
|
2488
|
-
cancelToken
|
|
2489
|
-
};
|
|
2490
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2491
|
-
return this.instance.request(transformedOptions_);
|
|
2492
|
-
}).catch((_error) => {
|
|
2493
|
-
if (isAxiosError(_error) && _error.response) {
|
|
2494
|
-
return _error.response;
|
|
2495
|
-
}
|
|
2496
|
-
else {
|
|
2497
|
-
throw _error;
|
|
2498
|
-
}
|
|
2499
|
-
}).then((_response) => {
|
|
2500
|
-
return this.transformResult(url_, _response, (_response) => this.processConvertColors(_response));
|
|
2501
|
-
});
|
|
2502
|
-
}
|
|
2503
|
-
processConvertColors(response) {
|
|
2504
|
-
const status = response.status;
|
|
2505
|
-
let _headers = {};
|
|
2506
|
-
if (response.headers && typeof response.headers === "object") {
|
|
2507
|
-
for (let k in response.headers) {
|
|
2508
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
2509
|
-
_headers[k] = response.headers[k];
|
|
2510
|
-
}
|
|
2511
|
-
}
|
|
2512
|
-
}
|
|
2513
|
-
if (status === 200) {
|
|
2514
|
-
const _responseText = response.data;
|
|
2515
|
-
let result200 = null;
|
|
2516
|
-
let resultData200 = _responseText;
|
|
2517
|
-
result200 = JSON.parse(resultData200);
|
|
2518
|
-
return Promise.resolve(result200);
|
|
2519
|
-
}
|
|
2520
|
-
else if (status === 404) {
|
|
2521
|
-
const _responseText = response.data;
|
|
2522
|
-
let result404 = null;
|
|
2523
|
-
let resultData404 = _responseText;
|
|
2524
|
-
result404 = JSON.parse(resultData404);
|
|
2525
|
-
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2526
|
-
}
|
|
2527
|
-
else if (status === 401) {
|
|
2528
|
-
const _responseText = response.data;
|
|
2529
|
-
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2530
|
-
}
|
|
2531
|
-
else if (status === 403) {
|
|
2532
|
-
const _responseText = response.data;
|
|
2533
|
-
return throwException("Forbidden", status, _responseText, _headers);
|
|
2534
|
-
}
|
|
2535
|
-
else if (status === 500) {
|
|
2536
|
-
const _responseText = response.data;
|
|
2537
|
-
let result500 = null;
|
|
2538
|
-
let resultData500 = _responseText;
|
|
2539
|
-
result500 = JSON.parse(resultData500);
|
|
2540
|
-
return throwException("Internal server error", status, _responseText, _headers, result500);
|
|
2541
|
-
}
|
|
2542
|
-
else if (status !== 200 && status !== 204) {
|
|
2543
|
-
const _responseText = response.data;
|
|
2544
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2545
|
-
}
|
|
2546
|
-
return Promise.resolve(null);
|
|
2547
|
-
}
|
|
2548
2466
|
/**
|
|
2549
2467
|
* Creates new design file with specified parameters and saves it in storage.
|
|
2550
|
-
* @param privateStorage (optional) If set to 'true' design will be saved to private storage
|
|
2551
2468
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
2552
2469
|
* @param tenantId (optional) Tenant identifier
|
|
2553
2470
|
* @param body (optional) Design creation parameters
|
|
2554
2471
|
* @return Success
|
|
2555
2472
|
*/
|
|
2556
|
-
createDesign(
|
|
2473
|
+
createDesign(privateStorageOwner, tenantId, body, cancelToken) {
|
|
2557
2474
|
let url_ = this.baseUrl + "/api/atoms/v1/designs?";
|
|
2558
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
2559
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
2560
2475
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
2561
2476
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
2562
2477
|
if (tenantId === null)
|
|
@@ -2724,18 +2639,15 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2724
2639
|
/**
|
|
2725
2640
|
* Loads product (design model) from design file taken from storage
|
|
2726
2641
|
* @param id Design identifier
|
|
2727
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
2728
2642
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
2729
2643
|
* @param tenantId (optional) Tenant identifier
|
|
2730
2644
|
* @return Success
|
|
2731
2645
|
*/
|
|
2732
|
-
loadProduct(id,
|
|
2646
|
+
loadProduct(id, privateStorageOwner, tenantId, cancelToken) {
|
|
2733
2647
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/model?";
|
|
2734
2648
|
if (id === undefined || id === null)
|
|
2735
2649
|
throw new Error("The parameter 'id' must be defined.");
|
|
2736
2650
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2737
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
2738
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
2739
2651
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
2740
2652
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
2741
2653
|
if (tenantId === null)
|
|
@@ -2812,19 +2724,16 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2812
2724
|
/**
|
|
2813
2725
|
* Saves product (design model) to design file and updates design in storage.
|
|
2814
2726
|
* @param id Design identifier
|
|
2815
|
-
* @param privateStorage (optional) If set to 'true' design will be saved to private storage
|
|
2816
2727
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
2817
2728
|
* @param tenantId (optional) Tenant identifier
|
|
2818
2729
|
* @param body (optional) Serialized product description
|
|
2819
2730
|
* @return Success
|
|
2820
2731
|
*/
|
|
2821
|
-
saveProduct(id,
|
|
2732
|
+
saveProduct(id, privateStorageOwner, tenantId, body, cancelToken) {
|
|
2822
2733
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/model?";
|
|
2823
2734
|
if (id === undefined || id === null)
|
|
2824
2735
|
throw new Error("The parameter 'id' must be defined.");
|
|
2825
2736
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2826
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
2827
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
2828
2737
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
2829
2738
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
2830
2739
|
if (tenantId === null)
|
|
@@ -2900,7 +2809,6 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2900
2809
|
/**
|
|
2901
2810
|
* Patches product (design model) in design file.
|
|
2902
2811
|
* @param id Design identifier.
|
|
2903
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage.
|
|
2904
2812
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
2905
2813
|
* @param tenantId (optional) Tenant identifier
|
|
2906
2814
|
* @param patchType (optional)
|
|
@@ -2911,13 +2819,11 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2911
2819
|
* @param replacePlaceholderItemContentInfo_sourceFile (optional)
|
|
2912
2820
|
* @return Success
|
|
2913
2821
|
*/
|
|
2914
|
-
patchProduct(id,
|
|
2822
|
+
patchProduct(id, privateStorageOwner, tenantId, patchType, replaceImageItemFileInfo_itemName, replaceImageItemFileInfo_sourceFile, replacePlaceholderItemContentInfo_placeholderItemName, replacePlaceholderItemContentInfo_newContentType, replacePlaceholderItemContentInfo_sourceFile, cancelToken) {
|
|
2915
2823
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/model?";
|
|
2916
2824
|
if (id === undefined || id === null)
|
|
2917
2825
|
throw new Error("The parameter 'id' must be defined.");
|
|
2918
2826
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2919
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
2920
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
2921
2827
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
2922
2828
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
2923
2829
|
if (tenantId === null)
|
|
@@ -3092,18 +2998,15 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3092
2998
|
/**
|
|
3093
2999
|
* Loads data schema from design file taken from storage
|
|
3094
3000
|
* @param id Design identifier
|
|
3095
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
3096
3001
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3097
3002
|
* @param tenantId (optional) Tenant identifier
|
|
3098
3003
|
* @return Success
|
|
3099
3004
|
*/
|
|
3100
|
-
loadDataSchema(id,
|
|
3005
|
+
loadDataSchema(id, privateStorageOwner, tenantId, cancelToken) {
|
|
3101
3006
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/schema?";
|
|
3102
3007
|
if (id === undefined || id === null)
|
|
3103
3008
|
throw new Error("The parameter 'id' must be defined.");
|
|
3104
3009
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3105
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3106
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3107
3010
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3108
3011
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3109
3012
|
if (tenantId === null)
|
|
@@ -3187,18 +3090,15 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3187
3090
|
/**
|
|
3188
3091
|
* Gets variable items information for design file taken from storage
|
|
3189
3092
|
* @param id Design identifier
|
|
3190
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
3191
3093
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3192
3094
|
* @param tenantId (optional) Tenant identifier
|
|
3193
3095
|
* @return Success
|
|
3194
3096
|
*/
|
|
3195
|
-
getVariables(id,
|
|
3097
|
+
getVariables(id, privateStorageOwner, tenantId, cancelToken) {
|
|
3196
3098
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/variables?";
|
|
3197
3099
|
if (id === undefined || id === null)
|
|
3198
3100
|
throw new Error("The parameter 'id' must be defined.");
|
|
3199
3101
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3200
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3201
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3202
3102
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3203
3103
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3204
3104
|
if (tenantId === null)
|
|
@@ -3275,19 +3175,16 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3275
3175
|
/**
|
|
3276
3176
|
* Sets variable items values for design file taken from storage
|
|
3277
3177
|
* @param id Design identifier
|
|
3278
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
3279
3178
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3280
3179
|
* @param tenantId (optional) Tenant identifier
|
|
3281
3180
|
* @param body (optional) Design variable values
|
|
3282
3181
|
* @return Success
|
|
3283
3182
|
*/
|
|
3284
|
-
setVariables(id,
|
|
3183
|
+
setVariables(id, privateStorageOwner, tenantId, body, cancelToken) {
|
|
3285
3184
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/variables?";
|
|
3286
3185
|
if (id === undefined || id === null)
|
|
3287
3186
|
throw new Error("The parameter 'id' must be defined.");
|
|
3288
3187
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3289
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3290
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3291
3188
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3292
3189
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3293
3190
|
if (tenantId === null)
|
|
@@ -3370,18 +3267,15 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3370
3267
|
/**
|
|
3371
3268
|
* Loads variable data printing information from design file taken from storage
|
|
3372
3269
|
* @param id Design identifier
|
|
3373
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
3374
3270
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3375
3271
|
* @param tenantId (optional) Tenant identifier
|
|
3376
3272
|
* @return Success
|
|
3377
3273
|
*/
|
|
3378
|
-
loadVdpData(id,
|
|
3379
|
-
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/
|
|
3274
|
+
loadVdpData(id, privateStorageOwner, tenantId, cancelToken) {
|
|
3275
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/vdp-data?";
|
|
3380
3276
|
if (id === undefined || id === null)
|
|
3381
3277
|
throw new Error("The parameter 'id' must be defined.");
|
|
3382
3278
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3383
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3384
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3385
3279
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3386
3280
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3387
3281
|
if (tenantId === null)
|
|
@@ -3465,19 +3359,16 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3465
3359
|
/**
|
|
3466
3360
|
* Saves variable data printing information to design file and updates design in storage.
|
|
3467
3361
|
* @param id Design identifier
|
|
3468
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
3469
3362
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3470
3363
|
* @param tenantId (optional) Tenant identifier
|
|
3471
3364
|
* @param body (optional) Serialized vdp data
|
|
3472
3365
|
* @return Success
|
|
3473
3366
|
*/
|
|
3474
|
-
saveVdpData(id,
|
|
3475
|
-
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/
|
|
3367
|
+
saveVdpData(id, privateStorageOwner, tenantId, body, cancelToken) {
|
|
3368
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/vdp-data?";
|
|
3476
3369
|
if (id === undefined || id === null)
|
|
3477
3370
|
throw new Error("The parameter 'id' must be defined.");
|
|
3478
3371
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3479
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3480
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3481
3372
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3482
3373
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3483
3374
|
if (tenantId === null)
|
|
@@ -3551,20 +3442,17 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3551
3442
|
return Promise.resolve(null);
|
|
3552
3443
|
}
|
|
3553
3444
|
/**
|
|
3554
|
-
* Deletes variable data printing
|
|
3445
|
+
* Deletes variable data printing information from design file and updates design in storage.
|
|
3555
3446
|
* @param id Design identifier
|
|
3556
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
3557
3447
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3558
3448
|
* @param tenantId (optional) Tenant identifier
|
|
3559
3449
|
* @return Success
|
|
3560
3450
|
*/
|
|
3561
|
-
deleteVdpData(id,
|
|
3562
|
-
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/
|
|
3451
|
+
deleteVdpData(id, privateStorageOwner, tenantId, cancelToken) {
|
|
3452
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/vdp-data?";
|
|
3563
3453
|
if (id === undefined || id === null)
|
|
3564
3454
|
throw new Error("The parameter 'id' must be defined.");
|
|
3565
3455
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3566
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3567
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3568
3456
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3569
3457
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3570
3458
|
if (tenantId === null)
|
|
@@ -3634,13 +3522,105 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3634
3522
|
return Promise.resolve(null);
|
|
3635
3523
|
}
|
|
3636
3524
|
/**
|
|
3637
|
-
*
|
|
3525
|
+
* Loads product (design model) from resource file taken from storage
|
|
3526
|
+
* @param id Resource identifier
|
|
3527
|
+
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3638
3528
|
* @param tenantId (optional) Tenant identifier
|
|
3639
|
-
* @param body (optional) Items to flatten.
|
|
3640
3529
|
* @return Success
|
|
3641
3530
|
*/
|
|
3642
|
-
|
|
3643
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
3531
|
+
loadProductFromResource(id, privateStorageOwner, tenantId, cancelToken) {
|
|
3532
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/from-resource/{id}/model?";
|
|
3533
|
+
if (id === undefined || id === null)
|
|
3534
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3535
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3536
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3537
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3538
|
+
if (tenantId === null)
|
|
3539
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3540
|
+
else if (tenantId !== undefined)
|
|
3541
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3542
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3543
|
+
let options_ = {
|
|
3544
|
+
method: "GET",
|
|
3545
|
+
url: url_,
|
|
3546
|
+
headers: {
|
|
3547
|
+
"Accept": "application/json"
|
|
3548
|
+
},
|
|
3549
|
+
cancelToken
|
|
3550
|
+
};
|
|
3551
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3552
|
+
return this.instance.request(transformedOptions_);
|
|
3553
|
+
}).catch((_error) => {
|
|
3554
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3555
|
+
return _error.response;
|
|
3556
|
+
}
|
|
3557
|
+
else {
|
|
3558
|
+
throw _error;
|
|
3559
|
+
}
|
|
3560
|
+
}).then((_response) => {
|
|
3561
|
+
return this.transformResult(url_, _response, (_response) => this.processLoadProductFromResource(_response));
|
|
3562
|
+
});
|
|
3563
|
+
}
|
|
3564
|
+
processLoadProductFromResource(response) {
|
|
3565
|
+
const status = response.status;
|
|
3566
|
+
let _headers = {};
|
|
3567
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3568
|
+
for (let k in response.headers) {
|
|
3569
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3570
|
+
_headers[k] = response.headers[k];
|
|
3571
|
+
}
|
|
3572
|
+
}
|
|
3573
|
+
}
|
|
3574
|
+
if (status === 200) {
|
|
3575
|
+
const _responseText = response.data;
|
|
3576
|
+
let result200 = null;
|
|
3577
|
+
let resultData200 = _responseText;
|
|
3578
|
+
result200 = JSON.parse(resultData200);
|
|
3579
|
+
return Promise.resolve(result200);
|
|
3580
|
+
}
|
|
3581
|
+
else if (status === 404) {
|
|
3582
|
+
const _responseText = response.data;
|
|
3583
|
+
let result404 = null;
|
|
3584
|
+
let resultData404 = _responseText;
|
|
3585
|
+
result404 = JSON.parse(resultData404);
|
|
3586
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3587
|
+
}
|
|
3588
|
+
else if (status === 422) {
|
|
3589
|
+
const _responseText = response.data;
|
|
3590
|
+
let result422 = null;
|
|
3591
|
+
let resultData422 = _responseText;
|
|
3592
|
+
result422 = JSON.parse(resultData422);
|
|
3593
|
+
return throwException("Client Error", status, _responseText, _headers, result422);
|
|
3594
|
+
}
|
|
3595
|
+
else if (status === 401) {
|
|
3596
|
+
const _responseText = response.data;
|
|
3597
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3598
|
+
}
|
|
3599
|
+
else if (status === 403) {
|
|
3600
|
+
const _responseText = response.data;
|
|
3601
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3602
|
+
}
|
|
3603
|
+
else if (status === 500) {
|
|
3604
|
+
const _responseText = response.data;
|
|
3605
|
+
let result500 = null;
|
|
3606
|
+
let resultData500 = _responseText;
|
|
3607
|
+
result500 = JSON.parse(resultData500);
|
|
3608
|
+
return throwException("Internal server error", status, _responseText, _headers, result500);
|
|
3609
|
+
}
|
|
3610
|
+
else if (status !== 200 && status !== 204) {
|
|
3611
|
+
const _responseText = response.data;
|
|
3612
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3613
|
+
}
|
|
3614
|
+
return Promise.resolve(null);
|
|
3615
|
+
}
|
|
3616
|
+
/**
|
|
3617
|
+
* Converts colors
|
|
3618
|
+
* @param tenantId (optional) Tenant identifier
|
|
3619
|
+
* @param body (optional) Convert colors operation parameters
|
|
3620
|
+
* @return Success
|
|
3621
|
+
*/
|
|
3622
|
+
convertColors(tenantId, body, cancelToken) {
|
|
3623
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/model/convert-colors?";
|
|
3644
3624
|
if (tenantId === null)
|
|
3645
3625
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3646
3626
|
else if (tenantId !== undefined)
|
|
@@ -3667,10 +3647,10 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3667
3647
|
throw _error;
|
|
3668
3648
|
}
|
|
3669
3649
|
}).then((_response) => {
|
|
3670
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
3650
|
+
return this.transformResult(url_, _response, (_response) => this.processConvertColors(_response));
|
|
3671
3651
|
});
|
|
3672
3652
|
}
|
|
3673
|
-
|
|
3653
|
+
processConvertColors(response) {
|
|
3674
3654
|
const status = response.status;
|
|
3675
3655
|
let _headers = {};
|
|
3676
3656
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -3687,6 +3667,13 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3687
3667
|
result200 = JSON.parse(resultData200);
|
|
3688
3668
|
return Promise.resolve(result200);
|
|
3689
3669
|
}
|
|
3670
|
+
else if (status === 404) {
|
|
3671
|
+
const _responseText = response.data;
|
|
3672
|
+
let result404 = null;
|
|
3673
|
+
let resultData404 = _responseText;
|
|
3674
|
+
result404 = JSON.parse(resultData404);
|
|
3675
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3676
|
+
}
|
|
3690
3677
|
else if (status === 401) {
|
|
3691
3678
|
const _responseText = response.data;
|
|
3692
3679
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -3719,7 +3706,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3719
3706
|
* @return Success
|
|
3720
3707
|
*/
|
|
3721
3708
|
createItem(itemType, tenantId, sourceType, sourceId, sourceOwnerId, sourceFile, cancelToken) {
|
|
3722
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
3709
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items?";
|
|
3723
3710
|
if (itemType !== undefined && itemType !== null)
|
|
3724
3711
|
url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
|
|
3725
3712
|
if (tenantId === null)
|
|
@@ -3810,7 +3797,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3810
3797
|
* @return Success
|
|
3811
3798
|
*/
|
|
3812
3799
|
extractItemImage(tenantId, body, cancelToken) {
|
|
3813
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
3800
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/extract-image?";
|
|
3814
3801
|
if (tenantId === null)
|
|
3815
3802
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3816
3803
|
else if (tenantId !== undefined)
|
|
@@ -3879,30 +3866,27 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3879
3866
|
return Promise.resolve(null);
|
|
3880
3867
|
}
|
|
3881
3868
|
/**
|
|
3882
|
-
*
|
|
3883
|
-
* @param designId (optional) Public design ID.
|
|
3884
|
-
* @param privateDesignId (optional) Private design ID.
|
|
3885
|
-
* @param privateStorageOwner (optional) Private storage owner ID.
|
|
3869
|
+
* Flatten items.
|
|
3886
3870
|
* @param tenantId (optional) Tenant identifier
|
|
3871
|
+
* @param body (optional) Items to flatten.
|
|
3887
3872
|
* @return Success
|
|
3888
3873
|
*/
|
|
3889
|
-
|
|
3890
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
3891
|
-
if (designId !== undefined && designId !== null)
|
|
3892
|
-
url_ += "designId=" + encodeURIComponent("" + designId) + "&";
|
|
3893
|
-
if (privateDesignId !== undefined && privateDesignId !== null)
|
|
3894
|
-
url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
|
|
3895
|
-
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3896
|
-
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3874
|
+
flattenItems(tenantId, body, cancelToken) {
|
|
3875
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/flatten?";
|
|
3897
3876
|
if (tenantId === null)
|
|
3898
3877
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3899
3878
|
else if (tenantId !== undefined)
|
|
3900
3879
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3901
3880
|
url_ = url_.replace(/[?&]$/, "");
|
|
3881
|
+
const content_ = JSON.stringify(body);
|
|
3902
3882
|
let options_ = {
|
|
3883
|
+
data: content_,
|
|
3903
3884
|
method: "POST",
|
|
3904
3885
|
url: url_,
|
|
3905
|
-
headers: {
|
|
3886
|
+
headers: {
|
|
3887
|
+
"Content-Type": "application/json",
|
|
3888
|
+
"Accept": "application/json"
|
|
3889
|
+
},
|
|
3906
3890
|
cancelToken
|
|
3907
3891
|
};
|
|
3908
3892
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
@@ -3915,10 +3899,10 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3915
3899
|
throw _error;
|
|
3916
3900
|
}
|
|
3917
3901
|
}).then((_response) => {
|
|
3918
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
3902
|
+
return this.transformResult(url_, _response, (_response) => this.processFlattenItems(_response));
|
|
3919
3903
|
});
|
|
3920
3904
|
}
|
|
3921
|
-
|
|
3905
|
+
processFlattenItems(response) {
|
|
3922
3906
|
const status = response.status;
|
|
3923
3907
|
let _headers = {};
|
|
3924
3908
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -3928,9 +3912,12 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3928
3912
|
}
|
|
3929
3913
|
}
|
|
3930
3914
|
}
|
|
3931
|
-
if (status ===
|
|
3915
|
+
if (status === 200) {
|
|
3932
3916
|
const _responseText = response.data;
|
|
3933
|
-
|
|
3917
|
+
let result200 = null;
|
|
3918
|
+
let resultData200 = _responseText;
|
|
3919
|
+
result200 = JSON.parse(resultData200);
|
|
3920
|
+
return Promise.resolve(result200);
|
|
3934
3921
|
}
|
|
3935
3922
|
else if (status === 401) {
|
|
3936
3923
|
const _responseText = response.data;
|
|
@@ -3954,30 +3941,31 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3954
3941
|
return Promise.resolve(null);
|
|
3955
3942
|
}
|
|
3956
3943
|
/**
|
|
3957
|
-
*
|
|
3958
|
-
* @param
|
|
3959
|
-
* @param privateDesignId (optional) Private design ID.
|
|
3960
|
-
* @param privateStorageOwner (optional) Private storage owner ID.
|
|
3944
|
+
* Render product proof image with specified parameters.
|
|
3945
|
+
* @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied (default value is 'false').
|
|
3961
3946
|
* @param tenantId (optional) Tenant identifier
|
|
3947
|
+
* @param body (optional) Preview parameters.
|
|
3962
3948
|
* @return Success
|
|
3963
3949
|
*/
|
|
3964
|
-
|
|
3965
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
3966
|
-
if (
|
|
3967
|
-
url_ += "
|
|
3968
|
-
if (privateDesignId !== undefined && privateDesignId !== null)
|
|
3969
|
-
url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
|
|
3970
|
-
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3971
|
-
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3950
|
+
renderProduct(attachment, tenantId, body, cancelToken) {
|
|
3951
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/model/render-proof?";
|
|
3952
|
+
if (attachment !== undefined && attachment !== null)
|
|
3953
|
+
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
3972
3954
|
if (tenantId === null)
|
|
3973
3955
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3974
3956
|
else if (tenantId !== undefined)
|
|
3975
3957
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3976
3958
|
url_ = url_.replace(/[?&]$/, "");
|
|
3959
|
+
const content_ = JSON.stringify(body);
|
|
3977
3960
|
let options_ = {
|
|
3961
|
+
data: content_,
|
|
3962
|
+
responseType: "blob",
|
|
3978
3963
|
method: "POST",
|
|
3979
3964
|
url: url_,
|
|
3980
|
-
headers: {
|
|
3965
|
+
headers: {
|
|
3966
|
+
"Content-Type": "application/json",
|
|
3967
|
+
"Accept": "application/octet-stream"
|
|
3968
|
+
},
|
|
3981
3969
|
cancelToken
|
|
3982
3970
|
};
|
|
3983
3971
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
@@ -3990,10 +3978,10 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3990
3978
|
throw _error;
|
|
3991
3979
|
}
|
|
3992
3980
|
}).then((_response) => {
|
|
3993
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
3981
|
+
return this.transformResult(url_, _response, (_response) => this.processRenderProduct(_response));
|
|
3994
3982
|
});
|
|
3995
3983
|
}
|
|
3996
|
-
|
|
3984
|
+
processRenderProduct(response) {
|
|
3997
3985
|
const status = response.status;
|
|
3998
3986
|
let _headers = {};
|
|
3999
3987
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -4003,9 +3991,11 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4003
3991
|
}
|
|
4004
3992
|
}
|
|
4005
3993
|
}
|
|
4006
|
-
if (status ===
|
|
4007
|
-
const
|
|
4008
|
-
|
|
3994
|
+
if (status === 200 || status === 206) {
|
|
3995
|
+
const contentDisposition = response.headers ? response.headers["content-disposition"] : undefined;
|
|
3996
|
+
const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
3997
|
+
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
3998
|
+
return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
|
|
4009
3999
|
}
|
|
4010
4000
|
else if (status === 401) {
|
|
4011
4001
|
const _responseText = response.data;
|
|
@@ -4037,7 +4027,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4037
4027
|
* @return Success
|
|
4038
4028
|
*/
|
|
4039
4029
|
renderDesignPreview(attachment, tenantId, body, cancelToken) {
|
|
4040
|
-
let url_ = this.baseUrl + "/api/atoms/v1/render-
|
|
4030
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/render-preview?";
|
|
4041
4031
|
if (attachment !== undefined && attachment !== null)
|
|
4042
4032
|
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
4043
4033
|
if (tenantId === null)
|
|
@@ -4114,7 +4104,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4114
4104
|
* @return Success
|
|
4115
4105
|
*/
|
|
4116
4106
|
renderDesignPreviewToResource(tenantId, body, cancelToken) {
|
|
4117
|
-
let url_ = this.baseUrl + "/api/atoms/v1/render-
|
|
4107
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/render-preview/to-resource?";
|
|
4118
4108
|
if (tenantId === null)
|
|
4119
4109
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4120
4110
|
else if (tenantId !== undefined)
|
|
@@ -4191,7 +4181,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4191
4181
|
* @return Success
|
|
4192
4182
|
*/
|
|
4193
4183
|
renderDesignProof(attachment, tenantId, body, cancelToken) {
|
|
4194
|
-
let url_ = this.baseUrl + "/api/atoms/v1/render-
|
|
4184
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/render-proof?";
|
|
4195
4185
|
if (attachment !== undefined && attachment !== null)
|
|
4196
4186
|
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
4197
4187
|
if (tenantId === null)
|
|
@@ -4268,7 +4258,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4268
4258
|
* @return Success
|
|
4269
4259
|
*/
|
|
4270
4260
|
renderDesignProofToResource(tenantId, body, cancelToken) {
|
|
4271
|
-
let url_ = this.baseUrl + "/api/atoms/v1/render-
|
|
4261
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/render-proof/to-resource?";
|
|
4272
4262
|
if (tenantId === null)
|
|
4273
4263
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4274
4264
|
else if (tenantId !== undefined)
|
|
@@ -4337,31 +4327,31 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4337
4327
|
return Promise.resolve(null);
|
|
4338
4328
|
}
|
|
4339
4329
|
/**
|
|
4340
|
-
*
|
|
4341
|
-
* @param
|
|
4330
|
+
* Creates a private design from a public design.
|
|
4331
|
+
* @param designId (optional) Public design ID.
|
|
4332
|
+
* @param privateDesignId (optional) Private design ID.
|
|
4333
|
+
* @param privateStorageOwner (optional) Private storage owner ID.
|
|
4342
4334
|
* @param tenantId (optional) Tenant identifier
|
|
4343
|
-
* @param body (optional) Preview parameters.
|
|
4344
4335
|
* @return Success
|
|
4336
|
+
* @deprecated
|
|
4345
4337
|
*/
|
|
4346
|
-
|
|
4347
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
4348
|
-
if (
|
|
4349
|
-
url_ += "
|
|
4338
|
+
createPrivateDesignFromDesign(designId, privateDesignId, privateStorageOwner, tenantId, cancelToken) {
|
|
4339
|
+
let url_ = this.baseUrl + "/api/atoms/v1/private-designs/from-design?";
|
|
4340
|
+
if (designId !== undefined && designId !== null)
|
|
4341
|
+
url_ += "designId=" + encodeURIComponent("" + designId) + "&";
|
|
4342
|
+
if (privateDesignId !== undefined && privateDesignId !== null)
|
|
4343
|
+
url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
|
|
4344
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4345
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
4350
4346
|
if (tenantId === null)
|
|
4351
4347
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4352
4348
|
else if (tenantId !== undefined)
|
|
4353
4349
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
4354
4350
|
url_ = url_.replace(/[?&]$/, "");
|
|
4355
|
-
const content_ = JSON.stringify(body);
|
|
4356
4351
|
let options_ = {
|
|
4357
|
-
data: content_,
|
|
4358
|
-
responseType: "blob",
|
|
4359
4352
|
method: "POST",
|
|
4360
4353
|
url: url_,
|
|
4361
|
-
headers: {
|
|
4362
|
-
"Content-Type": "application/json",
|
|
4363
|
-
"Accept": "application/octet-stream"
|
|
4364
|
-
},
|
|
4354
|
+
headers: {},
|
|
4365
4355
|
cancelToken
|
|
4366
4356
|
};
|
|
4367
4357
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
@@ -4374,10 +4364,10 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4374
4364
|
throw _error;
|
|
4375
4365
|
}
|
|
4376
4366
|
}).then((_response) => {
|
|
4377
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
4367
|
+
return this.transformResult(url_, _response, (_response) => this.processCreatePrivateDesignFromDesign(_response));
|
|
4378
4368
|
});
|
|
4379
4369
|
}
|
|
4380
|
-
|
|
4370
|
+
processCreatePrivateDesignFromDesign(response) {
|
|
4381
4371
|
const status = response.status;
|
|
4382
4372
|
let _headers = {};
|
|
4383
4373
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -4387,11 +4377,9 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4387
4377
|
}
|
|
4388
4378
|
}
|
|
4389
4379
|
}
|
|
4390
|
-
if (status ===
|
|
4391
|
-
const
|
|
4392
|
-
|
|
4393
|
-
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
4394
|
-
return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
|
|
4380
|
+
if (status === 201) {
|
|
4381
|
+
const _responseText = response.data;
|
|
4382
|
+
return Promise.resolve(null);
|
|
4395
4383
|
}
|
|
4396
4384
|
else if (status === 401) {
|
|
4397
4385
|
const _responseText = response.data;
|
|
@@ -4415,20 +4403,20 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4415
4403
|
return Promise.resolve(null);
|
|
4416
4404
|
}
|
|
4417
4405
|
/**
|
|
4418
|
-
*
|
|
4419
|
-
* @param
|
|
4420
|
-
* @param
|
|
4421
|
-
* @param privateStorageOwner (optional) Private storage owner
|
|
4406
|
+
* Creates a private design from a public resource.
|
|
4407
|
+
* @param resourceId (optional) Resource ID.
|
|
4408
|
+
* @param privateDesignId (optional) Private design ID.
|
|
4409
|
+
* @param privateStorageOwner (optional) Private storage owner ID.
|
|
4422
4410
|
* @param tenantId (optional) Tenant identifier
|
|
4423
4411
|
* @return Success
|
|
4412
|
+
* @deprecated
|
|
4424
4413
|
*/
|
|
4425
|
-
|
|
4426
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
4427
|
-
if (
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
4414
|
+
createPrivateDesignFromResource(resourceId, privateDesignId, privateStorageOwner, tenantId, cancelToken) {
|
|
4415
|
+
let url_ = this.baseUrl + "/api/atoms/v1/private-designs/from-resource?";
|
|
4416
|
+
if (resourceId !== undefined && resourceId !== null)
|
|
4417
|
+
url_ += "resourceId=" + encodeURIComponent("" + resourceId) + "&";
|
|
4418
|
+
if (privateDesignId !== undefined && privateDesignId !== null)
|
|
4419
|
+
url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
|
|
4432
4420
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4433
4421
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
4434
4422
|
if (tenantId === null)
|
|
@@ -4437,11 +4425,9 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4437
4425
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
4438
4426
|
url_ = url_.replace(/[?&]$/, "");
|
|
4439
4427
|
let options_ = {
|
|
4440
|
-
method: "
|
|
4428
|
+
method: "POST",
|
|
4441
4429
|
url: url_,
|
|
4442
|
-
headers: {
|
|
4443
|
-
"Accept": "application/json"
|
|
4444
|
-
},
|
|
4430
|
+
headers: {},
|
|
4445
4431
|
cancelToken
|
|
4446
4432
|
};
|
|
4447
4433
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
@@ -4454,10 +4440,10 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4454
4440
|
throw _error;
|
|
4455
4441
|
}
|
|
4456
4442
|
}).then((_response) => {
|
|
4457
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
4443
|
+
return this.transformResult(url_, _response, (_response) => this.processCreatePrivateDesignFromResource(_response));
|
|
4458
4444
|
});
|
|
4459
4445
|
}
|
|
4460
|
-
|
|
4446
|
+
processCreatePrivateDesignFromResource(response) {
|
|
4461
4447
|
const status = response.status;
|
|
4462
4448
|
let _headers = {};
|
|
4463
4449
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -4467,26 +4453,9 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4467
4453
|
}
|
|
4468
4454
|
}
|
|
4469
4455
|
}
|
|
4470
|
-
if (status ===
|
|
4471
|
-
const _responseText = response.data;
|
|
4472
|
-
let result200 = null;
|
|
4473
|
-
let resultData200 = _responseText;
|
|
4474
|
-
result200 = JSON.parse(resultData200);
|
|
4475
|
-
return Promise.resolve(result200);
|
|
4476
|
-
}
|
|
4477
|
-
else if (status === 404) {
|
|
4478
|
-
const _responseText = response.data;
|
|
4479
|
-
let result404 = null;
|
|
4480
|
-
let resultData404 = _responseText;
|
|
4481
|
-
result404 = JSON.parse(resultData404);
|
|
4482
|
-
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
4483
|
-
}
|
|
4484
|
-
else if (status === 422) {
|
|
4456
|
+
if (status === 201) {
|
|
4485
4457
|
const _responseText = response.data;
|
|
4486
|
-
|
|
4487
|
-
let resultData422 = _responseText;
|
|
4488
|
-
result422 = JSON.parse(resultData422);
|
|
4489
|
-
return throwException("Client Error", status, _responseText, _headers, result422);
|
|
4458
|
+
return Promise.resolve(null);
|
|
4490
4459
|
}
|
|
4491
4460
|
else if (status === 401) {
|
|
4492
4461
|
const _responseText = response.data;
|
|
@@ -6440,19 +6409,13 @@ var ItemType;
|
|
|
6440
6409
|
ItemType["Clipart"] = "Clipart";
|
|
6441
6410
|
ItemType["Group"] = "Group";
|
|
6442
6411
|
})(ItemType = exports.ItemType || (exports.ItemType = {}));
|
|
6443
|
-
/** Item souce types */
|
|
6412
|
+
/** Item souce types. */
|
|
6444
6413
|
var ItemSourceType;
|
|
6445
6414
|
(function (ItemSourceType) {
|
|
6446
6415
|
ItemSourceType["File"] = "File";
|
|
6447
6416
|
ItemSourceType["ImageStorage"] = "ImageStorage";
|
|
6448
6417
|
ItemSourceType["PrivateImageStorage"] = "PrivateImageStorage";
|
|
6449
6418
|
})(ItemSourceType = exports.ItemSourceType || (exports.ItemSourceType = {}));
|
|
6450
|
-
/** Product preview file format. */
|
|
6451
|
-
var ProductPreviewFormat;
|
|
6452
|
-
(function (ProductPreviewFormat) {
|
|
6453
|
-
ProductPreviewFormat["Jpeg"] = "Jpeg";
|
|
6454
|
-
ProductPreviewFormat["Png"] = "Png";
|
|
6455
|
-
})(ProductPreviewFormat = exports.ProductPreviewFormat || (exports.ProductPreviewFormat = {}));
|
|
6456
6419
|
var ProductProofFormat;
|
|
6457
6420
|
(function (ProductProofFormat) {
|
|
6458
6421
|
ProductProofFormat["Jpeg"] = "Jpeg";
|
|
@@ -6474,6 +6437,12 @@ var ProductProofInterpolationMode;
|
|
|
6474
6437
|
ProductProofInterpolationMode["Anisotropic9"] = "Anisotropic9";
|
|
6475
6438
|
ProductProofInterpolationMode["Lanczos3"] = "Lanczos3";
|
|
6476
6439
|
})(ProductProofInterpolationMode = exports.ProductProofInterpolationMode || (exports.ProductProofInterpolationMode = {}));
|
|
6440
|
+
/** Product preview file format. */
|
|
6441
|
+
var ProductPreviewFormat;
|
|
6442
|
+
(function (ProductPreviewFormat) {
|
|
6443
|
+
ProductPreviewFormat["Jpeg"] = "Jpeg";
|
|
6444
|
+
ProductPreviewFormat["Png"] = "Png";
|
|
6445
|
+
})(ProductPreviewFormat = exports.ProductPreviewFormat || (exports.ProductPreviewFormat = {}));
|
|
6477
6446
|
class ApiException extends Error {
|
|
6478
6447
|
message;
|
|
6479
6448
|
status;
|