@ignos/api-client 20240320.0.9040 → 20240327.0.9055

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.
@@ -8305,6 +8305,50 @@ export class CncSetupClient extends AuthorizedApiBase {
8305
8305
  }
8306
8306
  return Promise.resolve(null);
8307
8307
  }
8308
+ copyToolsCncMachine(request) {
8309
+ let url_ = this.baseUrl + "/cncsetup/operations/copytoolscncmachine";
8310
+ url_ = url_.replace(/[?&]$/, "");
8311
+ const content_ = JSON.stringify(request);
8312
+ let options_ = {
8313
+ body: content_,
8314
+ method: "POST",
8315
+ headers: {
8316
+ "Content-Type": "application/json",
8317
+ "Accept": "application/json"
8318
+ }
8319
+ };
8320
+ return this.transformOptions(options_).then(transformedOptions_ => {
8321
+ return this.http.fetch(url_, transformedOptions_);
8322
+ }).then((_response) => {
8323
+ return this.processCopyToolsCncMachine(_response);
8324
+ });
8325
+ }
8326
+ processCopyToolsCncMachine(response) {
8327
+ const status = response.status;
8328
+ let _headers = {};
8329
+ if (response.headers && response.headers.forEach) {
8330
+ response.headers.forEach((v, k) => _headers[k] = v);
8331
+ }
8332
+ ;
8333
+ if (status === 200) {
8334
+ return response.text().then((_responseText) => {
8335
+ let result200 = null;
8336
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
8337
+ if (Array.isArray(resultData200)) {
8338
+ result200 = [];
8339
+ for (let item of resultData200)
8340
+ result200.push(CncToolDto.fromJS(item));
8341
+ }
8342
+ return result200;
8343
+ });
8344
+ }
8345
+ else if (status !== 200 && status !== 204) {
8346
+ return response.text().then((_responseText) => {
8347
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
8348
+ });
8349
+ }
8350
+ return Promise.resolve(null);
8351
+ }
8308
8352
  createUploadProgramsInfo(id, request) {
8309
8353
  let url_ = this.baseUrl + "/cncsetup/operations/{id}/programs";
8310
8354
  if (id === undefined || id === null)
@@ -9269,6 +9313,93 @@ export class CncSetupClient extends AuthorizedApiBase {
9269
9313
  }
9270
9314
  return Promise.resolve(null);
9271
9315
  }
