@ignos/api-client 20240710.0.9775 → 20240719.0.9807

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.
@@ -4831,6 +4831,421 @@ export class MeasuringToolsClient extends AuthorizedApiBase {
4831
4831
  return Promise.resolve(null);
4832
4832
  }
4833
4833
  }
4834
+ export class DowntimeReasonsAdminClient extends AuthorizedApiBase {
4835
+ constructor(configuration, baseUrl, http) {
4836
+ super(configuration);
4837
+ this.jsonParseReviver = undefined;
4838
+ this.http = http ? http : window;
4839
+ this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
4840
+ }
4841
+ listDowntimeReasons() {
4842
+ let url_ = this.baseUrl + "/downtimereasonsadmin/downtimereasons";
4843
+ url_ = url_.replace(/[?&]$/, "");
4844
+ let options_ = {
4845
+ method: "GET",
4846
+ headers: {
4847
+ "Accept": "application/json"
4848
+ }
4849
+ };
4850
+ return this.transformOptions(options_).then(transformedOptions_ => {
4851
+ return this.http.fetch(url_, transformedOptions_);
4852
+ }).then((_response) => {
4853
+ return this.processListDowntimeReasons(_response);
4854
+ });
4855
+ }
4856
+ processListDowntimeReasons(response) {
4857
+ const status = response.status;
4858
+ let _headers = {};
4859
+ if (response.headers && response.headers.forEach) {
4860
+ response.headers.forEach((v, k) => _headers[k] = v);
4861
+ }
4862
+ ;
4863
+ if (status === 200) {
4864
+ return response.text().then((_responseText) => {
4865
+ let result200 = null;
4866
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4867
+ if (Array.isArray(resultData200)) {
4868
+ result200 = [];
4869
+ for (let item of resultData200)
4870
+ result200.push(DowntimeReasonDto.fromJS(item));
4871
+ }
4872
+ return result200;
4873
+ });
4874
+ }
4875
+ else if (status !== 200 && status !== 204) {
4876
+ return response.text().then((_responseText) => {
4877
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
4878
+ });
4879
+ }
4880
+ return Promise.resolve(null);
4881
+ }
4882
+ createDowntimeReason(request) {
4883
+ let url_ = this.baseUrl + "/downtimereasonsadmin/downtimereasons";
4884
+ url_ = url_.replace(/[?&]$/, "");
4885
+ const content_ = JSON.stringify(request);
4886
+ let options_ = {
4887
+ body: content_,
4888
+ method: "POST",
4889
+ headers: {
4890
+ "Content-Type": "application/json",
4891
+ "Accept": "application/json"
4892
+ }
4893
+ };
4894
+ return this.transformOptions(options_).then(transformedOptions_ => {
4895
+ return this.http.fetch(url_, transformedOptions_);
4896
+ }).then((_response) => {
4897
+ return this.processCreateDowntimeReason(_response);
4898
+ });
4899
+ }
4900
+ processCreateDowntimeReason(response) {
4901
+ const status = response.status;
4902
+ let _headers = {};
4903
+ if (response.headers && response.headers.forEach) {
4904
+ response.headers.forEach((v, k) => _headers[k] = v);
4905
+ }
4906
+ ;
4907
+ if (status === 200) {
4908
+ return response.text().then((_responseText) => {
4909
+ let result200 = null;
4910
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4911
+ result200 = DowntimeReasonDto.fromJS(resultData200);
4912
+ return result200;
4913
+ });
4914
+ }
4915
+ else if (status !== 200 && status !== 204) {
4916
+ return response.text().then((_responseText) => {
4917
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
4918
+ });
4919
+ }
4920
+ return Promise.resolve(null);
4921
+ }
4922
+ updateDowntimeReason(id, request) {
4923
+ let url_ = this.baseUrl + "/downtimereasonsadmin/downtimereasons/{id}";
4924
+ if (id === undefined || id === null)
4925
+ throw new Error("The parameter 'id' must be defined.");
4926
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
4927
+ url_ = url_.replace(/[?&]$/, "");
4928
+ const content_ = JSON.stringify(request);
4929
+ let options_ = {
4930
+ body: content_,
4931
+ method: "PUT",
4932
+ headers: {
4933
+ "Content-Type": "application/json",
4934
+ "Accept": "application/json"
4935
+ }
4936
+ };
4937
+ return this.transformOptions(options_).then(transformedOptions_ => {
4938
+ return this.http.fetch(url_, transformedOptions_);
4939
+ }).then((_response) => {
4940
+ return this.processUpdateDowntimeReason(_response);
4941
+ });
4942
+ }
4943
+ processUpdateDowntimeReason(response) {
4944
+ const status = response.status;
4945
+ let _headers = {};
4946
+ if (response.headers && response.headers.forEach) {
4947
+ response.headers.forEach((v, k) => _headers[k] = v);
4948
+ }
4949
+ ;
4950
+ if (status === 200) {
4951
+ return response.text().then((_responseText) => {
4952
+ let result200 = null;
4953
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4954
+ result200 = DowntimeReasonDto.fromJS(resultData200);
4955
+ return result200;
4956
+ });
4957
+ }
4958
+ else if (status !== 200 && status !== 204) {
4959
+ return response.text().then((_responseText) => {
4960
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
4961
+ });
4962
+ }
4963
+ return Promise.resolve(null);
4964
+ }
4965
+ deleteDowntimeReason(id) {
4966
+ let url_ = this.baseUrl + "/downtimereasonsadmin/downtimereasons/{id}";
4967
+ if (id === undefined || id === null)
4968
+ throw new Error("The parameter 'id' must be defined.");
4969
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
4970
+ url_ = url_.replace(/[?&]$/, "");
4971
+ let options_ = {
4972
+ method: "DELETE",
4973
+ headers: {}
4974
+ };
4975
+ return this.transformOptions(options_).then(transformedOptions_ => {
4976
+ return this.http.fetch(url_, transformedOptions_);
4977
+ }).then((_response) => {
4978
+ return this.processDeleteDowntimeReason(_response);
4979
+ });
4980
+ }
4981
+ processDeleteDowntimeReason(response) {
4982
+ const status = response.status;
4983
+ let _headers = {};
4984
+ if (response.headers && response.headers.forEach) {
4985
+ response.headers.forEach((v, k) => _headers[k] = v);
4986
+ }
4987
+ ;
4988
+ if (status === 204) {
4989
+ return response.text().then((_responseText) => {
4990
+ return;
4991
+ });
4992
+ }
4993
+ else if (status !== 200 && status !== 204) {
4994
+ return response.text().then((_responseText) => {
4995
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
4996
+ });
4997
+ }
4998
+ return Promise.resolve(null);
4999
+ }
5000
+ listMachineTypes() {
5001
+ let url_ = this.baseUrl + "/downtimereasonsadmin/machinetypes";
5002
+ url_ = url_.replace(/[?&]$/, "");
5003
+ let options_ = {
5004
+ method: "GET",
5005
+ headers: {
5006
+ "Accept": "application/json"
5007
+ }
5008
+ };
5009
+ return this.transformOptions(options_).then(transformedOptions_ => {
5010
+ return this.http.fetch(url_, transformedOptions_);
5011
+ }).then((_response) => {
5012
+ return this.processListMachineTypes(_response);
5013
+ });
5014
+ }
5015
+ processListMachineTypes(response) {
5016
+ const status = response.status;
5017
+ let _headers = {};
5018
+ if (response.headers && response.headers.forEach) {
5019
+ response.headers.forEach((v, k) => _headers[k] = v);
5020
+ }
5021
+ ;
5022
+ if (status === 200) {
5023
+ return response.text().then((_responseText) => {
5024
+ let result200 = null;
5025
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5026
+ if (Array.isArray(resultData200)) {
5027
+ result200 = [];
5028
+ for (let item of resultData200)
5029
+ result200.push(MachineTypeDto.fromJS(item));
5030
+ }
5031
+ return result200;
5032
+ });
5033
+ }
5034
+ else if (status !== 200 && status !== 204) {
5035
+ return response.text().then((_responseText) => {
5036
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5037
+ });
5038
+ }
5039
+ return Promise.resolve(null);
5040
+ }
5041
+ }
5042
+ export class DowntimeReasonsClient extends AuthorizedApiBase {
5043
+ constructor(configuration, baseUrl, http) {
5044
+ super(configuration);
5045
+ this.jsonParseReviver = undefined;
5046
+ this.http = http ? http : window;
5047
+ this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
5048
+ }
5049
+ createDowntimePeriodReason(request) {
5050
+ let url_ = this.baseUrl + "/downtimereasons";
5051
+ url_ = url_.replace(/[?&]$/, "");
5052
+ const content_ = JSON.stringify(request);
5053
+ let options_ = {
5054
+ body: content_,
5055
+ method: "POST",
5056
+ headers: {
5057
+ "Content-Type": "application/json",
5058
+ "Accept": "application/json"
5059
+ }
5060
+ };
5061
+ return this.transformOptions(options_).then(transformedOptions_ => {
5062
+ return this.http.fetch(url_, transformedOptions_);
5063
+ }).then((_response) => {
5064
+ return this.processCreateDowntimePeriodReason(_response);
5065
+ });
5066
+ }
5067
+ processCreateDowntimePeriodReason(response) {
5068
+ const status = response.status;
5069
+ let _headers = {};
5070
+ if (response.headers && response.headers.forEach) {
5071
+ response.headers.forEach((v, k) => _headers[k] = v);
5072
+ }
5073
+ ;
5074
+ if (status === 200) {
5075
+ return response.text().then((_responseText) => {
5076
+ let result200 = null;
5077
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5078
+ result200 = DowntimePeriodReasonDto.fromJS(resultData200);
5079
+ return result200;
5080
+ });
5081
+ }
5082
+ else if (status !== 200 && status !== 204) {
5083
+ return response.text().then((_responseText) => {
5084
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5085
+ });
5086
+ }
5087
+ return Promise.resolve(null);
5088
+ }
5089
+ updateDowntimePeriodReason(id, request) {
5090
+ let url_ = this.baseUrl + "/downtimereasons/{id}";
5091
+ if (id === undefined || id === null)
5092
+ throw new Error("The parameter 'id' must be defined.");
5093
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
5094
+ url_ = url_.replace(/[?&]$/, "");
5095
+ const content_ = JSON.stringify(request);
5096
+ let options_ = {
5097
+ body: content_,
5098
+ method: "PUT",
5099
+ headers: {
5100
+ "Content-Type": "application/json",
5101
+ "Accept": "application/json"
5102
+ }
5103
+ };
5104
+ return this.transformOptions(options_).then(transformedOptions_ => {
5105
+ return this.http.fetch(url_, transformedOptions_);
5106
+ }).then((_response) => {
5107
+ return this.processUpdateDowntimePeriodReason(_response);
5108
+ });
5109
+ }
5110
+ processUpdateDowntimePeriodReason(response) {
5111
+ const status = response.status;
5112
+ let _headers = {};
5113
+ if (response.headers && response.headers.forEach) {
5114
+ response.headers.forEach((v, k) => _headers[k] = v);
5115
+ }
5116
+ ;
5117
+ if (status === 200) {
5118
+ return response.text().then((_responseText) => {
5119
+ let result200 = null;
5120
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5121
+ result200 = DowntimePeriodReasonDto.fromJS(resultData200);
5122
+ return result200;
5123
+ });
5124
+ }
5125
+ else if (status !== 200 && status !== 204) {
5126
+ return response.text().then((_responseText) => {
5127
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5128
+ });
5129
+ }
5130
+ return Promise.resolve(null);
5131
+ }
5132
+ deleteDowntimeReason(id) {
5133
+ let url_ = this.baseUrl + "/downtimereasons/{id}";
5134
+ if (id === undefined || id === null)
5135
+ throw new Error("The parameter 'id' must be defined.");
5136
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
5137
+ url_ = url_.replace(/[?&]$/, "");
5138
+ let options_ = {
5139
+ method: "DELETE",
5140
+ headers: {}
5141
+ };
5142
+ return this.transformOptions(options_).then(transformedOptions_ => {
5143
+ return this.http.fetch(url_, transformedOptions_);
5144
+ }).then((_response) => {
5145
+ return this.processDeleteDowntimeReason(_response);
5146
+ });
5147
+ }
5148
+ processDeleteDowntimeReason(response) {
5149
+ const status = response.status;
5150
+ let _headers = {};
5151
+ if (response.headers && response.headers.forEach) {
5152
+ response.headers.forEach((v, k) => _headers[k] = v);
5153
+ }
5154
+ ;
5155
+ if (status === 204) {
5156
+ return response.text().then((_responseText) => {
5157
+ return;
5158
+ });
5159
+ }
5160
+ else if (status !== 200 && status !== 204) {
5161
+ return response.text().then((_responseText) => {
5162
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5163
+ });
5164
+ }
5165
+ return Promise.resolve(null);
5166
+ }
5167
+ listDowntimeReasonsForMachine(id) {
5168
+ let url_ = this.baseUrl + "/downtimereasons/machine/{id}/downtimereasons";
5169
+ if (id === undefined || id === null)
5170
+ throw new Error("The parameter 'id' must be defined.");
5171
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
5172
+ url_ = url_.replace(/[?&]$/, "");
5173
+ let options_ = {
5174
+ method: "GET",
5175
+ headers: {
5176
+ "Accept": "application/json"
5177
+ }
5178
+ };
5179
+ return this.transformOptions(options_).then(transformedOptions_ => {
5180
+ return this.http.fetch(url_, transformedOptions_);
5181
+ }).then((_response) => {
5182
+ return this.processListDowntimeReasonsForMachine(_response);
5183
+ });
5184
+ }
5185
+ processListDowntimeReasonsForMachine(response) {
5186
+ const status = response.status;
5187
+ let _headers = {};
5188
+ if (response.headers && response.headers.forEach) {
5189
+ response.headers.forEach((v, k) => _headers[k] = v);
5190
+ }
5191
+ ;
5192
+ if (status === 200) {
5193
+ return response.text().then((_responseText) => {
5194
+ let result200 = null;
5195
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5196
+ if (Array.isArray(resultData200)) {
5197
+ result200 = [];
5198
+ for (let item of resultData200)
5199
+ result200.push(DowntimeReasonDto.fromJS(item));
5200
+ }
5201
+ return result200;
5202
+ });
5203
+ }
5204
+ else if (status !== 200 && status !== 204) {
5205
+ return response.text().then((_responseText) => {
5206
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5207
+ });
5208
+ }
5209
+ return Promise.resolve(null);
5210
+ }
5211
+ listTopDowntimeReasons() {
5212
+ let url_ = this.baseUrl + "/downtimereasons/topreasons";
5213
+ url_ = url_.replace(/[?&]$/, "");
5214
+ let options_ = {
5215
+ method: "GET",
5216
+ headers: {
5217
+ "Accept": "application/json"
5218
+ }
5219
+ };
5220
+ return this.transformOptions(options_).then(transformedOptions_ => {
5221
+ return this.http.fetch(url_, transformedOptions_);
5222
+ }).then((_response) => {
5223
+ return this.processListTopDowntimeReasons(_response);
5224
+ });
5225
+ }
5226
+ processListTopDowntimeReasons(response) {
5227
+ const status = response.status;
5228
+ let _headers = {};
5229
+ if (response.headers && response.headers.forEach) {
5230
+ response.headers.forEach((v, k) => _headers[k] = v);
5231
+ }
5232
+ ;
5233
+ if (status === 200) {
5234
+ return response.text().then((_responseText) => {
5235
+ let result200 = null;
5236
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5237
+ result200 = TopDowntimeReasonsDto.fromJS(resultData200);
5238
+ return result200;
5239
+ });
5240
+ }
5241
+ else if (status !== 200 && status !== 204) {
5242
+ return response.text().then((_responseText) => {
5243
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5244
+ });
5245
+ }
5246
+ return Promise.resolve(null);
5247
+ }
5248
+ }
4834
5249
  export class MachinesClient extends AuthorizedApiBase {
4835
5250
  constructor(configuration, baseUrl, http) {
4836
5251
  super(configuration);
@@ -5283,6 +5698,43 @@ export class MachinesClient extends AuthorizedApiBase {
5283
5698
  }
5284
5699
  return Promise.resolve(null);
5285
5700
  }
5701
+ getCrossCompanyUtilizationSummary() {
5702
+ let url_ = this.baseUrl + "/machines/utilization/cross-company";
5703
+ url_ = url_.replace(/[?&]$/, "");
5704
+ let options_ = {
5705
+ method: "GET",
5706
+ headers: {
5707
+ "Accept": "application/json"
5708
+ }
5709
+ };
5710
+ return this.transformOptions(options_).then(transformedOptions_ => {
5711
+ return this.http.fetch(url_, transformedOptions_);
5712
+ }).then((_response) => {
5713
+ return this.processGetCrossCompanyUtilizationSummary(_response);
5714
+ });
5715
+ }
5716
+ processGetCrossCompanyUtilizationSummary(response) {
5717
+ const status = response.status;
5718
+ let _headers = {};
5719
+ if (response.headers && response.headers.forEach) {
5720
+ response.headers.forEach((v, k) => _headers[k] = v);
5721
+ }
5722
+ ;
5723
+ if (status === 200) {
5724
+ return response.text().then((_responseText) => {
5725
+ let result200 = null;
5726
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5727
+ result200 = CrossCompanyUtilizationSummaryDto.fromJS(resultData200);
5728
+ return result200;
5729
+ });
5730
+ }
5731
+ else if (status !== 200 && status !== 204) {
5732
+ return response.text().then((_responseText) => {
5733
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5734
+ });
5735
+ }
5736
+ return Promise.resolve(null);
5737
+ }
5286
5738
  listCurrentMachineOperators(machineExternalId, operatorNameQuery) {
5287
5739
  let url_ = this.baseUrl + "/machines/operators?";
5288
5740
  if (machineExternalId !== undefined && machineExternalId !== null)
@@ -19160,12 +19612,21 @@ export class MachineStateDatapoint {
19160
19612
  this[property] = data[property];
19161
19613
  }
19162
19614
  }
19615
+ if (!data) {
19616
+ this.downtimePeriodReasons = [];
19617
+ }
19163
19618
  }
