@aurigma/axios-design-atoms-api-client 2.42.1 → 2.44.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 +30 -4
- package/dist/cjs/design-atoms-api-client.js +100 -2
- package/dist/cjs/design-atoms-api-client.js.map +1 -1
- package/dist/esm/design-atoms-api-client.d.ts +30 -4
- package/dist/esm/design-atoms-api-client.js +100 -2
- package/dist/esm/design-atoms-api-client.js.map +1 -1
- package/package.json +1 -1
|
@@ -389,41 +389,62 @@ export declare class DesignAtomsImagesApiClient extends ApiClientBase implements
|
|
|
389
389
|
protected processRenderImagePreview(response: AxiosResponse): Promise<FileResponse>;
|
|
390
390
|
}
|
|
391
391
|
export interface IDesignAtomsMockups3dApiClient {
|
|
392
|
+
/**
|
|
393
|
+
* Returns a 3D-Mockup attributes.
|
|
394
|
+
* @param id 3D-Mockup identifier.
|
|
395
|
+
* @param ownerId (optional) Private mockup owner identifier.
|
|
396
|
+
* @param tenantId (optional) Tenant identifier
|
|
397
|
+
* @return Success
|
|
398
|
+
*/
|
|
399
|
+
getAttributes(id: string | null, ownerId?: string | null | undefined, tenantId?: number | undefined): Promise<Mockup3dAttributesDto>;
|
|
392
400
|
/**
|
|
393
401
|
* Returns a 3D-Mockup content as protobuf binary stream.
|
|
394
402
|
* @param id 3D-Mockup identifier.
|
|
403
|
+
* @param ownerId (optional) Private mockup owner identifier.
|
|
395
404
|
* @param tenantId (optional) Tenant identifier
|
|
396
405
|
* @return Success
|
|
397
406
|
*/
|
|
398
|
-
getContentAsProtobuf(id: string | null, tenantId?: number | undefined): Promise<FileResponse>;
|
|
407
|
+
getContentAsProtobuf(id: string | null, ownerId?: string | null | undefined, tenantId?: number | undefined): Promise<FileResponse>;
|
|
399
408
|
/**
|
|
400
409
|
* Returns a 3D-Mockup geometry as binary stream.
|
|
401
410
|
* @param id 3D-Mockup identifier.
|
|
411
|
+
* @param ownerId (optional) Private mockup owner identifier.
|
|
402
412
|
* @param tenantId (optional) Tenant identifier
|
|
403
413
|
* @return Success
|
|
404
414
|
*/
|
|
405
|
-
getGeometryFile(id: string | null, tenantId?: number | undefined): Promise<FileResponse>;
|
|
415
|
+
getGeometryFile(id: string | null, ownerId?: string | null | undefined, tenantId?: number | undefined): Promise<FileResponse>;
|
|
406
416
|
}
|
|
407
417
|
export declare class DesignAtomsMockups3dApiClient extends ApiClientBase implements IDesignAtomsMockups3dApiClient {
|
|
408
418
|
private instance;
|
|
409
419
|
private baseUrl;
|
|
410
420
|
protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
|
|
411
421
|
constructor(configuration: ApiClientConfiguration, baseUrl?: string, instance?: AxiosInstance);
|
|
422
|
+
/**
|
|
423
|
+
* Returns a 3D-Mockup attributes.
|
|
424
|
+
* @param id 3D-Mockup identifier.
|
|
425
|
+
* @param ownerId (optional) Private mockup owner identifier.
|
|
426
|
+
* @param tenantId (optional) Tenant identifier
|
|
427
|
+
* @return Success
|
|
428
|
+
*/
|
|
429
|
+
getAttributes(id: string | null, ownerId?: string | null | undefined, tenantId?: number | undefined, cancelToken?: CancelToken | undefined): Promise<Mockup3dAttributesDto>;
|
|
430
|
+
protected processGetAttributes(response: AxiosResponse): Promise<Mockup3dAttributesDto>;
|
|
412
431
|
/**
|
|
413
432
|
* Returns a 3D-Mockup content as protobuf binary stream.
|
|
414
433
|
* @param id 3D-Mockup identifier.
|
|
434
|
+
* @param ownerId (optional) Private mockup owner identifier.
|
|
415
435
|
* @param tenantId (optional) Tenant identifier
|
|
416
436
|
* @return Success
|
|
417
437
|
*/
|
|
418
|
-
getContentAsProtobuf(id: string | null, tenantId?: number | undefined, cancelToken?: CancelToken | undefined): Promise<FileResponse>;
|
|
438
|
+
getContentAsProtobuf(id: string | null, ownerId?: string | null | undefined, tenantId?: number | undefined, cancelToken?: CancelToken | undefined): Promise<FileResponse>;
|
|
419
439
|
protected processGetContentAsProtobuf(response: AxiosResponse): Promise<FileResponse>;
|
|
420
440
|
/**
|
|
421
441
|
* Returns a 3D-Mockup geometry as binary stream.
|
|
422
442
|
* @param id 3D-Mockup identifier.
|
|
443
|
+
* @param ownerId (optional) Private mockup owner identifier.
|
|
423
444
|
* @param tenantId (optional) Tenant identifier
|
|
424
445
|
* @return Success
|
|
425
446
|
*/
|
|
426
|
-
getGeometryFile(id: string | null, tenantId?: number | undefined, cancelToken?: CancelToken | undefined): Promise<FileResponse>;
|
|
447
|
+
getGeometryFile(id: string | null, ownerId?: string | null | undefined, tenantId?: number | undefined, cancelToken?: CancelToken | undefined): Promise<FileResponse>;
|
|
427
448
|
protected processGetGeometryFile(response: AxiosResponse): Promise<FileResponse>;
|
|
428
449
|
}
|
|
429
450
|
export interface IDesignAtomsServiceApiClient {
|
|
@@ -1321,6 +1342,11 @@ export interface RenderImagePreviewModel {
|
|
|
1321
1342
|
/** Output image format. PNG by default. */
|
|
1322
1343
|
fileFormat?: ImagePreviewFormat | null;
|
|
1323
1344
|
}
|
|
1345
|
+
export interface Mockup3dAttributesDto {
|
|
1346
|
+
data?: {
|
|
1347
|
+
[key: string]: string;
|
|
1348
|
+
} | null;
|
|
1349
|
+
}
|
|
1324
1350
|
/** Convert colors operation parameters */
|
|
1325
1351
|
export interface ConvertColorsModel {
|
|
1326
1352
|
/** Serialized color description */
|
|
@@ -2036,17 +2036,112 @@ export class DesignAtomsMockups3dApiClient extends ApiClientBase {
|
|
|
2036
2036
|
this.instance = instance ? instance : axios.create();
|
|
2037
2037
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
2038
2038
|
}
|
|
2039
|
+
/**
|
|
2040
|
+
* Returns a 3D-Mockup attributes.
|
|
2041
|
+
* @param id 3D-Mockup identifier.
|
|
2042
|
+
* @param ownerId (optional) Private mockup owner identifier.
|
|
2043
|
+
* @param tenantId (optional) Tenant identifier
|
|
2044
|
+
* @return Success
|
|
2045
|
+
*/
|
|
2046
|
+
getAttributes(id, ownerId, tenantId, cancelToken) {
|
|
2047
|
+
let url_ = this.baseUrl + "/api/atoms/v1/mockups-3d/{id}/attributes?";
|
|
2048
|
+
if (id === undefined || id === null)
|
|
2049
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
2050
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2051
|
+
if (ownerId !== undefined && ownerId !== null)
|
|
2052
|
+
url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
|
|
2053
|
+
if (tenantId === null)
|
|
2054
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2055
|
+
else if (tenantId !== undefined)
|
|
2056
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2057
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2058
|
+
let options_ = {
|
|
2059
|
+
method: "GET",
|
|
2060
|
+
url: url_,
|
|
2061
|
+
headers: {
|
|
2062
|
+
"Accept": "application/json"
|
|
2063
|
+
},
|
|
2064
|
+
cancelToken
|
|
2065
|
+
};
|
|
2066
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2067
|
+
return this.instance.request(transformedOptions_);
|
|
2068
|
+
}).catch((_error) => {
|
|
2069
|
+
if (isAxiosError(_error) && _error.response) {
|
|
2070
|
+
return _error.response;
|
|
2071
|
+
}
|
|
2072
|
+
else {
|
|
2073
|
+
throw _error;
|
|
2074
|
+
}
|
|
2075
|
+
}).then((_response) => {
|
|
2076
|
+
return this.transformResult(url_, _response, (_response) => this.processGetAttributes(_response));
|
|
2077
|
+
});
|
|
2078
|
+
}
|
|
2079
|
+
processGetAttributes(response) {
|
|
2080
|
+
const status = response.status;
|
|
2081
|
+
let _headers = {};
|
|
2082
|
+
if (response.headers && typeof response.headers === "object") {
|
|
2083
|
+
for (let k in response.headers) {
|
|
2084
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
2085
|
+
_headers[k] = response.headers[k];
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
if (status === 200) {
|
|
2090
|
+
const _responseText = response.data;
|
|
2091
|
+
let result200 = null;
|
|
2092
|
+
let resultData200 = _responseText;
|
|
2093
|
+
result200 = JSON.parse(resultData200);
|
|
2094
|
+
return Promise.resolve(result200);
|
|
2095
|
+
}
|
|
2096
|
+
else if (status === 404) {
|
|
2097
|
+
const _responseText = response.data;
|
|
2098
|
+
let result404 = null;
|
|
2099
|
+
let resultData404 = _responseText;
|
|
2100
|
+
result404 = JSON.parse(resultData404);
|
|
2101
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2102
|
+
}
|
|
2103
|
+
else if (status === 422) {
|
|
2104
|
+
const _responseText = response.data;
|
|
2105
|
+
let result422 = null;
|
|
2106
|
+
let resultData422 = _responseText;
|
|
2107
|
+
result422 = JSON.parse(resultData422);
|
|
2108
|
+
return throwException("Client Error", status, _responseText, _headers, result422);
|
|
2109
|
+
}
|
|
2110
|
+
else if (status === 401) {
|
|
2111
|
+
const _responseText = response.data;
|
|
2112
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2113
|
+
}
|
|
2114
|
+
else if (status === 403) {
|
|
2115
|
+
const _responseText = response.data;
|
|
2116
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2117
|
+
}
|
|
2118
|
+
else if (status === 500) {
|
|
2119
|
+
const _responseText = response.data;
|
|
2120
|
+
let result500 = null;
|
|
2121
|
+
let resultData500 = _responseText;
|
|
2122
|
+
result500 = JSON.parse(resultData500);
|
|
2123
|
+
return throwException("Internal server error", status, _responseText, _headers, result500);
|
|
2124
|
+
}
|
|
2125
|
+
else if (status !== 200 && status !== 204) {
|
|
2126
|
+
const _responseText = response.data;
|
|
2127
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2128
|
+
}
|
|
2129
|
+
return Promise.resolve(null);
|
|
2130
|
+
}
|
|
2039
2131
|
/**
|
|
2040
2132
|
* Returns a 3D-Mockup content as protobuf binary stream.
|
|
2041
2133
|
* @param id 3D-Mockup identifier.
|
|
2134
|
+
* @param ownerId (optional) Private mockup owner identifier.
|
|
2042
2135
|
* @param tenantId (optional) Tenant identifier
|
|
2043
2136
|
* @return Success
|
|
2044
2137
|
*/
|
|
2045
|
-
getContentAsProtobuf(id, tenantId, cancelToken) {
|
|
2138
|
+
getContentAsProtobuf(id, ownerId, tenantId, cancelToken) {
|
|
2046
2139
|
let url_ = this.baseUrl + "/api/atoms/v1/mockups-3d/{id}/content/as-protobuf?";
|
|
2047
2140
|
if (id === undefined || id === null)
|
|
2048
2141
|
throw new Error("The parameter 'id' must be defined.");
|
|
2049
2142
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2143
|
+
if (ownerId !== undefined && ownerId !== null)
|
|
2144
|
+
url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
|
|
2050
2145
|
if (tenantId === null)
|
|
2051
2146
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2052
2147
|
else if (tenantId !== undefined)
|
|
@@ -2128,14 +2223,17 @@ export class DesignAtomsMockups3dApiClient extends ApiClientBase {
|
|
|
2128
2223
|
/**
|
|
2129
2224
|
* Returns a 3D-Mockup geometry as binary stream.
|
|
2130
2225
|
* @param id 3D-Mockup identifier.
|
|
2226
|
+
* @param ownerId (optional) Private mockup owner identifier.
|
|
2131
2227
|
* @param tenantId (optional) Tenant identifier
|
|
2132
2228
|
* @return Success
|
|
2133
2229
|
*/
|
|
2134
|
-
getGeometryFile(id, tenantId, cancelToken) {
|
|
2230
|
+
getGeometryFile(id, ownerId, tenantId, cancelToken) {
|
|
2135
2231
|
let url_ = this.baseUrl + "/api/atoms/v1/mockups-3d/{id}/geometry/file?";
|
|
2136
2232
|
if (id === undefined || id === null)
|
|
2137
2233
|
throw new Error("The parameter 'id' must be defined.");
|
|
2138
2234
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2235
|
+
if (ownerId !== undefined && ownerId !== null)
|
|
2236
|
+
url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
|
|
2139
2237
|
if (tenantId === null)
|
|
2140
2238
|
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2141
2239
|
else if (tenantId !== undefined)
|