@aurigma/axios-design-atoms-api-client 2.42.1 → 2.43.2

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.
@@ -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 */
@@ -2044,17 +2044,112 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
2044
2044
  this.instance = instance ? instance : axios_1.create();
2045
2045
  this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
2046
2046
  }
2047
+ /**
2048
+ * Returns a 3D-Mockup attributes.
2049
+ * @param id 3D-Mockup identifier.
2050
+ * @param ownerId (optional) Private mockup owner identifier.
2051
+ * @param tenantId (optional) Tenant identifier
2052
+ * @return Success
2053
+ */
2054
+ getAttributes(id, ownerId, tenantId, cancelToken) {
2055
+ let url_ = this.baseUrl + "/api/atoms/v1/mockups-3d/{id}/attributes?";
2056
+ if (id === undefined || id === null)
2057
+ throw new Error("The parameter 'id' must be defined.");
2058
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
2059
+ if (ownerId !== undefined && ownerId !== null)
2060
+ url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
2061
+ if (tenantId === null)
2062
+ throw new Error("The parameter 'tenantId' cannot be null.");
2063
+ else if (tenantId !== undefined)
2064
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2065
+ url_ = url_.replace(/[?&]$/, "");
2066
+ let options_ = {
2067
+ method: "GET",
2068
+ url: url_,
2069
+ headers: {
2070
+ "Accept": "application/json"
2071
+ },
2072
+ cancelToken
2073
+ };
2074
+ return this.transformOptions(options_).then(transformedOptions_ => {
2075
+ return this.instance.request(transformedOptions_);
2076
+ }).catch((_error) => {
2077
+ if (isAxiosError(_error) && _error.response) {
2078
+ return _error.response;
2079
+ }
2080
+ else {
2081
+ throw _error;
2082
+ }
2083
+ }).then((_response) => {
2084
+ return this.transformResult(url_, _response, (_response) => this.processGetAttributes(_response));
2085
+ });
2086
+ }
2087
+ processGetAttributes(response) {
2088
+ const status = response.status;
2089
+ let _headers = {};
2090
+ if (response.headers && typeof response.headers === "object") {
2091
+ for (let k in response.headers) {
2092
+ if (response.headers.hasOwnProperty(k)) {
2093
+ _headers[k] = response.headers[k];
2094
+ }
2095
+ }
2096
+ }
2097
+ if (status === 200) {
2098
+ const _responseText = response.data;
2099
+ let result200 = null;
2100
+ let resultData200 = _responseText;
2101
+ result200 = JSON.parse(resultData200);
2102
+ return Promise.resolve(result200);
2103
+ }
2104
+ else if (status === 404) {
2105
+ const _responseText = response.data;
2106
+ let result404 = null;
2107
+ let resultData404 = _responseText;
2108
+ result404 = JSON.parse(resultData404);
2109
+ return throwException("Not Found", status, _responseText, _headers, result404);
2110
+ }
2111
+ else if (status === 422) {
2112
+ const _responseText = response.data;
2113
+ let result422 = null;
2114
+ let resultData422 = _responseText;
2115
+ result422 = JSON.parse(resultData422);
2116
+ return throwException("Client Error", status, _responseText, _headers, result422);
2117
+ }
2118
+ else if (status === 401) {
2119
+ const _responseText = response.data;
2120
+ return throwException("Unauthorized", status, _responseText, _headers);
2121
+ }
2122
+ else if (status === 403) {
2123
+ const _responseText = response.data;
2124
+ return throwException("Forbidden", status, _responseText, _headers);
2125
+ }
2126
+ else if (status === 500) {
2127
+ const _responseText = response.data;
2128
+ let result500 = null;
2129
+ let resultData500 = _responseText;
2130
+ result500 = JSON.parse(resultData500);
2131
+ return throwException("Internal server error", status, _responseText, _headers, result500);
2132
+ }
2133
+ else if (status !== 200 && status !== 204) {
2134
+ const _responseText = response.data;
2135
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2136
+ }
2137
+ return Promise.resolve(null);
2138
+ }
2047
2139
  /**
2048
2140
  * Returns a 3D-Mockup content as protobuf binary stream.
2049
2141
  * @param id 3D-Mockup identifier.
2142
+ * @param ownerId (optional) Private mockup owner identifier.
2050
2143
  * @param tenantId (optional) Tenant identifier
2051
2144
  * @return Success
2052
2145
  */
2053
- getContentAsProtobuf(id, tenantId, cancelToken) {
2146
+ getContentAsProtobuf(id, ownerId, tenantId, cancelToken) {
2054
2147
  let url_ = this.baseUrl + "/api/atoms/v1/mockups-3d/{id}/content/as-protobuf?";
2055
2148
  if (id === undefined || id === null)
2056
2149
  throw new Error("The parameter 'id' must be defined.");
2057
2150
  url_ = url_.replace("{id}", encodeURIComponent("" + id));
2151
+ if (ownerId !== undefined && ownerId !== null)
2152
+ url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
2058
2153
  if (tenantId === null)
2059
2154
  throw new Error("The parameter 'tenantId' cannot be null.");
2060
2155
  else if (tenantId !== undefined)
@@ -2136,14 +2231,17 @@ class DesignAtomsMockups3dApiClient extends ApiClientBase {
2136
2231
  /**
2137
2232
  * Returns a 3D-Mockup geometry as binary stream.
2138
2233
  * @param id 3D-Mockup identifier.
2234
+ * @param ownerId (optional) Private mockup owner identifier.
2139
2235
  * @param tenantId (optional) Tenant identifier
2140
2236
  * @return Success
2141
2237
  */
2142
- getGeometryFile(id, tenantId, cancelToken) {
2238
+ getGeometryFile(id, ownerId, tenantId, cancelToken) {
2143
2239
  let url_ = this.baseUrl + "/api/atoms/v1/mockups-3d/{id}/geometry/file?";
2144
2240
  if (id === undefined || id === null)
2145
2241
  throw new Error("The parameter 'id' must be defined.");
2146
2242
  url_ = url_.replace("{id}", encodeURIComponent("" + id));
2243
+ if (ownerId !== undefined && ownerId !== null)
2244
+ url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
2147
2245
  if (tenantId === null)
2148
2246
  throw new Error("The parameter 'tenantId' cannot be null.");
2149
2247
  else if (tenantId !== undefined)