19164
19619
  init(_data) {
19165
19620
  if (_data) {
19166
19621
  this.machineStateText = _data["machineStateText"];
19167
19622
  this.machineState = _data["machineState"];
19168
19623
  this.timestamp = _data["timestamp"];
19624
+ this.isDowntime = _data["isDowntime"];
19625
+ if (Array.isArray(_data["downtimePeriodReasons"])) {
19626
+ this.downtimePeriodReasons = [];
19627
+ for (let item of _data["downtimePeriodReasons"])
19628
+ this.downtimePeriodReasons.push(DowntimePeriodReasonDto.fromJS(item));
19629
+ }
19169
19630
  }
19170
19631
  }
19171
19632
  static fromJS(data) {
@@ -19176,9 +19637,57 @@ export class MachineStateDatapoint {
19176
19637
  }
19177
19638
  toJSON(data) {
19178
19639
  data = typeof data === 'object' ? data : {};
19179
- data["machineStateText"] = this.machineStateText;
19180
- data["machineState"] = this.machineState;
19181
- data["timestamp"] = this.timestamp;
19640
+ data["machineStateText"] = this.machineStateText;
19641
+ data["machineState"] = this.machineState;
19642
+ data["timestamp"] = this.timestamp;
19643
+ data["isDowntime"] = this.isDowntime;
19644
+ if (Array.isArray(this.downtimePeriodReasons)) {
19645
+ data["downtimePeriodReasons"] = [];
19646
+ for (let item of this.downtimePeriodReasons)
19647
+ data["downtimePeriodReasons"].push(item.toJSON());
19648
+ }
19649
+ return data;
19650
+ }
19651
+ }
19652
+ export class DowntimePeriodReasonDto {
19653
+ constructor(data) {
19654
+ if (data) {
19655
+ for (var property in data) {
19656
+ if (data.hasOwnProperty(property))
19657
+ this[property] = data[property];
19658
+ }
19659
+ }
19660
+ }
19661
+ init(_data) {
19662
+ if (_data) {
19663
+ this.id = _data["id"];
19664
+ this.reason = _data["reason"];
19665
+ this.reasonType = _data["reasonType"];
19666
+ this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
19667
+ this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : undefined;
19668
+ this.assetId = _data["assetId"];
19669
+ this.comment = _data["comment"];
19670
+ this.companyId = _data["companyId"];
19671
+ this.reasonId = _data["reasonId"];
19672
+ }
19673
+ }
19674
+ static fromJS(data) {
19675
+ data = typeof data === 'object' ? data : {};
19676
+ let result = new DowntimePeriodReasonDto();
19677
+ result.init(data);
19678
+ return result;
19679
+ }
19680
+ toJSON(data) {
19681
+ data = typeof data === 'object' ? data : {};
19682
+ data["id"] = this.id;
19683
+ data["reason"] = this.reason;
19684
+ data["reasonType"] = this.reasonType;
19685
+ data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined;
19686
+ data["endTime"] = this.endTime ? this.endTime.toISOString() : undefined;
19687
+ data["assetId"] = this.assetId;
19688
+ data["comment"] = this.comment;
19689
+ data["companyId"] = this.companyId;
19690
+ data["reasonId"] = this.reasonId;
19182
19691
  return data;
19183
19692
  }
19184
19693
  }