9316
+ uploadCncMachineToolImage(machineId, id, request) {
9317
+ let url_ = this.baseUrl + "/cncsetup/machines/{machineId}/tools/{id}/uploadimage";
9318
+ if (machineId === undefined || machineId === null)
9319
+ throw new Error("The parameter 'machineId' must be defined.");
9320
+ url_ = url_.replace("{machineId}", encodeURIComponent("" + machineId));
9321
+ if (id === undefined || id === null)
9322
+ throw new Error("The parameter 'id' must be defined.");
9323
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
9324
+ url_ = url_.replace(/[?&]$/, "");
9325
+ const content_ = JSON.stringify(request);
9326
+ let options_ = {
9327
+ body: content_,
9328
+ method: "POST",
9329
+ headers: {
9330
+ "Content-Type": "application/json",
9331
+ "Accept": "application/json"
9332
+ }
9333
+ };
9334
+ return this.transformOptions(options_).then(transformedOptions_ => {
9335
+ return this.http.fetch(url_, transformedOptions_);
9336
+ }).then((_response) => {
9337
+ return this.processUploadCncMachineToolImage(_response);
9338
+ });
9339
+ }
9340
+ processUploadCncMachineToolImage(response) {
9341
+ const status = response.status;
9342
+ let _headers = {};
9343
+ if (response.headers && response.headers.forEach) {
9344
+ response.headers.forEach((v, k) => _headers[k] = v);
9345
+ }
9346
+ ;
9347
+ if (status === 200) {
9348
+ return response.text().then((_responseText) => {
9349
+ let result200 = null;
9350
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
9351
+ result200 = ImageFileDto.fromJS(resultData200);
9352
+ return result200;
9353
+ });
9354
+ }
9355
+ else if (status !== 200 && status !== 204) {
9356
+ return response.text().then((_responseText) => {
9357
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
9358
+ });
9359
+ }
9360
+ return Promise.resolve(null);
9361
+ }
9362
+ deleteCncMachineToolImage(machineId, id, filename) {
9363
+ let url_ = this.baseUrl + "/cncsetup/machines/{machineId}/tools/{id}/{filename}";
9364
+ if (machineId === undefined || machineId === null)
9365
+ throw new Error("The parameter 'machineId' must be defined.");
9366
+ url_ = url_.replace("{machineId}", encodeURIComponent("" + machineId));
9367
+ if (id === undefined || id === null)
9368
+ throw new Error("The parameter 'id' must be defined.");
9369
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
9370
+ if (filename === undefined || filename === null)
9371
+ throw new Error("The parameter 'filename' must be defined.");
9372
+ url_ = url_.replace("{filename}", encodeURIComponent("" + filename));
9373
+ url_ = url_.replace(/[?&]$/, "");
9374
+ let options_ = {
9375
+ method: "DELETE",
9376
+ headers: {}
9377
+ };
9378
+ return this.transformOptions(options_).then(transformedOptions_ => {
9379
+ return this.http.fetch(url_, transformedOptions_);
9380
+ }).then((_response) => {
9381
+ return this.processDeleteCncMachineToolImage(_response);
9382
+ });
9383
+ }
9384
+ processDeleteCncMachineToolImage(response) {
9385
+ const status = response.status;
9386
+ let _headers = {};
9387
+ if (response.headers && response.headers.forEach) {
9388
+ response.headers.forEach((v, k) => _headers[k] = v);
9389
+ }
9390
+ ;
9391
+ if (status === 204) {
9392
+ return response.text().then((_responseText) => {
9393
+ return;
9394
+ });
9395
+ }
9396
+ else if (status !== 200 && status !== 204) {
9397
+ return response.text().then((_responseText) => {
9398
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
9399
+ });
9400
+ }
9401
+ return Promise.resolve(null);
9402
+ }
9272
9403
  importOperationWithTools(request) {
9273
9404
  let url_ = this.baseUrl + "/cncsetup/import";
9274
9405
  url_ = url_.replace(/[?&]$/, "");
@@ -25718,6 +25849,197 @@ export class CopyCncMachineOperationDto {
25718
25849
  return data;
25719
25850
  }
25720
25851
  }
