@aurigma/axios-design-atoms-api-client 2.53.1 → 2.55.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
|
@@ -2013,7 +2013,7 @@ export class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2013
2013
|
* @return Success
|
|
2014
2014
|
*/
|
|
2015
2015
|
renderImagePreview(attachment, tenantId, body, cancelToken) {
|
|
2016
|
-
let url_ = this.baseUrl + "/api/atoms/v1/images/render-
|
|
2016
|
+
let url_ = this.baseUrl + "/api/atoms/v1/images/render-preview?";
|
|
2017
2017
|
if (attachment !== undefined && attachment !== null)
|
|
2018
2018
|
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
2019
2019
|
if (tenantId === null)
|
|
@@ -2090,7 +2090,7 @@ export class DesignAtomsImagesApiClient extends ApiClientBase {
|
|
|
2090
2090
|
* @return Success
|
|
2091
2091
|
*/
|
|
2092
2092
|
renderImagePreviewToResource(tenantId, body, cancelToken) {
|
|
2093
|
-
let url_ = this.baseUrl + "/api/atoms/v1/images/render-
|
|
2093
|
+
let url_ = this.baseUrl + "/api/atoms/v1/images/render-preview/to-resource?";
|
|
2094
2094
|
if (tenantId === null)
|
|
2095
2095
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2096
2096
|
else if (tenantId !== undefined)
|
|
@@ -2454,100 +2454,15 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2454
2454
|
this.instance = instance ? instance : axios.create();
|
|
2455
2455
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
2456
2456
|
}
|
|
2457
|
-
/**
|
|
2458
|
-
* Converts colors
|
|
2459
|
-
* @param tenantId (optional) Tenant identifier
|
|
2460
|
-
* @param body (optional) Convert colors operation parameters
|
|
2461
|
-
* @return Success
|
|
2462
|
-
*/
|
|
2463
|
-
convertColors(tenantId, body, cancelToken) {
|
|
2464
|
-
let url_ = this.baseUrl + "/api/atoms/v1/colorConverter?";
|
|
2465
|
-
if (tenantId === null)
|
|
2466
|
-
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2467
|
-
else if (tenantId !== undefined)
|
|
2468
|
-
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2469
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
2470
|
-
const content_ = JSON.stringify(body);
|
|
2471
|
-
let options_ = {
|
|
2472
|
-
data: content_,
|
|
2473
|
-
method: "POST",
|
|
2474
|
-
url: url_,
|
|
2475
|
-
headers: {
|
|
2476
|
-
"Content-Type": "application/json",
|
|
2477
|
-
"Accept": "application/json"
|
|
2478
|
-
},
|
|
2479
|
-
cancelToken
|
|
2480
|
-
};
|
|
2481
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2482
|
-
return this.instance.request(transformedOptions_);
|
|
2483
|
-
}).catch((_error) => {
|
|
2484
|
-
if (isAxiosError(_error) && _error.response) {
|
|
2485
|
-
return _error.response;
|
|
2486
|
-
}
|
|
2487
|
-
else {
|
|
2488
|
-
throw _error;
|
|
2489
|
-
}
|
|
2490
|
-
}).then((_response) => {
|
|
2491
|
-
return this.transformResult(url_, _response, (_response) => this.processConvertColors(_response));
|
|
2492
|
-
});
|
|
2493
|
-
}
|
|
2494
|
-
processConvertColors(response) {
|
|
2495
|
-
const status = response.status;
|
|
2496
|
-
let _headers = {};
|
|
2497
|
-
if (response.headers && typeof response.headers === "object") {
|
|
2498
|
-
for (let k in response.headers) {
|
|
2499
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
2500
|
-
_headers[k] = response.headers[k];
|
|
2501
|
-
}
|
|
2502
|
-
}
|
|
2503
|
-
}
|
|
2504
|
-
if (status === 200) {
|
|
2505
|
-
const _responseText = response.data;
|
|
2506
|
-
let result200 = null;
|
|
2507
|
-
let resultData200 = _responseText;
|
|
2508
|
-
result200 = JSON.parse(resultData200);
|
|
2509
|
-
return Promise.resolve(result200);
|
|
2510
|
-
}
|
|
2511
|
-
else if (status === 404) {
|
|
2512
|
-
const _responseText = response.data;
|
|
2513
|
-
let result404 = null;
|
|
2514
|
-
let resultData404 = _responseText;
|
|
2515
|
-
result404 = JSON.parse(resultData404);
|
|
2516
|
-
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2517
|
-
}
|
|
2518
|
-
else if (status === 401) {
|
|
2519
|
-
const _responseText = response.data;
|
|
2520
|
-
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2521
|
-
}
|
|
2522
|
-
else if (status === 403) {
|
|
2523
|
-
const _responseText = response.data;
|
|
2524
|
-
return throwException("Forbidden", status, _responseText, _headers);
|
|
2525
|
-
}
|
|
2526
|
-
else if (status === 500) {
|
|
2527
|
-
const _responseText = response.data;
|
|
2528
|
-
let result500 = null;
|
|
2529
|
-
let resultData500 = _responseText;
|
|
2530
|
-
result500 = JSON.parse(resultData500);
|
|
2531
|
-
return throwException("Internal server error", status, _responseText, _headers, result500);
|
|
2532
|
-
}
|
|
2533
|
-
else if (status !== 200 && status !== 204) {
|
|
2534
|
-
const _responseText = response.data;
|
|
2535
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2536
|
-
}
|
|
2537
|
-
return Promise.resolve(null);
|
|
2538
|
-
}
|
|
2539
2457
|
/**
|
|
2540
2458
|
* Creates new design file with specified parameters and saves it in storage.
|
|
2541
|
-
* @param privateStorage (optional) If set to 'true' design will be saved to private storage
|
|
2542
2459
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
2543
2460
|
* @param tenantId (optional) Tenant identifier
|
|
2544
2461
|
* @param body (optional) Design creation parameters
|
|
2545
2462
|
* @return Success
|
|
2546
2463
|
*/
|
|
2547
|
-
createDesign(
|
|
2464
|
+
createDesign(privateStorageOwner, tenantId, body, cancelToken) {
|
|
2548
2465
|
let url_ = this.baseUrl + "/api/atoms/v1/designs?";
|
|
2549
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
2550
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
2551
2466
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
2552
2467
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
2553
2468
|
if (tenantId === null)
|
|
@@ -2715,18 +2630,15 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2715
2630
|
/**
|
|
2716
2631
|
* Loads product (design model) from design file taken from storage
|
|
2717
2632
|
* @param id Design identifier
|
|
2718
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
2719
2633
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
2720
2634
|
* @param tenantId (optional) Tenant identifier
|
|
2721
2635
|
* @return Success
|
|
2722
2636
|
*/
|
|
2723
|
-
loadProduct(id,
|
|
2637
|
+
loadProduct(id, privateStorageOwner, tenantId, cancelToken) {
|
|
2724
2638
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/model?";
|
|
2725
2639
|
if (id === undefined || id === null)
|
|
2726
2640
|
throw new Error("The parameter 'id' must be defined.");
|
|
2727
2641
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2728
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
2729
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
2730
2642
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
2731
2643
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
2732
2644
|
if (tenantId === null)
|
|
@@ -2803,19 +2715,16 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2803
2715
|
/**
|
|
2804
2716
|
* Saves product (design model) to design file and updates design in storage.
|
|
2805
2717
|
* @param id Design identifier
|
|
2806
|
-
* @param privateStorage (optional) If set to 'true' design will be saved to private storage
|
|
2807
2718
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
2808
2719
|
* @param tenantId (optional) Tenant identifier
|
|
2809
2720
|
* @param body (optional) Serialized product description
|
|
2810
2721
|
* @return Success
|
|
2811
2722
|
*/
|
|
2812
|
-
saveProduct(id,
|
|
2723
|
+
saveProduct(id, privateStorageOwner, tenantId, body, cancelToken) {
|
|
2813
2724
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/model?";
|
|
2814
2725
|
if (id === undefined || id === null)
|
|
2815
2726
|
throw new Error("The parameter 'id' must be defined.");
|
|
2816
2727
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2817
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
2818
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
2819
2728
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
2820
2729
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
2821
2730
|
if (tenantId === null)
|
|
@@ -2891,7 +2800,6 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2891
2800
|
/**
|
|
2892
2801
|
* Patches product (design model) in design file.
|
|
2893
2802
|
* @param id Design identifier.
|
|
2894
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage.
|
|
2895
2803
|
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
2896
2804
|
* @param tenantId (optional) Tenant identifier
|
|
2897
2805
|
* @param patchType (optional)
|
|
@@ -2902,13 +2810,11 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2902
2810
|
* @param replacePlaceholderItemContentInfo_sourceFile (optional)
|
|
2903
2811
|
* @return Success
|
|
2904
2812
|
*/
|
|
2905
|
-
patchProduct(id,
|
|
2813
|
+
patchProduct(id, privateStorageOwner, tenantId, patchType, replaceImageItemFileInfo_itemName, replaceImageItemFileInfo_sourceFile, replacePlaceholderItemContentInfo_placeholderItemName, replacePlaceholderItemContentInfo_newContentType, replacePlaceholderItemContentInfo_sourceFile, cancelToken) {
|
|
2906
2814
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/model?";
|
|
2907
2815
|
if (id === undefined || id === null)
|
|
2908
2816
|
throw new Error("The parameter 'id' must be defined.");
|
|
2909
2817
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2910
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
2911
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
2912
2818
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
2913
2819
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
2914
2820
|
if (tenantId === null)
|
|
@@ -3083,18 +2989,15 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3083
2989
|
/**
|
|
3084
2990
|
* Loads data schema from design file taken from storage
|
|
3085
2991
|
* @param id Design identifier
|
|
3086
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
3087
2992
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3088
2993
|
* @param tenantId (optional) Tenant identifier
|
|
3089
2994
|
* @return Success
|
|
3090
2995
|
*/
|
|
3091
|
-
loadDataSchema(id,
|
|
2996
|
+
loadDataSchema(id, privateStorageOwner, tenantId, cancelToken) {
|
|
3092
2997
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/schema?";
|
|
3093
2998
|
if (id === undefined || id === null)
|
|
3094
2999
|
throw new Error("The parameter 'id' must be defined.");
|
|
3095
3000
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3096
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3097
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3098
3001
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3099
3002
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3100
3003
|
if (tenantId === null)
|
|
@@ -3178,18 +3081,15 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3178
3081
|
/**
|
|
3179
3082
|
* Gets variable items information for design file taken from storage
|
|
3180
3083
|
* @param id Design identifier
|
|
3181
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
3182
3084
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3183
3085
|
* @param tenantId (optional) Tenant identifier
|
|
3184
3086
|
* @return Success
|
|
3185
3087
|
*/
|
|
3186
|
-
getVariables(id,
|
|
3088
|
+
getVariables(id, privateStorageOwner, tenantId, cancelToken) {
|
|
3187
3089
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/variables?";
|
|
3188
3090
|
if (id === undefined || id === null)
|
|
3189
3091
|
throw new Error("The parameter 'id' must be defined.");
|
|
3190
3092
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3191
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3192
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3193
3093
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3194
3094
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3195
3095
|
if (tenantId === null)
|
|
@@ -3266,19 +3166,16 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3266
3166
|
/**
|
|
3267
3167
|
* Sets variable items values for design file taken from storage
|
|
3268
3168
|
* @param id Design identifier
|
|
3269
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
3270
3169
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3271
3170
|
* @param tenantId (optional) Tenant identifier
|
|
3272
3171
|
* @param body (optional) Design variable values
|
|
3273
3172
|
* @return Success
|
|
3274
3173
|
*/
|
|
3275
|
-
setVariables(id,
|
|
3174
|
+
setVariables(id, privateStorageOwner, tenantId, body, cancelToken) {
|
|
3276
3175
|
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/variables?";
|
|
3277
3176
|
if (id === undefined || id === null)
|
|
3278
3177
|
throw new Error("The parameter 'id' must be defined.");
|
|
3279
3178
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3280
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3281
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3282
3179
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3283
3180
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3284
3181
|
if (tenantId === null)
|
|
@@ -3361,18 +3258,15 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3361
3258
|
/**
|
|
3362
3259
|
* Loads variable data printing information from design file taken from storage
|
|
3363
3260
|
* @param id Design identifier
|
|
3364
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
3365
3261
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3366
3262
|
* @param tenantId (optional) Tenant identifier
|
|
3367
3263
|
* @return Success
|
|
3368
3264
|
*/
|
|
3369
|
-
loadVdpData(id,
|
|
3370
|
-
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/
|
|
3265
|
+
loadVdpData(id, privateStorageOwner, tenantId, cancelToken) {
|
|
3266
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/vdp-data?";
|
|
3371
3267
|
if (id === undefined || id === null)
|
|
3372
3268
|
throw new Error("The parameter 'id' must be defined.");
|
|
3373
3269
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3374
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3375
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3376
3270
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3377
3271
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3378
3272
|
if (tenantId === null)
|
|
@@ -3456,19 +3350,16 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3456
3350
|
/**
|
|
3457
3351
|
* Saves variable data printing information to design file and updates design in storage.
|
|
3458
3352
|
* @param id Design identifier
|
|
3459
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
3460
3353
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3461
3354
|
* @param tenantId (optional) Tenant identifier
|
|
3462
3355
|
* @param body (optional) Serialized vdp data
|
|
3463
3356
|
* @return Success
|
|
3464
3357
|
*/
|
|
3465
|
-
saveVdpData(id,
|
|
3466
|
-
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/
|
|
3358
|
+
saveVdpData(id, privateStorageOwner, tenantId, body, cancelToken) {
|
|
3359
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/vdp-data?";
|
|
3467
3360
|
if (id === undefined || id === null)
|
|
3468
3361
|
throw new Error("The parameter 'id' must be defined.");
|
|
3469
3362
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3470
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3471
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3472
3363
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3473
3364
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3474
3365
|
if (tenantId === null)
|
|
@@ -3542,20 +3433,17 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3542
3433
|
return Promise.resolve(null);
|
|
3543
3434
|
}
|
|
3544
3435
|
/**
|
|
3545
|
-
* Deletes variable data printing
|
|
3436
|
+
* Deletes variable data printing information from design file and updates design in storage.
|
|
3546
3437
|
* @param id Design identifier
|
|
3547
|
-
* @param privateStorage (optional) If set to 'true' design will be taken from private storage
|
|
3548
3438
|
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3549
3439
|
* @param tenantId (optional) Tenant identifier
|
|
3550
3440
|
* @return Success
|
|
3551
3441
|
*/
|
|
3552
|
-
deleteVdpData(id,
|
|
3553
|
-
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/
|
|
3442
|
+
deleteVdpData(id, privateStorageOwner, tenantId, cancelToken) {
|
|
3443
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/vdp-data?";
|
|
3554
3444
|
if (id === undefined || id === null)
|
|
3555
3445
|
throw new Error("The parameter 'id' must be defined.");
|
|
3556
3446
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3557
|
-
if (privateStorage !== undefined && privateStorage !== null)
|
|
3558
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
3559
3447
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3560
3448
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3561
3449
|
if (tenantId === null)
|
|
@@ -3625,13 +3513,105 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3625
3513
|
return Promise.resolve(null);
|
|
3626
3514
|
}
|
|
3627
3515
|
/**
|
|
3628
|
-
*
|
|
3516
|
+
* Loads product (design model) from resource file taken from storage
|
|
3517
|
+
* @param id Resource identifier
|
|
3518
|
+
* @param privateStorageOwner (optional) Private storage owner identifier
|
|
3629
3519
|
* @param tenantId (optional) Tenant identifier
|
|
3630
|
-
* @param body (optional) Items to flatten.
|
|
3631
3520
|
* @return Success
|
|
3632
3521
|
*/
|
|
3633
|
-
|
|
3634
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
3522
|
+
loadProductFromResource(id, privateStorageOwner, tenantId, cancelToken) {
|
|
3523
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/from-resource/{id}/model?";
|
|
3524
|
+
if (id === undefined || id === null)
|
|
3525
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3526
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3527
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3528
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3529
|
+
if (tenantId === null)
|
|
3530
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3531
|
+
else if (tenantId !== undefined)
|
|
3532
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3533
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3534
|
+
let options_ = {
|
|
3535
|
+
method: "GET",
|
|
3536
|
+
url: url_,
|
|
3537
|
+
headers: {
|
|
3538
|
+
"Accept": "application/json"
|
|
3539
|
+
},
|
|
3540
|
+
cancelToken
|
|
3541
|
+
};
|
|
3542
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3543
|
+
return this.instance.request(transformedOptions_);
|
|
3544
|
+
}).catch((_error) => {
|
|
3545
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3546
|
+
return _error.response;
|
|
3547
|
+
}
|
|
3548
|
+
else {
|
|
3549
|
+
throw _error;
|
|
3550
|
+
}
|
|
3551
|
+
}).then((_response) => {
|
|
3552
|
+
return this.transformResult(url_, _response, (_response) => this.processLoadProductFromResource(_response));
|
|
3553
|
+
});
|
|
3554
|
+
}
|
|
3555
|
+
processLoadProductFromResource(response) {
|
|
3556
|
+
const status = response.status;
|
|
3557
|
+
let _headers = {};
|
|
3558
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3559
|
+
for (let k in response.headers) {
|
|
3560
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3561
|
+
_headers[k] = response.headers[k];
|
|
3562
|
+
}
|
|
3563
|
+
}
|
|
3564
|
+
}
|
|
3565
|
+
if (status === 200) {
|
|
3566
|
+
const _responseText = response.data;
|
|
3567
|
+
let result200 = null;
|
|
3568
|
+
let resultData200 = _responseText;
|
|
3569
|
+
result200 = JSON.parse(resultData200);
|
|
3570
|
+
return Promise.resolve(result200);
|
|
3571
|
+
}
|
|
3572
|
+
else if (status === 404) {
|
|
3573
|
+
const _responseText = response.data;
|
|
3574
|
+
let result404 = null;
|
|
3575
|
+
let resultData404 = _responseText;
|
|
3576
|
+
result404 = JSON.parse(resultData404);
|
|
3577
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3578
|
+
}
|
|
3579
|
+
else if (status === 422) {
|
|
3580
|
+
const _responseText = response.data;
|
|
3581
|
+
let result422 = null;
|
|
3582
|
+
let resultData422 = _responseText;
|
|
3583
|
+
result422 = JSON.parse(resultData422);
|
|
3584
|
+
return throwException("Client Error", status, _responseText, _headers, result422);
|
|
3585
|
+
}
|
|
3586
|
+
else if (status === 401) {
|
|
3587
|
+
const _responseText = response.data;
|
|
3588
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3589
|
+
}
|
|
3590
|
+
else if (status === 403) {
|
|
3591
|
+
const _responseText = response.data;
|
|
3592
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3593
|
+
}
|
|
3594
|
+
else if (status === 500) {
|
|
3595
|
+
const _responseText = response.data;
|
|
3596
|
+
let result500 = null;
|
|
3597
|
+
let resultData500 = _responseText;
|
|
3598
|
+
result500 = JSON.parse(resultData500);
|
|
3599
|
+
return throwException("Internal server error", status, _responseText, _headers, result500);
|
|
3600
|
+
}
|
|
3601
|
+
else if (status !== 200 && status !== 204) {
|
|
3602
|
+
const _responseText = response.data;
|
|
3603
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3604
|
+
}
|
|
3605
|
+
return Promise.resolve(null);
|
|
3606
|
+
}
|
|
3607
|
+
/**
|
|
3608
|
+
* Converts colors
|
|
3609
|
+
* @param tenantId (optional) Tenant identifier
|
|
3610
|
+
* @param body (optional) Convert colors operation parameters
|
|
3611
|
+
* @return Success
|
|
3612
|
+
*/
|
|
3613
|
+
convertColors(tenantId, body, cancelToken) {
|
|
3614
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/model/convert-colors?";
|
|
3635
3615
|
if (tenantId === null)
|
|
3636
3616
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3637
3617
|
else if (tenantId !== undefined)
|
|
@@ -3658,10 +3638,10 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3658
3638
|
throw _error;
|
|
3659
3639
|
}
|
|
3660
3640
|
}).then((_response) => {
|
|
3661
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
3641
|
+
return this.transformResult(url_, _response, (_response) => this.processConvertColors(_response));
|
|
3662
3642
|
});
|
|
3663
3643
|
}
|
|
3664
|
-
|
|
3644
|
+
processConvertColors(response) {
|
|
3665
3645
|
const status = response.status;
|
|
3666
3646
|
let _headers = {};
|
|
3667
3647
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -3678,6 +3658,13 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3678
3658
|
result200 = JSON.parse(resultData200);
|
|
3679
3659
|
return Promise.resolve(result200);
|
|
3680
3660
|
}
|
|
3661
|
+
else if (status === 404) {
|
|
3662
|
+
const _responseText = response.data;
|
|
3663
|
+
let result404 = null;
|
|
3664
|
+
let resultData404 = _responseText;
|
|
3665
|
+
result404 = JSON.parse(resultData404);
|
|
3666
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3667
|
+
}
|
|
3681
3668
|
else if (status === 401) {
|
|
3682
3669
|
const _responseText = response.data;
|
|
3683
3670
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -3710,7 +3697,7 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3710
3697
|
* @return Success
|
|
3711
3698
|
*/
|
|
3712
3699
|
createItem(itemType, tenantId, sourceType, sourceId, sourceOwnerId, sourceFile, cancelToken) {
|
|
3713
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
3700
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items?";
|
|
3714
3701
|
if (itemType !== undefined && itemType !== null)
|
|
3715
3702
|
url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
|
|
3716
3703
|
if (tenantId === null)
|
|
@@ -3801,7 +3788,7 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3801
3788
|
* @return Success
|
|
3802
3789
|
*/
|
|
3803
3790
|
extractItemImage(tenantId, body, cancelToken) {
|
|
3804
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
3791
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/extract-image?";
|
|
3805
3792
|
if (tenantId === null)
|
|
3806
3793
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3807
3794
|
else if (tenantId !== undefined)
|
|
@@ -3870,30 +3857,27 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3870
3857
|
return Promise.resolve(null);
|
|
3871
3858
|
}
|
|
3872
3859
|
/**
|
|
3873
|
-
*
|
|
3874
|
-
* @param designId (optional) Public design ID.
|
|
3875
|
-
* @param privateDesignId (optional) Private design ID.
|
|
3876
|
-
* @param privateStorageOwner (optional) Private storage owner ID.
|
|
3860
|
+
* Flatten items.
|
|
3877
3861
|
* @param tenantId (optional) Tenant identifier
|
|
3862
|
+
* @param body (optional) Items to flatten.
|
|
3878
3863
|
* @return Success
|
|
3879
3864
|
*/
|
|
3880
|
-
|
|
3881
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
3882
|
-
if (designId !== undefined && designId !== null)
|
|
3883
|
-
url_ += "designId=" + encodeURIComponent("" + designId) + "&";
|
|
3884
|
-
if (privateDesignId !== undefined && privateDesignId !== null)
|
|
3885
|
-
url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
|
|
3886
|
-
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3887
|
-
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3865
|
+
flattenItems(tenantId, body, cancelToken) {
|
|
3866
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/model/items/flatten?";
|
|
3888
3867
|
if (tenantId === null)
|
|
3889
3868
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3890
3869
|
else if (tenantId !== undefined)
|
|
3891
3870
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3892
3871
|
url_ = url_.replace(/[?&]$/, "");
|
|
3872
|
+
const content_ = JSON.stringify(body);
|
|
3893
3873
|
let options_ = {
|
|
3874
|
+
data: content_,
|
|
3894
3875
|
method: "POST",
|
|
3895
3876
|
url: url_,
|
|
3896
|
-
headers: {
|
|
3877
|
+
headers: {
|
|
3878
|
+
"Content-Type": "application/json",
|
|
3879
|
+
"Accept": "application/json"
|
|
3880
|
+
},
|
|
3897
3881
|
cancelToken
|
|
3898
3882
|
};
|
|
3899
3883
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
@@ -3906,10 +3890,10 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3906
3890
|
throw _error;
|
|
3907
3891
|
}
|
|
3908
3892
|
}).then((_response) => {
|
|
3909
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
3893
|
+
return this.transformResult(url_, _response, (_response) => this.processFlattenItems(_response));
|
|
3910
3894
|
});
|
|
3911
3895
|
}
|
|
3912
|
-
|
|
3896
|
+
processFlattenItems(response) {
|
|
3913
3897
|
const status = response.status;
|
|
3914
3898
|
let _headers = {};
|
|
3915
3899
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -3919,9 +3903,12 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3919
3903
|
}
|
|
3920
3904
|
}
|
|
3921
3905
|
}
|
|
3922
|
-
if (status ===
|
|
3906
|
+
if (status === 200) {
|
|
3923
3907
|
const _responseText = response.data;
|
|
3924
|
-
|
|
3908
|
+
let result200 = null;
|
|
3909
|
+
let resultData200 = _responseText;
|
|
3910
|
+
result200 = JSON.parse(resultData200);
|
|
3911
|
+
return Promise.resolve(result200);
|
|
3925
3912
|
}
|
|
3926
3913
|
else if (status === 401) {
|
|
3927
3914
|
const _responseText = response.data;
|
|
@@ -3945,30 +3932,31 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3945
3932
|
return Promise.resolve(null);
|
|
3946
3933
|
}
|
|
3947
3934
|
/**
|
|
3948
|
-
*
|
|
3949
|
-
* @param
|
|
3950
|
-
* @param privateDesignId (optional) Private design ID.
|
|
3951
|
-
* @param privateStorageOwner (optional) Private storage owner ID.
|
|
3935
|
+
* Render product proof image with specified parameters.
|
|
3936
|
+
* @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied (default value is 'false').
|
|
3952
3937
|
* @param tenantId (optional) Tenant identifier
|
|
3938
|
+
* @param body (optional) Preview parameters.
|
|
3953
3939
|
* @return Success
|
|
3954
3940
|
*/
|
|
3955
|
-
|
|
3956
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
3957
|
-
if (
|
|
3958
|
-
url_ += "
|
|
3959
|
-
if (privateDesignId !== undefined && privateDesignId !== null)
|
|
3960
|
-
url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
|
|
3961
|
-
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3962
|
-
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3941
|
+
renderProduct(attachment, tenantId, body, cancelToken) {
|
|
3942
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/model/render-proof?";
|
|
3943
|
+
if (attachment !== undefined && attachment !== null)
|
|
3944
|
+
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
3963
3945
|
if (tenantId === null)
|
|
3964
3946
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3965
3947
|
else if (tenantId !== undefined)
|
|
3966
3948
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3967
3949
|
url_ = url_.replace(/[?&]$/, "");
|
|
3950
|
+
const content_ = JSON.stringify(body);
|
|
3968
3951
|
let options_ = {
|
|
3952
|
+
data: content_,
|
|
3953
|
+
responseType: "blob",
|
|
3969
3954
|
method: "POST",
|
|
3970
3955
|
url: url_,
|
|
3971
|
-
headers: {
|
|
3956
|
+
headers: {
|
|
3957
|
+
"Content-Type": "application/json",
|
|
3958
|
+
"Accept": "application/octet-stream"
|
|
3959
|
+
},
|
|
3972
3960
|
cancelToken
|
|
3973
3961
|
};
|
|
3974
3962
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
@@ -3981,10 +3969,10 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3981
3969
|
throw _error;
|
|
3982
3970
|
}
|
|
3983
3971
|
}).then((_response) => {
|
|
3984
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
3972
|
+
return this.transformResult(url_, _response, (_response) => this.processRenderProduct(_response));
|
|
3985
3973
|
});
|
|
3986
3974
|
}
|
|
3987
|
-
|
|
3975
|
+
processRenderProduct(response) {
|
|
3988
3976
|
const status = response.status;
|
|
3989
3977
|
let _headers = {};
|
|
3990
3978
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -3994,9 +3982,11 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3994
3982
|
}
|
|
3995
3983
|
}
|
|
3996
3984
|
}
|
|
3997
|
-
if (status ===
|
|
3998
|
-
const
|
|
3999
|
-
|
|
3985
|
+
if (status === 200 || status === 206) {
|
|
3986
|
+
const contentDisposition = response.headers ? response.headers["content-disposition"] : undefined;
|
|
3987
|
+
const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
3988
|
+
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
3989
|
+
return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
|
|
4000
3990
|
}
|
|
4001
3991
|
else if (status === 401) {
|
|
4002
3992
|
const _responseText = response.data;
|
|
@@ -4028,7 +4018,7 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4028
4018
|
* @return Success
|
|
4029
4019
|
*/
|
|
4030
4020
|
renderDesignPreview(attachment, tenantId, body, cancelToken) {
|
|
4031
|
-
let url_ = this.baseUrl + "/api/atoms/v1/render-
|
|
4021
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/render-preview?";
|
|
4032
4022
|
if (attachment !== undefined && attachment !== null)
|
|
4033
4023
|
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
4034
4024
|
if (tenantId === null)
|
|
@@ -4105,7 +4095,7 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4105
4095
|
* @return Success
|
|
4106
4096
|
*/
|
|
4107
4097
|
renderDesignPreviewToResource(tenantId, body, cancelToken) {
|
|
4108
|
-
let url_ = this.baseUrl + "/api/atoms/v1/render-
|
|
4098
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/render-preview/to-resource?";
|
|
4109
4099
|
if (tenantId === null)
|
|
4110
4100
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4111
4101
|
else if (tenantId !== undefined)
|
|
@@ -4182,7 +4172,7 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4182
4172
|
* @return Success
|
|
4183
4173
|
*/
|
|
4184
4174
|
renderDesignProof(attachment, tenantId, body, cancelToken) {
|
|
4185
|
-
let url_ = this.baseUrl + "/api/atoms/v1/render-
|
|
4175
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/render-proof?";
|
|
4186
4176
|
if (attachment !== undefined && attachment !== null)
|
|
4187
4177
|
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
4188
4178
|
if (tenantId === null)
|
|
@@ -4259,7 +4249,7 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4259
4249
|
* @return Success
|
|
4260
4250
|
*/
|
|
4261
4251
|
renderDesignProofToResource(tenantId, body, cancelToken) {
|
|
4262
|
-
let url_ = this.baseUrl + "/api/atoms/v1/render-
|
|
4252
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/render-proof/to-resource?";
|
|
4263
4253
|
if (tenantId === null)
|
|
4264
4254
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4265
4255
|
else if (tenantId !== undefined)
|
|
@@ -4328,31 +4318,31 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4328
4318
|
return Promise.resolve(null);
|
|
4329
4319
|
}
|
|
4330
4320
|
/**
|
|
4331
|
-
*
|
|
4332
|
-
* @param
|
|
4321
|
+
* Creates a private design from a public design.
|
|
4322
|
+
* @param designId (optional) Public design ID.
|
|
4323
|
+
* @param privateDesignId (optional) Private design ID.
|
|
4324
|
+
* @param privateStorageOwner (optional) Private storage owner ID.
|
|
4333
4325
|
* @param tenantId (optional) Tenant identifier
|
|
4334
|
-
* @param body (optional) Preview parameters.
|
|
4335
4326
|
* @return Success
|
|
4327
|
+
* @deprecated
|
|
4336
4328
|
*/
|
|
4337
|
-
|
|
4338
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
4339
|
-
if (
|
|
4340
|
-
url_ += "
|
|
4329
|
+
createPrivateDesignFromDesign(designId, privateDesignId, privateStorageOwner, tenantId, cancelToken) {
|
|
4330
|
+
let url_ = this.baseUrl + "/api/atoms/v1/private-designs/from-design?";
|
|
4331
|
+
if (designId !== undefined && designId !== null)
|
|
4332
|
+
url_ += "designId=" + encodeURIComponent("" + designId) + "&";
|
|
4333
|
+
if (privateDesignId !== undefined && privateDesignId !== null)
|
|
4334
|
+
url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
|
|
4335
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4336
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
4341
4337
|
if (tenantId === null)
|
|
4342
4338
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
4343
4339
|
else if (tenantId !== undefined)
|
|
4344
4340
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
4345
4341
|
url_ = url_.replace(/[?&]$/, "");
|
|
4346
|
-
const content_ = JSON.stringify(body);
|
|
4347
4342
|
let options_ = {
|
|
4348
|
-
data: content_,
|
|
4349
|
-
responseType: "blob",
|
|
4350
4343
|
method: "POST",
|
|
4351
4344
|
url: url_,
|
|
4352
|
-
headers: {
|
|
4353
|
-
"Content-Type": "application/json",
|
|
4354
|
-
"Accept": "application/octet-stream"
|
|
4355
|
-
},
|
|
4345
|
+
headers: {},
|
|
4356
4346
|
cancelToken
|
|
4357
4347
|
};
|
|
4358
4348
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
@@ -4365,10 +4355,10 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4365
4355
|
throw _error;
|
|
4366
4356
|
}
|
|
4367
4357
|
}).then((_response) => {
|
|
4368
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
4358
|
+
return this.transformResult(url_, _response, (_response) => this.processCreatePrivateDesignFromDesign(_response));
|
|
4369
4359
|
});
|
|
4370
4360
|
}
|
|
4371
|
-
|
|
4361
|
+
processCreatePrivateDesignFromDesign(response) {
|
|
4372
4362
|
const status = response.status;
|
|
4373
4363
|
let _headers = {};
|
|
4374
4364
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -4378,11 +4368,9 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4378
4368
|
}
|
|
4379
4369
|
}
|
|
4380
4370
|
}
|
|
4381
|
-
if (status ===
|
|
4382
|
-
const
|
|
4383
|
-
|
|
4384
|
-
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
4385
|
-
return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
|
|
4371
|
+
if (status === 201) {
|
|
4372
|
+
const _responseText = response.data;
|
|
4373
|
+
return Promise.resolve(null);
|
|
4386
4374
|
}
|
|
4387
4375
|
else if (status === 401) {
|
|
4388
4376
|
const _responseText = response.data;
|
|
@@ -4406,20 +4394,20 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4406
4394
|
return Promise.resolve(null);
|
|
4407
4395
|
}
|
|
4408
4396
|
/**
|
|
4409
|
-
*
|
|
4410
|
-
* @param
|
|
4411
|
-
* @param
|
|
4412
|
-
* @param privateStorageOwner (optional) Private storage owner
|
|
4397
|
+
* Creates a private design from a public resource.
|
|
4398
|
+
* @param resourceId (optional) Resource ID.
|
|
4399
|
+
* @param privateDesignId (optional) Private design ID.
|
|
4400
|
+
* @param privateStorageOwner (optional) Private storage owner ID.
|
|
4413
4401
|
* @param tenantId (optional) Tenant identifier
|
|
4414
4402
|
* @return Success
|
|
4403
|
+
* @deprecated
|
|
4415
4404
|
*/
|
|
4416
|
-
|
|
4417
|
-
let url_ = this.baseUrl + "/api/atoms/v1/
|
|
4418
|
-
if (
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
url_ += "privateStorage=" + encodeURIComponent("" + privateStorage) + "&";
|
|
4405
|
+
createPrivateDesignFromResource(resourceId, privateDesignId, privateStorageOwner, tenantId, cancelToken) {
|
|
4406
|
+
let url_ = this.baseUrl + "/api/atoms/v1/private-designs/from-resource?";
|
|
4407
|
+
if (resourceId !== undefined && resourceId !== null)
|
|
4408
|
+
url_ += "resourceId=" + encodeURIComponent("" + resourceId) + "&";
|
|
4409
|
+
if (privateDesignId !== undefined && privateDesignId !== null)
|
|
4410
|
+
url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
|
|
4423
4411
|
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
4424
4412
|
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
4425
4413
|
if (tenantId === null)
|
|
@@ -4428,11 +4416,9 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4428
4416
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
4429
4417
|
url_ = url_.replace(/[?&]$/, "");
|
|
4430
4418
|
let options_ = {
|
|
4431
|
-
method: "
|
|
4419
|
+
method: "POST",
|
|
4432
4420
|
url: url_,
|
|
4433
|
-
headers: {
|
|
4434
|
-
"Accept": "application/json"
|
|
4435
|
-
},
|
|
4421
|
+
headers: {},
|
|
4436
4422
|
cancelToken
|
|
4437
4423
|
};
|
|
4438
4424
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
@@ -4445,10 +4431,10 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4445
4431
|
throw _error;
|
|
4446
4432
|
}
|
|
4447
4433
|
}).then((_response) => {
|
|
4448
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
4434
|
+
return this.transformResult(url_, _response, (_response) => this.processCreatePrivateDesignFromResource(_response));
|
|
4449
4435
|
});
|
|
4450
4436
|
}
|
|
4451
|
-
|
|
4437
|
+
processCreatePrivateDesignFromResource(response) {
|
|
4452
4438
|
const status = response.status;
|
|
4453
4439
|
let _headers = {};
|
|
4454
4440
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -4458,26 +4444,9 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
4458
4444
|
}
|
|
4459
4445
|
}
|
|
4460
4446
|
}
|
|
4461
|
-
if (status ===
|
|
4462
|
-
const _responseText = response.data;
|
|
4463
|
-
let result200 = null;
|
|
4464
|
-
let resultData200 = _responseText;
|
|
4465
|
-
result200 = JSON.parse(resultData200);
|
|
4466
|
-
return Promise.resolve(result200);
|
|
4467
|
-
}
|
|
4468
|
-
else if (status === 404) {
|
|
4469
|
-
const _responseText = response.data;
|
|
4470
|
-
let result404 = null;
|
|
4471
|
-
let resultData404 = _responseText;
|
|
4472
|
-
result404 = JSON.parse(resultData404);
|
|
4473
|
-
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
4474
|
-
}
|
|
4475
|
-
else if (status === 422) {
|
|
4447
|
+
if (status === 201) {
|
|
4476
4448
|
const _responseText = response.data;
|
|
4477
|
-
|
|
4478
|
-
let resultData422 = _responseText;
|
|
4479
|
-
result422 = JSON.parse(resultData422);
|
|
4480
|
-
return throwException("Client Error", status, _responseText, _headers, result422);
|
|
4449
|
+
return Promise.resolve(null);
|
|
4481
4450
|
}
|
|
4482
4451
|
else if (status === 401) {
|
|
4483
4452
|
const _responseText = response.data;
|
|
@@ -6429,19 +6398,13 @@ export var ItemType;
|
|
|
6429
6398
|
ItemType["Clipart"] = "Clipart";
|
|
6430
6399
|
ItemType["Group"] = "Group";
|
|
6431
6400
|
})(ItemType || (ItemType = {}));
|
|
6432
|
-
/** Item souce types */
|
|
6401
|
+
/** Item souce types. */
|
|
6433
6402
|
export var ItemSourceType;
|
|
6434
6403
|
(function (ItemSourceType) {
|
|
6435
6404
|
ItemSourceType["File"] = "File";
|
|
6436
6405
|
ItemSourceType["ImageStorage"] = "ImageStorage";
|
|
6437
6406
|
ItemSourceType["PrivateImageStorage"] = "PrivateImageStorage";
|
|
6438
6407
|
})(ItemSourceType || (ItemSourceType = {}));
|
|
6439
|
-
/** Product preview file format. */
|
|
6440
|
-
export var ProductPreviewFormat;
|
|
6441
|
-
(function (ProductPreviewFormat) {
|
|
6442
|
-
ProductPreviewFormat["Jpeg"] = "Jpeg";
|
|
6443
|
-
ProductPreviewFormat["Png"] = "Png";
|
|
6444
|
-
})(ProductPreviewFormat || (ProductPreviewFormat = {}));
|
|
6445
6408
|
export var ProductProofFormat;
|
|
6446
6409
|
(function (ProductProofFormat) {
|
|
6447
6410
|
ProductProofFormat["Jpeg"] = "Jpeg";
|
|
@@ -6463,6 +6426,12 @@ export var ProductProofInterpolationMode;
|
|
|
6463
6426
|
ProductProofInterpolationMode["Anisotropic9"] = "Anisotropic9";
|
|
6464
6427
|
ProductProofInterpolationMode["Lanczos3"] = "Lanczos3";
|
|
6465
6428
|
})(ProductProofInterpolationMode || (ProductProofInterpolationMode = {}));
|
|
6429
|
+
/** Product preview file format. */
|
|
6430
|
+
export var ProductPreviewFormat;
|
|
6431
|
+
(function (ProductPreviewFormat) {
|
|
6432
|
+
ProductPreviewFormat["Jpeg"] = "Jpeg";
|
|
6433
|
+
ProductPreviewFormat["Png"] = "Png";
|
|
6434
|
+
})(ProductPreviewFormat || (ProductPreviewFormat = {}));
|
|
6466
6435
|
export class ApiException extends Error {
|
|
6467
6436
|
message;
|
|
6468
6437
|
status;
|