@aurigma/axios-design-atoms-api-client 2.46.1 → 2.48.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 +58 -9
- package/dist/cjs/design-atoms-api-client.js +96 -3
- package/dist/cjs/design-atoms-api-client.js.map +1 -1
- package/dist/esm/design-atoms-api-client.d.ts +58 -9
- package/dist/esm/design-atoms-api-client.js +95 -2
- package/dist/esm/design-atoms-api-client.js.map +1 -1
- package/package.json +1 -1
|
@@ -15,12 +15,12 @@ export declare class ApiClientBase {
|
|
|
15
15
|
}
|
|
16
16
|
export interface IBuildInfoApiClient {
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Get assembly build info.
|
|
19
19
|
* @return Success
|
|
20
20
|
*/
|
|
21
21
|
headInfo(): Promise<void>;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Get assembly build info.
|
|
24
24
|
* @return Success
|
|
25
25
|
*/
|
|
26
26
|
getInfo(): Promise<BuildInfoModel>;
|
|
@@ -31,13 +31,13 @@ export declare class BuildInfoApiClient extends ApiClientBase implements IBuildI
|
|
|
31
31
|
protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
|
|
32
32
|
constructor(configuration: ApiClientConfiguration, baseUrl?: string, instance?: AxiosInstance);
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* Get assembly build info.
|
|
35
35
|
* @return Success
|
|
36
36
|
*/
|
|
37
37
|
headInfo(cancelToken?: CancelToken | undefined): Promise<void>;
|
|
38
38
|
protected processHeadInfo(response: AxiosResponse): Promise<void>;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Get assembly build info.
|
|
41
41
|
* @return Success
|
|
42
42
|
*/
|
|
43
43
|
getInfo(cancelToken?: CancelToken | undefined): Promise<BuildInfoModel>;
|
|
@@ -545,6 +545,14 @@ export interface IDesignAtomsServiceApiClient {
|
|
|
545
545
|
* @return Success
|
|
546
546
|
*/
|
|
547
547
|
patchProduct(id: string | null, privateStorage?: boolean | null | undefined, privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, patchType?: ProductPatchType | undefined, replaceImageItemFileInfo_itemName?: string | null | undefined, replaceImageItemFileInfo_sourceFile?: FileParameter | null | undefined, replacePlaceholderItemContentInfo_placeholderItemName?: string | null | undefined, replacePlaceholderItemContentInfo_newContentType?: PlaceholderItemContentType | undefined, replacePlaceholderItemContentInfo_sourceFile?: FileParameter | null | undefined): Promise<void>;
|
|
548
|
+
/**
|
|
549
|
+
* Returns design parameters stored in product model.
|
|
550
|
+
* @param id Design identifier.
|
|
551
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
552
|
+
* @param tenantId (optional) Tenant identifier
|
|
553
|
+
* @return Success
|
|
554
|
+
*/
|
|
555
|
+
getDesignParameters(id: string | null, privateStorageOwner?: string | null | undefined, tenantId?: number | undefined): Promise<DesignParameters>;
|
|
548
556
|
/**
|
|
549
557
|
* Loads data schema from design file taken from storage
|
|
550
558
|
* @param id Design identifier
|
|
@@ -743,6 +751,15 @@ export declare class DesignAtomsServiceApiClient extends ApiClientBase implement
|
|
|
743
751
|
*/
|
|
744
752
|
patchProduct(id: string | null, privateStorage?: boolean | null | undefined, privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, patchType?: ProductPatchType | undefined, replaceImageItemFileInfo_itemName?: string | null | undefined, replaceImageItemFileInfo_sourceFile?: FileParameter | null | undefined, replacePlaceholderItemContentInfo_placeholderItemName?: string | null | undefined, replacePlaceholderItemContentInfo_newContentType?: PlaceholderItemContentType | undefined, replacePlaceholderItemContentInfo_sourceFile?: FileParameter | null | undefined, cancelToken?: CancelToken | undefined): Promise<void>;
|
|
745
753
|
protected processPatchProduct(response: AxiosResponse): Promise<void>;
|
|
754
|
+
/**
|
|
755
|
+
* Returns design parameters stored in product model.
|
|
756
|
+
* @param id Design identifier.
|
|
757
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
758
|
+
* @param tenantId (optional) Tenant identifier
|
|
759
|
+
* @return Success
|
|
760
|
+
*/
|
|
761
|
+
getDesignParameters(id: string | null, privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, cancelToken?: CancelToken | undefined): Promise<DesignParameters>;
|
|
762
|
+
protected processGetDesignParameters(response: AxiosResponse): Promise<DesignParameters>;
|
|
746
763
|
/**
|
|
747
764
|
* Loads data schema from design file taken from storage
|
|
748
765
|
* @param id Design identifier
|
|
@@ -1300,16 +1317,20 @@ export interface ProblemDetails {
|
|
|
1300
1317
|
detail?: string | null;
|
|
1301
1318
|
instance?: string | null;
|
|
1302
1319
|
}
|
|
1303
|
-
/** Information about a service */
|
|
1320
|
+
/** Information about a service. */
|
|
1304
1321
|
export interface BuildInfoModel {
|
|
1305
|
-
/** Version number */
|
|
1322
|
+
/** Version number. */
|
|
1306
1323
|
version?: string | null;
|
|
1307
|
-
/** Build date (UTC) */
|
|
1324
|
+
/** Build date (UTC). */
|
|
1308
1325
|
buildDate?: string | null;
|
|
1309
|
-
/** Build configuration (Debug | Release) */
|
|
1326
|
+
/** Build configuration (Debug | Release). */
|
|
1310
1327
|
configuration?: string | null;
|
|
1311
|
-
/** Service name */
|
|
1328
|
+
/** Service name. */
|
|
1312
1329
|
appName?: string | null;
|
|
1330
|
+
/** Aurigma.DesignAtoms version. */
|
|
1331
|
+
designAtomsVersion?: string | null;
|
|
1332
|
+
/** Aurigma.DesignAtoms.Model version. */
|
|
1333
|
+
designAtomsModelVersion?: string | null;
|
|
1313
1334
|
}
|
|
1314
1335
|
export interface FontsMethodData {
|
|
1315
1336
|
requestedFontsByPsName?: string[] | null;
|
|
@@ -1417,10 +1438,22 @@ export declare enum ImagePreviewFormat {
|
|
|
1417
1438
|
Jpeg = "Jpeg",
|
|
1418
1439
|
Png = "Png"
|
|
1419
1440
|
}
|
|
1441
|
+
/** Image preview fit mode. */
|
|
1442
|
+
export declare enum ImagePreviewFitMode {
|
|
1443
|
+
Fit = "Fit",
|
|
1444
|
+
Shrink = "Shrink",
|
|
1445
|
+
Resize = "Resize",
|
|
1446
|
+
Fill = "Fill"
|
|
1447
|
+
}
|
|
1420
1448
|
export interface ImagePreviewRenderingConfig {
|
|
1449
|
+
/** Image preview width. */
|
|
1421
1450
|
width?: number;
|
|
1451
|
+
/** Image preview height. */
|
|
1422
1452
|
height?: number;
|
|
1453
|
+
/** Image preview file format. */
|
|
1423
1454
|
fileFormat?: ImagePreviewFormat | null;
|
|
1455
|
+
/** Image preview fit mode. */
|
|
1456
|
+
fitMode?: ImagePreviewFitMode | null;
|
|
1424
1457
|
}
|
|
1425
1458
|
export interface RenderImagePreviewModel {
|
|
1426
1459
|
/** External image URL. */
|
|
@@ -1497,6 +1530,22 @@ export declare enum ProductPatchType {
|
|
|
1497
1530
|
export declare enum PlaceholderItemContentType {
|
|
1498
1531
|
Image = "Image"
|
|
1499
1532
|
}
|
|
1533
|
+
/** Measure unit description. */
|
|
1534
|
+
export interface MeasureUnitInfo {
|
|
1535
|
+
/** Measure unit name. */
|
|
1536
|
+
name?: string | null;
|
|
1537
|
+
/** Measure unit short name. */
|
|
1538
|
+
shortName?: string | null;
|
|
1539
|
+
/** Measure unit ratio (to point). */
|
|
1540
|
+
ratio?: number;
|
|
1541
|
+
}
|
|
1542
|
+
/** Specific design parameters stored in product model. */
|
|
1543
|
+
export interface DesignParameters {
|
|
1544
|
+
/** Design measure unit description. */
|
|
1545
|
+
measureUnit?: MeasureUnitInfo | null;
|
|
1546
|
+
/** Version of DesignAtoms library that used to save design file. */
|
|
1547
|
+
designAtomsVersion?: string | null;
|
|
1548
|
+
}
|
|
1500
1549
|
/** Variable information. */
|
|
1501
1550
|
export interface VariableInfo {
|
|
1502
1551
|
/** Variable name. */
|
|
@@ -58,7 +58,7 @@ export class BuildInfoApiClient extends ApiClientBase {
|
|
|
58
58
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
61
|
+
* Get assembly build info.
|
|
62
62
|
* @return Success
|
|
63
63
|
*/
|
|
64
64
|
headInfo(cancelToken) {
|
|
@@ -111,7 +111,7 @@ export class BuildInfoApiClient extends ApiClientBase {
|
|
|
111
111
|
return Promise.resolve(null);
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
|
-
*
|
|
114
|
+
* Get assembly build info.
|
|
115
115
|
* @return Success
|
|
116
116
|
*/
|
|
117
117
|
getInfo(cancelToken) {
|
|
@@ -2920,6 +2920,91 @@ export class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2920
2920
|
}
|
|
2921
2921
|
return Promise.resolve(null);
|
|
2922
2922
|
}
|
|
2923
|
+
/**
|
|
2924
|
+
* Returns design parameters stored in product model.
|
|
2925
|
+
* @param id Design identifier.
|
|
2926
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
2927
|
+
* @param tenantId (optional) Tenant identifier
|
|
2928
|
+
* @return Success
|
|
2929
|
+
*/
|
|
2930
|
+
getDesignParameters(id, privateStorageOwner, tenantId, cancelToken) {
|
|
2931
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/parameters?";
|
|
2932
|
+
if (id === undefined || id === null)
|
|
2933
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
2934
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2935
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
2936
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
2937
|
+
if (tenantId === null)
|
|
2938
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2939
|
+
else if (tenantId !== undefined)
|
|
2940
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2941
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2942
|
+
let options_ = {
|
|
2943
|
+
method: "GET",
|
|
2944
|
+
url: url_,
|
|
2945
|
+
headers: {
|
|
2946
|
+
"Accept": "application/json"
|
|
2947
|
+
},
|
|
2948
|
+
cancelToken
|
|
2949
|
+
};
|
|
2950
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2951
|
+
return this.instance.request(transformedOptions_);
|
|
2952
|
+
}).catch((_error) => {
|
|
2953
|
+
if (isAxiosError(_error) && _error.response) {
|
|
2954
|
+
return _error.response;
|
|
2955
|
+
}
|
|
2956
|
+
else {
|
|
2957
|
+
throw _error;
|
|
2958
|
+
}
|
|
2959
|
+
}).then((_response) => {
|
|
2960
|
+
return this.transformResult(url_, _response, (_response) => this.processGetDesignParameters(_response));
|
|
2961
|
+
});
|
|
2962
|
+
}
|
|
2963
|
+
processGetDesignParameters(response) {
|
|
2964
|
+
const status = response.status;
|
|
2965
|
+
let _headers = {};
|
|
2966
|
+
if (response.headers && typeof response.headers === "object") {
|
|
2967
|
+
for (let k in response.headers) {
|
|
2968
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
2969
|
+
_headers[k] = response.headers[k];
|
|
2970
|
+
}
|
|
2971
|
+
}
|
|
2972
|
+
}
|
|
2973
|
+
if (status === 200) {
|
|
2974
|
+
const _responseText = response.data;
|
|
2975
|
+
let result200 = null;
|
|
2976
|
+
let resultData200 = _responseText;
|
|
2977
|
+
result200 = JSON.parse(resultData200);
|
|
2978
|
+
return Promise.resolve(result200);
|
|
2979
|
+
}
|
|
2980
|
+
else if (status === 404) {
|
|
2981
|
+
const _responseText = response.data;
|
|
2982
|
+
let result404 = null;
|
|
2983
|
+
let resultData404 = _responseText;
|
|
2984
|
+
result404 = JSON.parse(resultData404);
|
|
2985
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2986
|
+
}
|
|
2987
|
+
else if (status === 401) {
|
|
2988
|
+
const _responseText = response.data;
|
|
2989
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2990
|
+
}
|
|
2991
|
+
else if (status === 403) {
|
|
2992
|
+
const _responseText = response.data;
|
|
2993
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2994
|
+
}
|
|
2995
|
+
else if (status === 500) {
|
|
2996
|
+
const _responseText = response.data;
|
|
2997
|
+
let result500 = null;
|
|
2998
|
+
let resultData500 = _responseText;
|
|
2999
|
+
result500 = JSON.parse(resultData500);
|
|
3000
|
+
return throwException("Internal server error", status, _responseText, _headers, result500);
|
|
3001
|
+
}
|
|
3002
|
+
else if (status !== 200 && status !== 204) {
|
|
3003
|
+
const _responseText = response.data;
|
|
3004
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3005
|
+
}
|
|
3006
|
+
return Promise.resolve(null);
|
|
3007
|
+
}
|
|
2923
3008
|
/**
|
|
2924
3009
|
* Loads data schema from design file taken from storage
|
|
2925
3010
|
* @param id Design identifier
|
|
@@ -6008,6 +6093,14 @@ export var ImagePreviewFormat;
|
|
|
6008
6093
|
ImagePreviewFormat["Jpeg"] = "Jpeg";
|
|
6009
6094
|
ImagePreviewFormat["Png"] = "Png";
|
|
6010
6095
|
})(ImagePreviewFormat || (ImagePreviewFormat = {}));
|
|
6096
|
+
/** Image preview fit mode. */
|
|
6097
|
+
export var ImagePreviewFitMode;
|
|
6098
|
+
(function (ImagePreviewFitMode) {
|
|
6099
|
+
ImagePreviewFitMode["Fit"] = "Fit";
|
|
6100
|
+
ImagePreviewFitMode["Shrink"] = "Shrink";
|
|
6101
|
+
ImagePreviewFitMode["Resize"] = "Resize";
|
|
6102
|
+
ImagePreviewFitMode["Fill"] = "Fill";
|
|
6103
|
+
})(ImagePreviewFitMode || (ImagePreviewFitMode = {}));
|
|
6011
6104
|
export var DesignElementType;
|
|
6012
6105
|
(function (DesignElementType) {
|
|
6013
6106
|
DesignElementType["Product"] = "Product";
|