25852
+ export class CncToolDto {
25853
+ constructor(data) {
25854
+ if (data) {
25855
+ for (var property in data) {
25856
+ if (data.hasOwnProperty(property))
25857
+ this[property] = data[property];
25858
+ }
25859
+ }
25860
+ }
25861
+ init(_data) {
25862
+ if (_data) {
25863
+ this.id = _data["id"];
25864
+ this.toolTypeId = _data["toolTypeId"];
25865
+ this.toolType = _data["toolType"];
25866
+ this.toolSubTypeId = _data["toolSubTypeId"];
25867
+ this.toolSubTypeName = _data["toolSubTypeName"];
25868
+ this.toolNumber = _data["toolNumber"];
25869
+ this.toolSuffix = _data["toolSuffix"];
25870
+ this.description = _data["description"];
25871
+ this.holderDescription = _data["holderDescription"];
25872
+ this.geometry = _data["geometry"];
25873
+ this.size = _data["size"];
25874
+ this.diameter = _data["diameter"];
25875
+ this.grade = _data["grade"];
25876
+ this.radius = _data["radius"];
25877
+ this.width = _data["width"];
25878
+ this.pitch = _data["pitch"];
25879
+ this.length = _data["length"];
25880
+ this.kapr = _data["kapr"];
25881
+ this.teeth = _data["teeth"];
25882
+ this.stickOut = _data["stickOut"];
25883
+ this.apmx = _data["apmx"];
25884
+ this.usableLength = _data["usableLength"];
25885
+ if (Array.isArray(_data["images"])) {
25886
+ this.images = [];
25887
+ for (let item of _data["images"])
25888
+ this.images.push(ImageFileDto.fromJS(item));
25889
+ }
25890
+ this.auditInfo = _data["auditInfo"] ? CncSetupAuditDto.fromJS(_data["auditInfo"]) : undefined;
25891
+ }
25892
+ }
25893
+ static fromJS(data) {
25894
+ data = typeof data === 'object' ? data : {};
25895
+ let result = new CncToolDto();
25896
+ result.init(data);
25897
+ return result;
25898
+ }
25899
+ toJSON(data) {
25900
+ data = typeof data === 'object' ? data : {};
25901
+ data["id"] = this.id;
25902
+ data["toolTypeId"] = this.toolTypeId;
25903
+ data["toolType"] = this.toolType;
25904
+ data["toolSubTypeId"] = this.toolSubTypeId;
25905
+ data["toolSubTypeName"] = this.toolSubTypeName;
25906
+ data["toolNumber"] = this.toolNumber;
25907
+ data["toolSuffix"] = this.toolSuffix;
25908
+ data["description"] = this.description;
25909
+ data["holderDescription"] = this.holderDescription;
25910
+ data["geometry"] = this.geometry;
25911
+ data["size"] = this.size;
25912
+ data["diameter"] = this.diameter;
25913
+ data["grade"] = this.grade;
25914
+ data["radius"] = this.radius;
25915
+ data["width"] = this.width;
25916
+ data["pitch"] = this.pitch;
25917
+ data["length"] = this.length;
25918
+ data["kapr"] = this.kapr;
25919
+ data["teeth"] = this.teeth;
25920
+ data["stickOut"] = this.stickOut;
25921
+ data["apmx"] = this.apmx;
25922
+ data["usableLength"] = this.usableLength;
25923
+ if (Array.isArray(this.images)) {
25924
+ data["images"] = [];
25925
+ for (let item of this.images)
25926
+ data["images"].push(item.toJSON());
25927
+ }
25928
+ data["auditInfo"] = this.auditInfo ? this.auditInfo.toJSON() : undefined;
25929
+ return data;
25930
+ }
25931
+ }
25932
+ export class ImageFileDto {
25933
+ constructor(data) {
25934
+ if (data) {
25935
+ for (var property in data) {
25936
+ if (data.hasOwnProperty(property))
25937
+ this[property] = data[property];
25938
+ }
25939
+ }
25940
+ }
25941
+ init(_data) {
25942
+ if (_data) {
25943
+ this.url = _data["url"];
25944
+ this.name = _data["name"];
25945
+ this.thumbnailUrl = _data["thumbnailUrl"];
25946
+ }
25947
+ }
25948
+ static fromJS(data) {
25949
+ data = typeof data === 'object' ? data : {};
25950
+ let result = new ImageFileDto();
25951
+ result.init(data);
25952
+ return result;
25953
+ }
25954
+ toJSON(data) {
25955
+ data = typeof data === 'object' ? data : {};
25956
+ data["url"] = this.url;
25957
+ data["name"] = this.name;
25958
+ data["thumbnailUrl"] = this.thumbnailUrl;
25959
+ return data;
25960
+ }
25961
+ }
25962
+ export class CncSetupAuditDto {
25963
+ constructor(data) {
25964
+ if (data) {
25965
+ for (var property in data) {
25966
+ if (data.hasOwnProperty(property))
25967
+ this[property] = data[property];
25968
+ }
25969
+ }
25970
+ }
25971
+ init(_data) {
25972
+ if (_data) {
25973
+ this.created = _data["created"] ? new Date(_data["created"].toString()) : undefined;
25974
+ this.createdBy = _data["createdBy"];
25975
+ this.createdById = _data["createdById"];
25976
+ this.createdByName = _data["createdByName"];
25977
+ this.updated = _data["updated"] ? new Date(_data["updated"].toString()) : undefined;
25978
+ this.updatedBy = _data["updatedBy"];
25979
+ this.updatedById = _data["updatedById"];
25980
+ this.updatedByName = _data["updatedByName"];
25981
+ }
25982
+ }
25983
+ static fromJS(data) {
25984
+ data = typeof data === 'object' ? data : {};
25985
+ let result = new CncSetupAuditDto();
25986
+ result.init(data);
25987
+ return result;
25988
+ }
25989
+ toJSON(data) {
25990
+ data = typeof data === 'object' ? data : {};
25991
+ data["created"] = this.created ? this.created.toISOString() : undefined;
25992
+ data["createdBy"] = this.createdBy;
25993
+ data["createdById"] = this.createdById;
25994
+ data["createdByName"] = this.createdByName;
25995
+ data["updated"] = this.updated ? this.updated.toISOString() : undefined;
25996
+ data["updatedBy"] = this.updatedBy;
25997
+ data["updatedById"] = this.updatedById;
25998
+ data["updatedByName"] = this.updatedByName;
25999
+ return data;
26000
+ }
26001
+ }
26002
+ export class CopyToolsCncMachine {
26003
+ constructor(data) {
26004
+ if (data) {
26005
+ for (var property in data) {
26006
+ if (data.hasOwnProperty(property))
26007
+ this[property] = data[property];
26008
+ }
26009
+ }
26010
+ if (!data) {
26011
+ this.toolsIds = [];
26012
+ }
26013
+ }
26014
+ init(_data) {
26015
+ if (_data) {
26016
+ this.sourceMachineId = _data["sourceMachineId"];
26017
+ this.targetOperationId = _data["targetOperationId"];
26018
+ if (Array.isArray(_data["toolsIds"])) {
26019
+ this.toolsIds = [];
26020
+ for (let item of _data["toolsIds"])
26021
+ this.toolsIds.push(item);
26022
+ }
26023
+ }
26024
+ }
26025
+ static fromJS(data) {
26026
+ data = typeof data === 'object' ? data : {};
26027
+ let result = new CopyToolsCncMachine();
26028
+ result.init(data);
26029
+ return result;
26030
+ }
26031
+ toJSON(data) {
26032
+ data = typeof data === 'object' ? data : {};
26033
+ data["sourceMachineId"] = this.sourceMachineId;
26034
+ data["targetOperationId"] = this.targetOperationId;
26035
+ if (Array.isArray(this.toolsIds)) {
26036
+ data["toolsIds"] = [];
26037
+ for (let item of this.toolsIds)
26038
+ data["toolsIds"].push(item);
26039
+ }
26040
+ return data;
26041
+ }
26042
+ }
25721
26043
  export class ProgramFileDto {
25722
26044
  constructor(data) {
25723
26045
  if (data) {
@@ -25913,156 +26235,6 @@ export class CncToolSubTypeDto {
25913
26235
  return data;
25914
26236
  }
25915
26237
  }
25916
- export class CncToolDto {
25917
- constructor(data) {
25918
- if (data) {
25919
- for (var property in data) {
25920
- if (data.hasOwnProperty(property))
25921
- this[property] = data[property];
25922
- }
25923
- }
25924
- }
25925
- init(_data) {
25926
- if (_data) {
25927
- this.id = _data["id"];
25928
- this.toolTypeId = _data["toolTypeId"];
25929
- this.toolType = _data["toolType"];
25930
- this.toolSubTypeId = _data["toolSubTypeId"];
25931
- this.toolSubTypeName = _data["toolSubTypeName"];
25932
- this.toolNumber = _data["toolNumber"];
25933
- this.toolSuffix = _data["toolSuffix"];
25934
- this.description = _data["description"];
25935
- this.holderDescription = _data["holderDescription"];
25936
- this.geometry = _data["geometry"];
25937
- this.size = _data["size"];
25938
- this.diameter = _data["diameter"];
25939
- this.grade = _data["grade"];
25940
- this.radius = _data["radius"];
25941
- this.width = _data["width"];
25942
- this.pitch = _data["pitch"];
25943
- this.length = _data["length"];
25944
- this.kapr = _data["kapr"];
25945
- this.teeth = _data["teeth"];
25946
- this.stickOut = _data["stickOut"];
25947
- this.apmx = _data["apmx"];
25948
- this.usableLength = _data["usableLength"];
25949
- if (Array.isArray(_data["images"])) {
25950
- this.images = [];
25951
- for (let item of _data["images"])
25952
- this.images.push(ImageFileDto.fromJS(item));
25953
- }
25954
- this.auditInfo = _data["auditInfo"] ? CncSetupAuditDto.fromJS(_data["auditInfo"]) : undefined;
25955
- }
25956
- }
25957
- static fromJS(data) {
25958
- data = typeof data === 'object' ? data : {};
25959
- let result = new CncToolDto();
25960
- result.init(data);
25961
- return result;
25962
- }
25963
- toJSON(data) {
25964
- data = typeof data === 'object' ? data : {};
25965
- data["id"] = this.id;
25966
- data["toolTypeId"] = this.toolTypeId;
25967
- data["toolType"] = this.toolType;
25968
- data["toolSubTypeId"] = this.toolSubTypeId;
25969
- data["toolSubTypeName"] = this.toolSubTypeName;
25970
- data["toolNumber"] = this.toolNumber;
25971
- data["toolSuffix"] = this.toolSuffix;
25972
- data["description"] = this.description;
25973
- data["holderDescription"] = this.holderDescription;
25974
- data["geometry"] = this.geometry;
25975
- data["size"] = this.size;
25976
- data["diameter"] = this.diameter;
25977
- data["grade"] = this.grade;
25978
- data["radius"] = this.radius;
25979
- data["width"] = this.width;
25980
- data["pitch"] = this.pitch;
25981
- data["length"] = this.length;
25982
- data["kapr"] = this.kapr;
25983
- data["teeth"] = this.teeth;
25984
- data["stickOut"] = this.stickOut;
25985
- data["apmx"] = this.apmx;
25986
- data["usableLength"] = this.usableLength;
25987
- if (Array.isArray(this.images)) {
25988
- data["images"] = [];
25989
- for (let item of this.images)
25990
- data["images"].push(item.toJSON());
25991
- }
25992
- data["auditInfo"] = this.auditInfo ? this.auditInfo.toJSON() : undefined;
25993
- return data;
25994
- }
25995
- }
25996
- export class ImageFileDto {
25997
- constructor(data) {
25998
- if (data) {
25999
- for (var property in data) {
26000
- if (data.hasOwnProperty(property))
26001
- this[property] = data[property];
26002
- }
26003
- }
26004
- }
26005
- init(_data) {
26006
- if (_data) {
26007
- this.url = _data["url"];
26008
- this.name = _data["name"];
26009
- this.thumbnailUrl = _data["thumbnailUrl"];
26010
- }
26011
- }
26012
- static fromJS(data) {
26013
- data = typeof data === 'object' ? data : {};
26014
- let result = new ImageFileDto();
26015
- result.init(data);
26016
- return result;
26017
- }
26018
- toJSON(data) {
26019
- data = typeof data === 'object' ? data : {};
26020
- data["url"] = this.url;
26021
- data["name"] = this.name;
26022
- data["thumbnailUrl"] = this.thumbnailUrl;
26023
- return data;
26024
- }
26025
- }
26026
- export class CncSetupAuditDto {
26027
- constructor(data) {
26028
- if (data) {
26029
- for (var property in data) {
26030
- if (data.hasOwnProperty(property))
26031
- this[property] = data[property];
26032
- }
26033
- }
26034
- }
26035
- init(_data) {
26036
- if (_data) {
26037
- this.created = _data["created"] ? new Date(_data["created"].toString()) : undefined;
26038
- this.createdBy = _data["createdBy"];
26039
- this.createdById = _data["createdById"];
26040
- this.createdByName = _data["createdByName"];
26041
- this.updated = _data["updated"] ? new Date(_data["updated"].toString()) : undefined;
26042
- this.updatedBy = _data["updatedBy"];
26043
- this.updatedById = _data["updatedById"];
26044
- this.updatedByName = _data["updatedByName"];
26045
- }
26046
- }
26047
- static fromJS(data) {
26048
- data = typeof data === 'object' ? data : {};
26049
- let result = new CncSetupAuditDto();
26050
- result.init(data);
26051
- return result;
26052
- }
26053
- toJSON(data) {
26054
- data = typeof data === 'object' ? data : {};
26055
- data["created"] = this.created ? this.created.toISOString() : undefined;
26056
- data["createdBy"] = this.createdBy;
26057
- data["createdById"] = this.createdById;
26058
- data["createdByName"] = this.createdByName;
26059
- data["updated"] = this.updated ? this.updated.toISOString() : undefined;
26060
- data["updatedBy"] = this.updatedBy;
26061
- data["updatedById"] = this.updatedById;
26062
- data["updatedByName"] = this.updatedByName;
26063
- return data;
26064
- }
26065
- }
26066
26238
  export class CreateCncMachineOperationToolRequest {
26067
26239
  constructor(data) {
26068
26240
  if (data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20240320.0.9040",
3
+ "version": "20240327.0.9055",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",