@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. */
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
//----------------------
|
|
9
9
|
// ReSharper disable InconsistentNaming
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.ApiException = exports.ProductProofInterpolationMode = exports.ProductProofFormat = exports.ProductPreviewFormat = exports.ItemSourceType = exports.ItemType = exports.PlaceholderItemContentType = exports.ProductPatchType = exports.DesignElementType = exports.ImagePreviewFormat = exports.ColorSpace = exports.DesignAtomsViewerApiClient = exports.DesignAtomsServiceApiClient = exports.DesignAtomsMockups3dApiClient = exports.DesignAtomsImagesApiClient = exports.DesignAtomsCompatibilityApiClient = exports.BuildInfoApiClient = exports.ApiClientBase = exports.ApiClientConfiguration = void 0;
|
|
11
|
+
exports.ApiException = exports.ProductProofInterpolationMode = exports.ProductProofFormat = exports.ProductPreviewFormat = 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;
|
|
@@ -63,7 +63,7 @@ class BuildInfoApiClient extends ApiClientBase {
|
|
|
63
63
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
66
|
+
* Get assembly build info.
|
|
67
67
|
* @return Success
|
|
68
68
|
*/
|
|
69
69
|
headInfo(cancelToken) {
|
|
@@ -116,7 +116,7 @@ class BuildInfoApiClient extends ApiClientBase {
|
|
|
116
116
|
return Promise.resolve(null);
|
|
117
117
|
}
|
|
118
118
|
/**
|
|
119
|
-
*
|
|
119
|
+
* Get assembly build info.
|
|
120
120
|
* @return Success
|
|
121
121
|
*/
|
|
122
122
|
getInfo(cancelToken) {
|
|
@@ -2929,6 +2929,91 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2929
2929
|
}
|
|
2930
2930
|
return Promise.resolve(null);
|
|
2931
2931
|
}
|
|
2932
|
+
/**
|
|
2933
|
+
* Returns design parameters stored in product model.
|
|
2934
|
+
* @param id Design identifier.
|
|
2935
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
2936
|
+
* @param tenantId (optional) Tenant identifier
|
|
2937
|
+
* @return Success
|
|
2938
|
+
*/
|
|
2939
|
+
getDesignParameters(id, privateStorageOwner, tenantId, cancelToken) {
|
|
2940
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/parameters?";
|
|
2941
|
+
if (id === undefined || id === null)
|
|
2942
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
2943
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2944
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
2945
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
2946
|
+
if (tenantId === null)
|
|
2947
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2948
|
+
else if (tenantId !== undefined)
|
|
2949
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2950
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2951
|
+
let options_ = {
|
|
2952
|
+
method: "GET",
|
|
2953
|
+
url: url_,
|
|
2954
|
+
headers: {
|
|
2955
|
+
"Accept": "application/json"
|
|
2956
|
+
},
|
|
2957
|
+
cancelToken
|
|
2958
|
+
};
|
|
2959
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2960
|
+
return this.instance.request(transformedOptions_);
|
|
2961
|
+
}).catch((_error) => {
|
|
2962
|
+
if (isAxiosError(_error) && _error.response) {
|
|
2963
|
+
return _error.response;
|
|
2964
|
+
}
|
|
2965
|
+
else {
|
|
2966
|
+
throw _error;
|
|
2967
|
+
}
|
|
2968
|
+
}).then((_response) => {
|
|
2969
|
+
return this.transformResult(url_, _response, (_response) => this.processGetDesignParameters(_response));
|
|
2970
|
+
});
|
|
2971
|
+
}
|
|
2972
|
+
processGetDesignParameters(response) {
|
|
2973
|
+
const status = response.status;
|
|
2974
|
+
let _headers = {};
|
|
2975
|
+
if (response.headers && typeof response.headers === "object") {
|
|
2976
|
+
for (let k in response.headers) {
|
|
2977
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
2978
|
+
_headers[k] = response.headers[k];
|
|
2979
|
+
}
|
|
2980
|
+
}
|
|
2981
|
+
}
|
|
2982
|
+
if (status === 200) {
|
|
2983
|
+
const _responseText = response.data;
|
|
2984
|
+
let result200 = null;
|
|
2985
|
+
let resultData200 = _responseText;
|
|
2986
|
+
result200 = JSON.parse(resultData200);
|
|
2987
|
+
return Promise.resolve(result200);
|
|
2988
|
+
}
|
|
2989
|
+
else if (status === 404) {
|
|
2990
|
+
const _responseText = response.data;
|
|
2991
|
+
let result404 = null;
|
|
2992
|
+
let resultData404 = _responseText;
|
|
2993
|
+
result404 = JSON.parse(resultData404);
|
|
2994
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2995
|
+
}
|
|
2996
|
+
else if (status === 401) {
|
|
2997
|
+
const _responseText = response.data;
|
|
2998
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2999
|
+
}
|
|
3000
|
+
else if (status === 403) {
|
|
3001
|
+
const _responseText = response.data;
|
|
3002
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3003
|
+
}
|
|
3004
|
+
else if (status === 500) {
|
|
3005
|
+
const _responseText = response.data;
|
|
3006
|
+
let result500 = null;
|
|
3007
|
+
let resultData500 = _responseText;
|
|
3008
|
+
result500 = JSON.parse(resultData500);
|
|
3009
|
+
return throwException("Internal server error", status, _responseText, _headers, result500);
|
|
3010
|
+
}
|
|
3011
|
+
else if (status !== 200 && status !== 204) {
|
|
3012
|
+
const _responseText = response.data;
|
|
3013
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3014
|
+
}
|
|
3015
|
+
return Promise.resolve(null);
|
|
3016
|
+
}
|
|
2932
3017
|
/**
|
|
2933
3018
|
* Loads data schema from design file taken from storage
|
|
2934
3019
|
* @param id Design identifier
|
|
@@ -6019,6 +6104,14 @@ var ImagePreviewFormat;
|
|
|
6019
6104
|
ImagePreviewFormat["Jpeg"] = "Jpeg";
|
|
6020
6105
|
ImagePreviewFormat["Png"] = "Png";
|
|
6021
6106
|
})(ImagePreviewFormat = exports.ImagePreviewFormat || (exports.ImagePreviewFormat = {}));
|
|
6107
|
+
/** Image preview fit mode. */
|
|
6108
|
+
var ImagePreviewFitMode;
|
|
6109
|
+
(function (ImagePreviewFitMode) {
|
|
6110
|
+
ImagePreviewFitMode["Fit"] = "Fit";
|
|
6111
|
+
ImagePreviewFitMode["Shrink"] = "Shrink";
|
|
6112
|
+
ImagePreviewFitMode["Resize"] = "Resize";
|
|
6113
|
+
ImagePreviewFitMode["Fill"] = "Fill";
|
|
6114
|
+
})(ImagePreviewFitMode = exports.ImagePreviewFitMode || (exports.ImagePreviewFitMode = {}));
|
|
6022
6115
|
var DesignElementType;
|
|
6023
6116
|
(function (DesignElementType) {
|
|
6024
6117
|
DesignElementType["Product"] = "Product";
|