@@ -24009,6 +24518,294 @@ export class MeasuringToolSettingsDto {
24009
24518
  return data;
24010
24519
  }
24011
24520
  }
24521
+ export class DowntimeReasonDto {
24522
+ constructor(data) {
24523
+ if (data) {
24524
+ for (var property in data) {
24525
+ if (data.hasOwnProperty(property))
24526
+ this[property] = data[property];
24527
+ }
24528
+ }
24529
+ }
24530
+ init(_data) {
24531
+ if (_data) {
24532
+ this.id = _data["id"];
24533
+ this.reason = _data["reason"];
24534
+ if (Array.isArray(_data["machineTypes"])) {
24535
+ this.machineTypes = [];
24536
+ for (let item of _data["machineTypes"])
24537
+ this.machineTypes.push(item);
24538
+ }
24539
+ this.reasonType = _data["reasonType"];
24540
+ }
24541
+ }
24542
+ static fromJS(data) {
24543
+ data = typeof data === 'object' ? data : {};
24544
+ let result = new DowntimeReasonDto();
24545
+ result.init(data);
24546
+ return result;
24547
+ }
24548
+ toJSON(data) {
24549
+ data = typeof data === 'object' ? data : {};
24550
+ data["id"] = this.id;
24551
+ data["reason"] = this.reason;
24552
+ if (Array.isArray(this.machineTypes)) {
24553
+ data["machineTypes"] = [];
24554
+ for (let item of this.machineTypes)
24555
+ data["machineTypes"].push(item);
24556
+ }
24557
+ data["reasonType"] = this.reasonType;
24558
+ return data;
24559
+ }
24560
+ }
24561
+ export class CreateDowntimeReason {
24562
+ constructor(data) {
24563
+ if (data) {
24564
+ for (var property in data) {
24565
+ if (data.hasOwnProperty(property))
24566
+ this[property] = data[property];
24567
+ }
24568
+ }
24569
+ if (!data) {
24570
+ this.machineTypes = [];
24571
+ }
24572
+ }
24573
+ init(_data) {
24574
+ if (_data) {
24575
+ this.reason = _data["reason"];
24576
+ if (Array.isArray(_data["machineTypes"])) {
24577
+ this.machineTypes = [];
24578
+ for (let item of _data["machineTypes"])
24579
+ this.machineTypes.push(item);
24580
+ }
24581
+ this.reasonType = _data["reasonType"];
24582
+ }
24583
+ }
24584
+ static fromJS(data) {
24585
+ data = typeof data === 'object' ? data : {};
24586
+ let result = new CreateDowntimeReason();
24587
+ result.init(data);
24588
+ return result;
24589
+ }
24590
+ toJSON(data) {
24591
+ data = typeof data === 'object' ? data : {};
24592
+ data["reason"] = this.reason;
24593
+ if (Array.isArray(this.machineTypes)) {
24594
+ data["machineTypes"] = [];
24595
+ for (let item of this.machineTypes)
24596
+ data["machineTypes"].push(item);
24597
+ }
24598
+ data["reasonType"] = this.reasonType;
24599
+ return data;
24600
+ }
24601
+ }
24602
+ export class UpdateDowntimeReasonRequest {
24603
+ constructor(data) {
24604
+ if (data) {
24605
+ for (var property in data) {
24606
+ if (data.hasOwnProperty(property))
24607
+ this[property] = data[property];
24608
+ }
24609
+ }
24610
+ if (!data) {
24611
+ this.machineTypes = [];
24612
+ }
24613
+ }
24614
+ init(_data) {
24615
+ if (_data) {
24616
+ this.reason = _data["reason"];
24617
+ if (Array.isArray(_data["machineTypes"])) {
24618
+ this.machineTypes = [];
24619
+ for (let item of _data["machineTypes"])
24620
+ this.machineTypes.push(item);
24621
+ }
24622
+ this.reasonType = _data["reasonType"];
24623
+ }
24624
+ }
24625
+ static fromJS(data) {
24626
+ data = typeof data === 'object' ? data : {};
24627
+ let result = new UpdateDowntimeReasonRequest();
24628
+ result.init(data);
24629
+ return result;
24630
+ }
24631
+ toJSON(data) {
24632
+ data = typeof data === 'object' ? data : {};
24633
+ data["reason"] = this.reason;
24634
+ if (Array.isArray(this.machineTypes)) {
24635
+ data["machineTypes"] = [];
24636
+ for (let item of this.machineTypes)
24637
+ data["machineTypes"].push(item);
24638
+ }
24639
+ data["reasonType"] = this.reasonType;
24640
+ return data;
24641
+ }
24642
+ }
24643
+ export class MachineTypeDto {
24644
+ constructor(data) {
24645
+ if (data) {
24646
+ for (var property in data) {
24647
+ if (data.hasOwnProperty(property))
24648
+ this[property] = data[property];
24649
+ }
24650
+ }
24651
+ }
24652
+ init(_data) {
24653
+ if (_data) {
24654
+ this.machineType = _data["machineType"];
24655
+ }
24656
+ }
24657
+ static fromJS(data) {
24658
+ data = typeof data === 'object' ? data : {};
24659
+ let result = new MachineTypeDto();
24660
+ result.init(data);
24661
+ return result;
24662
+ }
24663
+ toJSON(data) {
24664
+ data = typeof data === 'object' ? data : {};
24665
+ data["machineType"] = this.machineType;
24666
+ return data;
24667
+ }
24668
+ }
24669
+ export class CreateDowntimePeriodReason {
24670
+ constructor(data) {
24671
+ if (data) {
24672
+ for (var property in data) {
24673
+ if (data.hasOwnProperty(property))
24674
+ this[property] = data[property];
24675
+ }
24676
+ }
24677
+ }
24678
+ init(_data) {
24679
+ if (_data) {
24680
+ this.reasonId = _data["reasonId"];
24681
+ this.assetId = _data["assetId"];
24682
+ this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
24683
+ this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : undefined;
24684
+ this.comment = _data["comment"];
24685
+ }
24686
+ }
24687
+ static fromJS(data) {
24688
+ data = typeof data === 'object' ? data : {};
24689
+ let result = new CreateDowntimePeriodReason();
24690
+ result.init(data);
24691
+ return result;
24692
+ }
24693
+ toJSON(data) {
24694
+ data = typeof data === 'object' ? data : {};
24695
+ data["reasonId"] = this.reasonId;
24696
+ data["assetId"] = this.assetId;
24697
+ data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined;
24698
+ data["endTime"] = this.endTime ? this.endTime.toISOString() : undefined;
24699
+ data["comment"] = this.comment;
24700
+ return data;
24701
+ }
24702
+ }
24703
+ export class UpdateDowntimePeriodReasonRequest {
24704
+ constructor(data) {
24705
+ if (data) {
24706
+ for (var property in data) {
24707
+ if (data.hasOwnProperty(property))
24708
+ this[property] = data[property];
24709
+ }
24710
+ }
24711
+ }
24712
+ init(_data) {
24713
+ if (_data) {
24714
+ this.reasonId = _data["reasonId"];
24715
+ this.assetId = _data["assetId"];
24716
+ this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
24717
+ this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : undefined;
24718
+ this.comment = _data["comment"];
24719
+ }
24720
+ }
24721
+ static fromJS(data) {
24722
+ data = typeof data === 'object' ? data : {};
24723
+ let result = new UpdateDowntimePeriodReasonRequest();
24724
+ result.init(data);
24725
+ return result;
24726
+ }
24727
+ toJSON(data) {
24728
+ data = typeof data === 'object' ? data : {};
24729
+ data["reasonId"] = this.reasonId;
24730
+ data["assetId"] = this.assetId;
24731
+ data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined;
24732
+ data["endTime"] = this.endTime ? this.endTime.toISOString() : undefined;
24733
+ data["comment"] = this.comment;
24734
+ return data;
24735
+ }
24736
+ }
24737
+ export class TopDowntimeReasonsDto {
24738
+ constructor(data) {
24739
+ if (data) {
24740
+ for (var property in data) {
24741
+ if (data.hasOwnProperty(property))
24742
+ this[property] = data[property];
24743
+ }
24744
+ }
24745
+ }
24746
+ init(_data) {
24747
+ if (_data) {
24748
+ if (Array.isArray(_data["planned"])) {
24749
+ this.planned = [];
24750
+ for (let item of _data["planned"])
24751
+ this.planned.push(DowntimeReasonCountDto.fromJS(item));
24752
+ }
24753
+ if (Array.isArray(_data["unplanned"])) {
24754
+ this.unplanned = [];
24755
+ for (let item of _data["unplanned"])
24756
+ this.unplanned.push(DowntimeReasonCountDto.fromJS(item));
24757
+ }
24758
+ }
24759
+ }
24760
+ static fromJS(data) {
24761
+ data = typeof data === 'object' ? data : {};
24762
+ let result = new TopDowntimeReasonsDto();
24763
+ result.init(data);
24764
+ return result;
24765
+ }
24766
+ toJSON(data) {
24767
+ data = typeof data === 'object' ? data : {};
24768
+ if (Array.isArray(this.planned)) {
24769
+ data["planned"] = [];
24770
+ for (let item of this.planned)
24771
+ data["planned"].push(item.toJSON());
24772
+ }
24773
+ if (Array.isArray(this.unplanned)) {
24774
+ data["unplanned"] = [];
24775
+ for (let item of this.unplanned)
24776
+ data["unplanned"].push(item.toJSON());
24777
+ }
24778
+ return data;
24779
+ }
24780
+ }
24781
+ export class DowntimeReasonCountDto {
24782
+ constructor(data) {
24783
+ if (data) {
24784
+ for (var property in data) {
24785
+ if (data.hasOwnProperty(property))
24786
+ this[property] = data[property];
24787
+ }
24788
+ }
24789
+ }
24790
+ init(_data) {
24791
+ if (_data) {
24792
+ this.count = _data["count"];
24793
+ this.downtimeReason = _data["downtimeReason"] ? DowntimeReasonDto.fromJS(_data["downtimeReason"]) : undefined;
24794
+ }
24795
+ }
24796
+ static fromJS(data) {
24797
+ data = typeof data === 'object' ? data : {};
24798
+ let result = new DowntimeReasonCountDto();
24799
+ result.init(data);
24800
+ return result;
24801
+ }
24802
+ toJSON(data) {
24803
+ data = typeof data === 'object' ? data : {};
24804
+ data["count"] = this.count;
24805
+ data["downtimeReason"] = this.downtimeReason ? this.downtimeReason.toJSON() : undefined;
24806
+ return data;
24807
+ }
24808
+ }
24012
24809
  export class MachineDto {
24013
24810
  constructor(data) {
24014
24811
  if (data) {
@@ -24785,6 +25582,46 @@ export class MachineUtilizationV2Dto {
24785
25582
  return data;
24786
25583
  }
24787
25584
  }
25585
+ export class CrossCompanyUtilizationSummaryDto {
25586
+ constructor(data) {
25587
+ if (data) {
25588
+ for (var property in data) {
25589
+ if (data.hasOwnProperty(property))
25590
+ this[property] = data[property];
25591
+ }
25592
+ }
25593
+ if (!data) {
25594
+ this.crossCompany = new FactoryUtilizationDto();
25595
+ this.companies = [];
25596
+ }
25597
+ }
25598
+ init(_data) {
25599
+ if (_data) {
25600
+ this.crossCompany = _data["crossCompany"] ? FactoryUtilizationDto.fromJS(_data["crossCompany"]) : new FactoryUtilizationDto();
25601
+ if (Array.isArray(_data["companies"])) {
25602
+ this.companies = [];
25603
+ for (let item of _data["companies"])
25604
+ this.companies.push(MachineGroupUtilizationDto.fromJS(item));
25605
+ }
25606
+ }
25607
+ }
25608
+ static fromJS(data) {
25609
+ data = typeof data === 'object' ? data : {};
25610
+ let result = new CrossCompanyUtilizationSummaryDto();
25611
+ result.init(data);
25612
+ return result;
25613
+ }
25614
+ toJSON(data) {
25615
+ data = typeof data === 'object' ? data : {};
25616
+ data["crossCompany"] = this.crossCompany ? this.crossCompany.toJSON() : undefined;
25617
+ if (Array.isArray(this.companies)) {
25618
+ data["companies"] = [];
25619
+ for (let item of this.companies)
25620
+ data["companies"].push(item.toJSON());
25621
+ }
25622
+ return data;
25623
+ }
25624
+ }
24788
25625
  export class OperatorAndMachineDto {
24789
25626
  constructor(data) {
24790
25627
  if (data) {
@@ -28928,6 +29765,7 @@ export class IntegrationCredentialDto {
28928
29765
  this.type = _data["type"];
28929
29766
  this.id = _data["id"];
28930
29767
  this.name = _data["name"];
29768
+ this.clientId = _data["clientId"];
28931
29769
  this.expirationDate = _data["expirationDate"] ? new Date(_data["expirationDate"].toString()) : undefined;
28932
29770
  this.activationDate = _data["activationDate"] ? new Date(_data["activationDate"].toString()) : undefined;
28933
29771
  this.responsibleUser = _data["responsibleUser"];
@@ -28947,6 +29785,7 @@ export class IntegrationCredentialDto {
28947
29785
  data["type"] = this.type;
28948
29786
  data["id"] = this.id;
28949
29787
  data["name"] = this.name;
29788
+ data["clientId"] = this.clientId;
28950
29789
  data["expirationDate"] = this.expirationDate ? this.expirationDate.toISOString() : undefined;
28951
29790
  data["activationDate"] = this.activationDate ? this.activationDate.toISOString() : undefined;
28952
29791
  data["responsibleUser"] = this.responsibleUser;