@aurigma/axios-design-atoms-api-client 2.68.1 → 2.68.7
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 +92 -0
- package/dist/cjs/design-atoms-api-client.js +104 -1
- package/dist/cjs/design-atoms-api-client.js.map +1 -1
- package/dist/esm/design-atoms-api-client.d.ts +92 -0
- package/dist/esm/design-atoms-api-client.js +103 -0
- package/dist/esm/design-atoms-api-client.js.map +1 -1
- package/package.json +1 -1
|
@@ -1483,6 +1483,15 @@ export interface IDesignAtomsServiceApiClient {
|
|
|
1483
1483
|
* @return Created
|
|
1484
1484
|
*/
|
|
1485
1485
|
createDesign(privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, body?: CreateDesignModel | undefined): Promise<DesignInfo>;
|
|
1486
|
+
/**
|
|
1487
|
+
* Applies item data for a specified design file taken from storage.
|
|
1488
|
+
* @param id Design identifier.
|
|
1489
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
1490
|
+
* @param tenantId (optional) Tenant identifier
|
|
1491
|
+
* @param body (optional) Design items data.
|
|
1492
|
+
* @return Success
|
|
1493
|
+
*/
|
|
1494
|
+
applyItemsData(id: string, privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, body?: ApplyDesignItemsDataModel | undefined): Promise<void>;
|
|
1486
1495
|
/**
|
|
1487
1496
|
* Returns image content of the background.
|
|
1488
1497
|
* @param id Design identifier.
|
|
@@ -1721,6 +1730,16 @@ export declare class DesignAtomsServiceApiClient extends ApiClientBase implement
|
|
|
1721
1730
|
*/
|
|
1722
1731
|
createDesign(privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, body?: CreateDesignModel | undefined, cancelToken?: CancelToken | undefined): Promise<DesignInfo>;
|
|
1723
1732
|
protected processCreateDesign(response: AxiosResponse): Promise<DesignInfo>;
|
|
1733
|
+
/**
|
|
1734
|
+
* Applies item data for a specified design file taken from storage.
|
|
1735
|
+
* @param id Design identifier.
|
|
1736
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
1737
|
+
* @param tenantId (optional) Tenant identifier
|
|
1738
|
+
* @param body (optional) Design items data.
|
|
1739
|
+
* @return Success
|
|
1740
|
+
*/
|
|
1741
|
+
applyItemsData(id: string, privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, body?: ApplyDesignItemsDataModel | undefined, cancelToken?: CancelToken | undefined): Promise<void>;
|
|
1742
|
+
protected processApplyItemsData(response: AxiosResponse): Promise<void>;
|
|
1724
1743
|
/**
|
|
1725
1744
|
* Returns image content of the background.
|
|
1726
1745
|
* @param id Design identifier.
|
|
@@ -2378,6 +2397,13 @@ export declare class DesignAtomsViewerApiClient extends ApiClientBase implements
|
|
|
2378
2397
|
updateShapeItemHandler(tenantId?: number | undefined, body?: UpdateHandlerRequest | undefined, cancelToken?: CancelToken | undefined): Promise<any>;
|
|
2379
2398
|
protected processUpdateShapeItemHandler(response: AxiosResponse): Promise<any>;
|
|
2380
2399
|
}
|
|
2400
|
+
/** Design items data applying operation parameters. */
|
|
2401
|
+
export interface ApplyDesignItemsDataModel {
|
|
2402
|
+
/** Set of (item name - item data) pairs. */
|
|
2403
|
+
itemsData?: {
|
|
2404
|
+
[key: string]: DesignItemDataModel;
|
|
2405
|
+
} | null;
|
|
2406
|
+
}
|
|
2381
2407
|
/** Batch create items from storage source operation parameters. */
|
|
2382
2408
|
export interface BatchCreateItemsFromStorageModel {
|
|
2383
2409
|
/** Source image assets owner identifier. If value is set, all images should belong to a specified user. */
|
|
@@ -2486,6 +2512,56 @@ export interface DesignInfo {
|
|
|
2486
2512
|
name?: string | null;
|
|
2487
2513
|
private?: boolean;
|
|
2488
2514
|
}
|
|
2515
|
+
/** Design item data model parameters. */
|
|
2516
|
+
export interface DesignItemDataModel {
|
|
2517
|
+
/** Text item value. */
|
|
2518
|
+
text?: string | null;
|
|
2519
|
+
/** Text leading value. */
|
|
2520
|
+
leading?: number | null;
|
|
2521
|
+
/** Text tracking value. */
|
|
2522
|
+
tracking?: number | null;
|
|
2523
|
+
/** Text font parameters. */
|
|
2524
|
+
font?: DesignItemFontSettingsModel | null;
|
|
2525
|
+
/** Text item content alignment. */
|
|
2526
|
+
textAlignment?: TextAlignment | null;
|
|
2527
|
+
/** Text item content vertical alignment. */
|
|
2528
|
+
textVerticalAlignment?: TextVerticalAlignment | null;
|
|
2529
|
+
/** Flag that indicates if text should have underline. */
|
|
2530
|
+
underline?: boolean | null;
|
|
2531
|
+
/** Item color serialized value. */
|
|
2532
|
+
color?: string | null;
|
|
2533
|
+
/** Item border color serialized value. */
|
|
2534
|
+
borderColor?: string | null;
|
|
2535
|
+
/** Item fill color serialized value. */
|
|
2536
|
+
fillColor?: string | null;
|
|
2537
|
+
/** Text item fill color serialized value. */
|
|
2538
|
+
textFillColor?: string | null;
|
|
2539
|
+
/** Image item content source value. */
|
|
2540
|
+
image?: string | null;
|
|
2541
|
+
/** Item opacity value. */
|
|
2542
|
+
opacity?: number | null;
|
|
2543
|
+
/** Item border width. */
|
|
2544
|
+
borderWidth?: number | null;
|
|
2545
|
+
/** Barcode item color serialized value. */
|
|
2546
|
+
barcodeColor?: string | null;
|
|
2547
|
+
/** Raw barcode value. */
|
|
2548
|
+
barcodeValue?: string | null;
|
|
2549
|
+
/** Flag that indicates if an item should be visible. */
|
|
2550
|
+
visible?: boolean | null;
|
|
2551
|
+
}
|
|
2552
|
+
/** Design item font parameters. */
|
|
2553
|
+
export interface DesignItemFontSettingsModel {
|
|
2554
|
+
/** Font post script name. */
|
|
2555
|
+
postScriptName?: string | null;
|
|
2556
|
+
/** Font size. */
|
|
2557
|
+
size?: number;
|
|
2558
|
+
/** Flag that indicates whether font is bold. */
|
|
2559
|
+
fauxBold?: boolean;
|
|
2560
|
+
/** Flag that indicates whether font is italic. */
|
|
2561
|
+
fauxItalic?: boolean;
|
|
2562
|
+
/** Flag that indicates whether all letters should be capital. */
|
|
2563
|
+
allCaps?: boolean;
|
|
2564
|
+
}
|
|
2489
2565
|
/** Specific design parameters stored in product model. */
|
|
2490
2566
|
export interface DesignParameters {
|
|
2491
2567
|
/** Design measure unit description. */
|
|
@@ -2989,6 +3065,22 @@ export interface SizeModel {
|
|
|
2989
3065
|
/** Design item height. */
|
|
2990
3066
|
height?: number;
|
|
2991
3067
|
}
|
|
3068
|
+
/** Text item content alignment. */
|
|
3069
|
+
export declare enum TextAlignment {
|
|
3070
|
+
Left = "Left",
|
|
3071
|
+
Center = "Center",
|
|
3072
|
+
Right = "Right",
|
|
3073
|
+
All = "All",
|
|
3074
|
+
LastLeft = "LastLeft",
|
|
3075
|
+
LastRight = "LastRight",
|
|
3076
|
+
LastCenter = "LastCenter"
|
|
3077
|
+
}
|
|
3078
|
+
/** Text item content vertical alignment. */
|
|
3079
|
+
export declare enum TextVerticalAlignment {
|
|
3080
|
+
Top = "Top",
|
|
3081
|
+
Center = "Center",
|
|
3082
|
+
Bottom = "Bottom"
|
|
3083
|
+
}
|
|
2992
3084
|
export interface UnprocessableDesignElementDto {
|
|
2993
3085
|
/** Missing element type. */
|
|
2994
3086
|
readonly missingElementType?: DesignElementType | null;
|
|
@@ -6736,6 +6736,91 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
6736
6736
|
}
|
|
6737
6737
|
return Promise.resolve(null);
|
|
6738
6738
|
}
|
|
6739
|
+
/**
|
|
6740
|
+
* Applies item data for a specified design file taken from storage.
|
|
6741
|
+
* @param id Design identifier.
|
|
6742
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
6743
|
+
* @param tenantId (optional) Tenant identifier
|
|
6744
|
+
* @param body (optional) Design items data.
|
|
6745
|
+
* @return Success
|
|
6746
|
+
*/
|
|
6747
|
+
applyItemsData(id, privateStorageOwner, tenantId, body, cancelToken) {
|
|
6748
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/apply-items-data?";
|
|
6749
|
+
if (id === undefined || id === null)
|
|
6750
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
6751
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
6752
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
6753
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
6754
|
+
if (tenantId === null)
|
|
6755
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
6756
|
+
else if (tenantId !== undefined)
|
|
6757
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
6758
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6759
|
+
const content_ = JSON.stringify(body);
|
|
6760
|
+
let options_ = {
|
|
6761
|
+
data: content_,
|
|
6762
|
+
method: "POST",
|
|
6763
|
+
url: url_,
|
|
6764
|
+
headers: {
|
|
6765
|
+
"Content-Type": "application/json",
|
|
6766
|
+
},
|
|
6767
|
+
cancelToken
|
|
6768
|
+
};
|
|
6769
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6770
|
+
return this.instance.request(transformedOptions_);
|
|
6771
|
+
}).catch((_error) => {
|
|
6772
|
+
if (isAxiosError(_error) && _error.response) {
|
|
6773
|
+
return _error.response;
|
|
6774
|
+
}
|
|
6775
|
+
else {
|
|
6776
|
+
throw _error;
|
|
6777
|
+
}
|
|
6778
|
+
}).then((_response) => {
|
|
6779
|
+
return this.transformResult(url_, _response, (_response) => this.processApplyItemsData(_response));
|
|
6780
|
+
});
|
|
6781
|
+
}
|
|
6782
|
+
processApplyItemsData(response) {
|
|
6783
|
+
const status = response.status;
|
|
6784
|
+
let _headers = {};
|
|
6785
|
+
if (response.headers && typeof response.headers === "object") {
|
|
6786
|
+
for (let k in response.headers) {
|
|
6787
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
6788
|
+
_headers[k] = response.headers[k];
|
|
6789
|
+
}
|
|
6790
|
+
}
|
|
6791
|
+
}
|
|
6792
|
+
if (status === 200) {
|
|
6793
|
+
const _responseText = response.data;
|
|
6794
|
+
return Promise.resolve(null);
|
|
6795
|
+
}
|
|
6796
|
+
else if (status === 404) {
|
|
6797
|
+
const _responseText = response.data;
|
|
6798
|
+
let result404 = null;
|
|
6799
|
+
let resultData404 = _responseText;
|
|
6800
|
+
result404 = JSON.parse(resultData404);
|
|
6801
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
6802
|
+
}
|
|
6803
|
+
else if (status === 409) {
|
|
6804
|
+
const _responseText = response.data;
|
|
6805
|
+
let result409 = null;
|
|
6806
|
+
let resultData409 = _responseText;
|
|
6807
|
+
result409 = JSON.parse(resultData409);
|
|
6808
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
6809
|
+
}
|
|
6810
|
+
else if (status === 401) {
|
|
6811
|
+
const _responseText = response.data;
|
|
6812
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
6813
|
+
}
|
|
6814
|
+
else if (status === 403) {
|
|
6815
|
+
const _responseText = response.data;
|
|
6816
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
6817
|
+
}
|
|
6818
|
+
else if (status !== 200 && status !== 204) {
|
|
6819
|
+
const _responseText = response.data;
|
|
6820
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6821
|
+
}
|
|
6822
|
+
return Promise.resolve(null);
|
|
6823
|
+
}
|
|
6739
6824
|
/**
|
|
6740
6825
|
* Returns image content of the background.
|
|
6741
6826
|
* @param id Design identifier.
|
|
@@ -10723,6 +10808,24 @@ export var ProductProofInterpolationMode;
|
|
|
10723
10808
|
ProductProofInterpolationMode["Anisotropic9"] = "Anisotropic9";
|
|
10724
10809
|
ProductProofInterpolationMode["Lanczos3"] = "Lanczos3";
|
|
10725
10810
|
})(ProductProofInterpolationMode || (ProductProofInterpolationMode = {}));
|
|
10811
|
+
/** Text item content alignment. */
|
|
10812
|
+
export var TextAlignment;
|
|
10813
|
+
(function (TextAlignment) {
|
|
10814
|
+
TextAlignment["Left"] = "Left";
|
|
10815
|
+
TextAlignment["Center"] = "Center";
|
|
10816
|
+
TextAlignment["Right"] = "Right";
|
|
10817
|
+
TextAlignment["All"] = "All";
|
|
10818
|
+
TextAlignment["LastLeft"] = "LastLeft";
|
|
10819
|
+
TextAlignment["LastRight"] = "LastRight";
|
|
10820
|
+
TextAlignment["LastCenter"] = "LastCenter";
|
|
10821
|
+
})(TextAlignment || (TextAlignment = {}));
|
|
10822
|
+
/** Text item content vertical alignment. */
|
|
10823
|
+
export var TextVerticalAlignment;
|
|
10824
|
+
(function (TextVerticalAlignment) {
|
|
10825
|
+
TextVerticalAlignment["Top"] = "Top";
|
|
10826
|
+
TextVerticalAlignment["Center"] = "Center";
|
|
10827
|
+
TextVerticalAlignment["Bottom"] = "Bottom";
|
|
10828
|
+
})(TextVerticalAlignment || (TextVerticalAlignment = {}));
|
|
10726
10829
|
export class ApiException extends Error {
|
|
10727
10830
|
message;
|
|
10728
10831
|
status;
|