@ignos/api-client 20260109.0.13694 → 20260116.0.13753

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.
@@ -1077,7 +1077,7 @@ export class ResourceUtilizationClient extends AuthorizedApiBase {
1077
1077
  this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
1078
1078
  }
1079
1079
  /**
1080
- * Get machine utilization data. Historic utilizations start from now, whereas the start for current utilization is
1080
+ * Get resource utilization data. Historic utilizations start from now, whereas the start for current utilization is
1081
1081
  calculated based on startTimeToday or utcOffset. An UTC offset is
1082
1082
  obtained either from startTimeToday, utcOffset or the server's local
1083
1083
  time zone. The current utilization is calculated starting from the start of the current date offset from UTC
@@ -1349,7 +1349,7 @@ export class ResourceUtilizationClient extends AuthorizedApiBase {
1349
1349
  return response.text().then((_responseText) => {
1350
1350
  let result200 = null;
1351
1351
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
1352
- result200 = MachineUptimesAggregateDto.fromJS(resultData200);
1352
+ result200 = ResourceUptimesAggregateDto.fromJS(resultData200);
1353
1353
  return result200;
1354
1354
  });
1355
1355
  }
@@ -2825,19 +2825,15 @@ export class MachineAlarmsClient extends AuthorizedApiBase {
2825
2825
  return Promise.resolve(null);
2826
2826
  }
2827
2827
  }
2828
- export class ResourcesClient extends AuthorizedApiBase {
2828
+ export class KpiAdminClient extends AuthorizedApiBase {
2829
2829
  constructor(configuration, baseUrl, http) {
2830
2830
  super(configuration);
2831
2831
  this.jsonParseReviver = undefined;
2832
2832
  this.http = http ? http : window;
2833
2833
  this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
2834
2834
  }
2835
- listResources(onlyConnectedResources) {
2836
- let url_ = this.baseUrl + "/resources?";
2837
- if (onlyConnectedResources === null)
2838
- throw new globalThis.Error("The parameter 'onlyConnectedResources' cannot be null.");
2839
- else if (onlyConnectedResources !== undefined)
2840
- url_ += "onlyConnectedResources=" + encodeURIComponent("" + onlyConnectedResources) + "&";
2835
+ getResourceCapacityAdmin() {
2836
+ let url_ = this.baseUrl + "/resourcekpiadmin/capacity";
2841
2837
  url_ = url_.replace(/[?&]$/, "");
2842
2838
  let options_ = {
2843
2839
  method: "GET",
@@ -2848,10 +2844,10 @@ export class ResourcesClient extends AuthorizedApiBase {
2848
2844
  return this.transformOptions(options_).then(transformedOptions_ => {
2849
2845
  return this.http.fetch(url_, transformedOptions_);
2850
2846
  }).then((_response) => {
2851
- return this.processListResources(_response);
2847
+ return this.processGetResourceCapacityAdmin(_response);
2852
2848
  });
2853
2849
  }
2854
- processListResources(response) {
2850
+ processGetResourceCapacityAdmin(response) {
2855
2851
  const status = response.status;
2856
2852
  let _headers = {};
2857
2853
  if (response.headers && response.headers.forEach) {
@@ -2865,7 +2861,7 @@ export class ResourcesClient extends AuthorizedApiBase {
2865
2861
  if (Array.isArray(resultData200)) {
2866
2862
  result200 = [];
2867
2863
  for (let item of resultData200)
2868
- result200.push(ApplicationResourcesResourceDto.fromJS(item));
2864
+ result200.push(ResourceGroupCapacityDto.fromJS(item));
2869
2865
  }
2870
2866
  return result200;
2871
2867
  });
@@ -2877,8 +2873,56 @@ export class ResourcesClient extends AuthorizedApiBase {
2877
2873
  }
2878
2874
  return Promise.resolve(null);
2879
2875
  }
2880
- listResourceGroups() {
2881
- let url_ = this.baseUrl + "/resources/groups";
2876
+ updateResourceCapacityAdmin(request) {
2877
+ let url_ = this.baseUrl + "/resourcekpiadmin/capacity";
2878
+ url_ = url_.replace(/[?&]$/, "");
2879
+ const content_ = JSON.stringify(request);
2880
+ let options_ = {
2881
+ body: content_,
2882
+ method: "PUT",
2883
+ headers: {
2884
+ "Content-Type": "application/json",
2885
+ "Accept": "application/json"
2886
+ }
2887
+ };
2888
+ return this.transformOptions(options_).then(transformedOptions_ => {
2889
+ return this.http.fetch(url_, transformedOptions_);
2890
+ }).then((_response) => {
2891
+ return this.processUpdateResourceCapacityAdmin(_response);
2892
+ });
2893
+ }
2894
+ processUpdateResourceCapacityAdmin(response) {
2895
+ const status = response.status;
2896
+ let _headers = {};
2897
+ if (response.headers && response.headers.forEach) {
2898
+ response.headers.forEach((v, k) => _headers[k] = v);
2899
+ }
2900
+ ;
2901
+ if (status === 200) {
2902
+ return response.text().then((_responseText) => {
2903
+ let result200 = null;
2904
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2905
+ result200 = ResourceCapacityDto.fromJS(resultData200);
2906
+ return result200;
2907
+ });
2908
+ }
2909
+ else if (status !== 200 && status !== 204) {
2910
+ return response.text().then((_responseText) => {
2911
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2912
+ });
2913
+ }
2914
+ return Promise.resolve(null);
2915
+ }
2916
+ getCalendarCapacityAdmin(startDate, endDate) {
2917
+ let url_ = this.baseUrl + "/resourcekpiadmin/calendar?";
2918
+ if (startDate === null)
2919
+ throw new globalThis.Error("The parameter 'startDate' cannot be null.");
2920
+ else if (startDate !== undefined)
2921
+ url_ += "startDate=" + encodeURIComponent(startDate ? "" + startDate.toISOString() : "") + "&";
2922
+ if (endDate === null)
2923
+ throw new globalThis.Error("The parameter 'endDate' cannot be null.");
2924
+ else if (endDate !== undefined)
2925
+ url_ += "endDate=" + encodeURIComponent(endDate ? "" + endDate.toISOString() : "") + "&";
2882
2926
  url_ = url_.replace(/[?&]$/, "");
2883
2927
  let options_ = {
2884
2928
  method: "GET",
@@ -2889,10 +2933,10 @@ export class ResourcesClient extends AuthorizedApiBase {
2889
2933
  return this.transformOptions(options_).then(transformedOptions_ => {
2890
2934
  return this.http.fetch(url_, transformedOptions_);
2891
2935
  }).then((_response) => {
2892
- return this.processListResourceGroups(_response);
2936
+ return this.processGetCalendarCapacityAdmin(_response);
2893
2937
  });
2894
2938
  }
2895
- processListResourceGroups(response) {
2939
+ processGetCalendarCapacityAdmin(response) {
2896
2940
  const status = response.status;
2897
2941
  let _headers = {};
2898
2942
  if (response.headers && response.headers.forEach) {
@@ -2906,7 +2950,7 @@ export class ResourcesClient extends AuthorizedApiBase {
2906
2950
  if (Array.isArray(resultData200)) {
2907
2951
  result200 = [];
2908
2952
  for (let item of resultData200)
2909
- result200.push(ApplicationResourcesResourceGroupDto.fromJS(item));
2953
+ result200.push(CalendarDayDto.fromJS(item));
2910
2954
  }
2911
2955
  return result200;
2912
2956
  });
@@ -2918,13 +2962,13 @@ export class ResourcesClient extends AuthorizedApiBase {
2918
2962
  }
2919
2963
  return Promise.resolve(null);
2920
2964
  }
2921
- createResourceGroup(request) {
2922
- let url_ = this.baseUrl + "/resources/groups";
2965
+ updateCalendarCapacityAdmin(request) {
2966
+ let url_ = this.baseUrl + "/resourcekpiadmin/calendar";
2923
2967
  url_ = url_.replace(/[?&]$/, "");
2924
2968
  const content_ = JSON.stringify(request);
2925
2969
  let options_ = {
2926
2970
  body: content_,
2927
- method: "POST",
2971
+ method: "PUT",
2928
2972
  headers: {
2929
2973
  "Content-Type": "application/json",
2930
2974
  "Accept": "application/json"
@@ -2933,10 +2977,10 @@ export class ResourcesClient extends AuthorizedApiBase {
2933
2977
  return this.transformOptions(options_).then(transformedOptions_ => {
2934
2978
  return this.http.fetch(url_, transformedOptions_);
2935
2979
  }).then((_response) => {
2936
- return this.processCreateResourceGroup(_response);
2980
+ return this.processUpdateCalendarCapacityAdmin(_response);
2937
2981
  });
2938
2982
  }
2939
- processCreateResourceGroup(response) {
2983
+ processUpdateCalendarCapacityAdmin(response) {
2940
2984
  const status = response.status;
2941
2985
  let _headers = {};
2942
2986
  if (response.headers && response.headers.forEach) {
@@ -2947,7 +2991,7 @@ export class ResourcesClient extends AuthorizedApiBase {
2947
2991
  return response.text().then((_responseText) => {
2948
2992
  let result200 = null;
2949
2993
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2950
- result200 = CreateResourceGroupResponse.fromJS(resultData200);
2994
+ result200 = CalendarCapacityDto.fromJS(resultData200);
2951
2995
  return result200;
2952
2996
  });
2953
2997
  }
@@ -2958,36 +3002,74 @@ export class ResourcesClient extends AuthorizedApiBase {
2958
3002
  }
2959
3003
  return Promise.resolve(null);
2960
3004
  }
2961
- updateResourceGroup(id, request) {
2962
- let url_ = this.baseUrl + "/resources/groups/{id}";
2963
- if (id === undefined || id === null)
2964
- throw new globalThis.Error("The parameter 'id' must be defined.");
2965
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
3005
+ getCalendarSettings() {
3006
+ let url_ = this.baseUrl + "/resourcekpiadmin/calendar/settings";
2966
3007
  url_ = url_.replace(/[?&]$/, "");
2967
- const content_ = JSON.stringify(request);
3008
+ let options_ = {
3009
+ method: "GET",
3010
+ headers: {
3011
+ "Accept": "application/json"
3012
+ }
3013
+ };
3014
+ return this.transformOptions(options_).then(transformedOptions_ => {
3015
+ return this.http.fetch(url_, transformedOptions_);
3016
+ }).then((_response) => {
3017
+ return this.processGetCalendarSettings(_response);
3018
+ });
3019
+ }
3020
+ processGetCalendarSettings(response) {
3021
+ const status = response.status;
3022
+ let _headers = {};
3023
+ if (response.headers && response.headers.forEach) {
3024
+ response.headers.forEach((v, k) => _headers[k] = v);
3025
+ }
3026
+ ;
3027
+ if (status === 200) {
3028
+ return response.text().then((_responseText) => {
3029
+ let result200 = null;
3030
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3031
+ result200 = CalendarSettingsDto.fromJS(resultData200);
3032
+ return result200;
3033
+ });
3034
+ }
3035
+ else if (status !== 200 && status !== 204) {
3036
+ return response.text().then((_responseText) => {
3037
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3038
+ });
3039
+ }
3040
+ return Promise.resolve(null);
3041
+ }
3042
+ updateCalendarSettings(cmd) {
3043
+ let url_ = this.baseUrl + "/resourcekpiadmin/calendar/settings";
3044
+ url_ = url_.replace(/[?&]$/, "");
3045
+ const content_ = JSON.stringify(cmd);
2968
3046
  let options_ = {
2969
3047
  body: content_,
2970
3048
  method: "PUT",
2971
3049
  headers: {
2972
3050
  "Content-Type": "application/json",
3051
+ "Accept": "application/json"
2973
3052
  }
2974
3053
  };
2975
3054
  return this.transformOptions(options_).then(transformedOptions_ => {
2976
3055
  return this.http.fetch(url_, transformedOptions_);
2977
3056
  }).then((_response) => {
2978
- return this.processUpdateResourceGroup(_response);
3057
+ return this.processUpdateCalendarSettings(_response);
2979
3058
  });
2980
3059
  }
2981
- processUpdateResourceGroup(response) {
3060
+ processUpdateCalendarSettings(response) {
2982
3061
  const status = response.status;
2983
3062
  let _headers = {};
2984
3063
  if (response.headers && response.headers.forEach) {
2985
3064
  response.headers.forEach((v, k) => _headers[k] = v);
2986
3065
  }
2987
3066
  ;
2988
- if (status === 204) {
3067
+ if (status === 200) {
2989
3068
  return response.text().then((_responseText) => {
2990
- return;
3069
+ let result200 = null;
3070
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3071
+ result200 = CalendarSettingsDto.fromJS(resultData200);
3072
+ return result200;
2991
3073
  });
2992
3074
  }
2993
3075
  else if (status !== 200 && status !== 204) {
@@ -2997,32 +3079,38 @@ export class ResourcesClient extends AuthorizedApiBase {
2997
3079
  }
2998
3080
  return Promise.resolve(null);
2999
3081
  }
3000
- deleteResourceGroup(id) {
3001
- let url_ = this.baseUrl + "/resources/groups/{id}";
3002
- if (id === undefined || id === null)
3003
- throw new globalThis.Error("The parameter 'id' must be defined.");
3004
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
3082
+ getMachineCapacityAdmin() {
3083
+ let url_ = this.baseUrl + "/kpiadmin/capacity";
3005
3084
  url_ = url_.replace(/[?&]$/, "");
3006
3085
  let options_ = {
3007
- method: "DELETE",
3008
- headers: {}
3086
+ method: "GET",
3087
+ headers: {
3088
+ "Accept": "application/json"
3089
+ }
3009
3090
  };
3010
3091
  return this.transformOptions(options_).then(transformedOptions_ => {
3011
3092
  return this.http.fetch(url_, transformedOptions_);
3012
3093
  }).then((_response) => {
3013
- return this.processDeleteResourceGroup(_response);
3094
+ return this.processGetMachineCapacityAdmin(_response);
3014
3095
  });
3015
3096
  }
3016
- processDeleteResourceGroup(response) {
3097
+ processGetMachineCapacityAdmin(response) {
3017
3098
  const status = response.status;
3018
3099
  let _headers = {};
3019
3100
  if (response.headers && response.headers.forEach) {
3020
3101
  response.headers.forEach((v, k) => _headers[k] = v);
3021
3102
  }
3022
3103
  ;
3023
- if (status === 204) {
3104
+ if (status === 200) {
3024
3105
  return response.text().then((_responseText) => {
3025
- return;
3106
+ let result200 = null;
3107
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3108
+ if (Array.isArray(resultData200)) {
3109
+ result200 = [];
3110
+ for (let item of resultData200)
3111
+ result200.push(MachineGroupCapacityDto.fromJS(item));
3112
+ }
3113
+ return result200;
3026
3114
  });
3027
3115
  }
3028
3116
  else if (status !== 200 && status !== 204) {
@@ -3032,24 +3120,25 @@ export class ResourcesClient extends AuthorizedApiBase {
3032
3120
  }
3033
3121
  return Promise.resolve(null);
3034
3122
  }
3035
- listCurrentResourceStates(assetId) {
3036
- let url_ = this.baseUrl + "/resources/states/now?";
3037
- if (assetId !== undefined && assetId !== null)
3038
- url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
3123
+ updateMachineCapacityAdmin(request) {
3124
+ let url_ = this.baseUrl + "/kpiadmin/capacity";
3039
3125
  url_ = url_.replace(/[?&]$/, "");
3126
+ const content_ = JSON.stringify(request);
3040
3127
  let options_ = {
3041
- method: "GET",
3128
+ body: content_,
3129
+ method: "PUT",
3042
3130
  headers: {
3131
+ "Content-Type": "application/json",
3043
3132
  "Accept": "application/json"
3044
3133
  }
3045
3134
  };
3046
3135
  return this.transformOptions(options_).then(transformedOptions_ => {
3047
3136
  return this.http.fetch(url_, transformedOptions_);
3048
3137
  }).then((_response) => {
3049
- return this.processListCurrentResourceStates(_response);
3138
+ return this.processUpdateMachineCapacityAdmin(_response);
3050
3139
  });
3051
3140
  }
3052
- processListCurrentResourceStates(response) {
3141
+ processUpdateMachineCapacityAdmin(response) {
3053
3142
  const status = response.status;
3054
3143
  let _headers = {};
3055
3144
  if (response.headers && response.headers.forEach) {
@@ -3060,7 +3149,7 @@ export class ResourcesClient extends AuthorizedApiBase {
3060
3149
  return response.text().then((_responseText) => {
3061
3150
  let result200 = null;
3062
3151
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3063
- result200 = ResourceStateListDto.fromJS(resultData200);
3152
+ result200 = MachineCapacityDto.fromJS(resultData200);
3064
3153
  return result200;
3065
3154
  });
3066
3155
  }
@@ -3071,15 +3160,16 @@ export class ResourcesClient extends AuthorizedApiBase {
3071
3160
  }
3072
3161
  return Promise.resolve(null);
3073
3162
  }
3074
- listResourceStates(id, startTime, endTime) {
3075
- let url_ = this.baseUrl + "/resources/{id}/states?";
3076
- if (id === undefined || id === null)
3077
- throw new globalThis.Error("The parameter 'id' must be defined.");
3078
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
3079
- if (startTime !== undefined && startTime !== null)
3080
- url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
3081
- if (endTime !== undefined && endTime !== null)
3082
- url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
3163
+ getCalendarCapacityAdmin2(startDate, endDate) {
3164
+ let url_ = this.baseUrl + "/kpiadmin/calendar?";
3165
+ if (startDate === null)
3166
+ throw new globalThis.Error("The parameter 'startDate' cannot be null.");
3167
+ else if (startDate !== undefined)
3168
+ url_ += "startDate=" + encodeURIComponent(startDate ? "" + startDate.toISOString() : "") + "&";
3169
+ if (endDate === null)
3170
+ throw new globalThis.Error("The parameter 'endDate' cannot be null.");
3171
+ else if (endDate !== undefined)
3172
+ url_ += "endDate=" + encodeURIComponent(endDate ? "" + endDate.toISOString() : "") + "&";
3083
3173
  url_ = url_.replace(/[?&]$/, "");
3084
3174
  let options_ = {
3085
3175
  method: "GET",
@@ -3090,10 +3180,10 @@ export class ResourcesClient extends AuthorizedApiBase {
3090
3180
  return this.transformOptions(options_).then(transformedOptions_ => {
3091
3181
  return this.http.fetch(url_, transformedOptions_);
3092
3182
  }).then((_response) => {
3093
- return this.processListResourceStates(_response);
3183
+ return this.processGetCalendarCapacityAdmin2(_response);
3094
3184
  });
3095
3185
  }
3096
- processListResourceStates(response) {
3186
+ processGetCalendarCapacityAdmin2(response) {
3097
3187
  const status = response.status;
3098
3188
  let _headers = {};
3099
3189
  if (response.headers && response.headers.forEach) {
@@ -3107,7 +3197,7 @@ export class ResourcesClient extends AuthorizedApiBase {
3107
3197
  if (Array.isArray(resultData200)) {
3108
3198
  result200 = [];
3109
3199
  for (let item of resultData200)
3110
- result200.push(ResourceStateDatapoint.fromJS(item));
3200
+ result200.push(CalendarDayDto.fromJS(item));
3111
3201
  }
3112
3202
  return result200;
3113
3203
  });
@@ -3119,15 +3209,48 @@ export class ResourcesClient extends AuthorizedApiBase {
3119
3209
  }
3120
3210
  return Promise.resolve(null);
3121
3211
  }
3122
- listLastDowntimeResourceStates(id, endTime, maxStates) {
3123
- let url_ = this.baseUrl + "/resources/{id}/lastdowntimestates?";
3124
- if (id === undefined || id === null)
3125
- throw new globalThis.Error("The parameter 'id' must be defined.");
3126
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
3127
- if (endTime !== undefined && endTime !== null)
3128
- url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
3129
- if (maxStates !== undefined && maxStates !== null)
3130
- url_ += "maxStates=" + encodeURIComponent("" + maxStates) + "&";
3212
+ updateCalendarCapacityAdmin2(request) {
3213
+ let url_ = this.baseUrl + "/kpiadmin/calendar";
3214
+ url_ = url_.replace(/[?&]$/, "");
3215
+ const content_ = JSON.stringify(request);
3216
+ let options_ = {
3217
+ body: content_,
3218
+ method: "PUT",
3219
+ headers: {
3220
+ "Content-Type": "application/json",
3221
+ "Accept": "application/json"
3222
+ }
3223
+ };
3224
+ return this.transformOptions(options_).then(transformedOptions_ => {
3225
+ return this.http.fetch(url_, transformedOptions_);
3226
+ }).then((_response) => {
3227
+ return this.processUpdateCalendarCapacityAdmin2(_response);
3228
+ });
3229
+ }
3230
+ processUpdateCalendarCapacityAdmin2(response) {
3231
+ const status = response.status;
3232
+ let _headers = {};
3233
+ if (response.headers && response.headers.forEach) {
3234
+ response.headers.forEach((v, k) => _headers[k] = v);
3235
+ }
3236
+ ;
3237
+ if (status === 200) {
3238
+ return response.text().then((_responseText) => {
3239
+ let result200 = null;
3240
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3241
+ result200 = CalendarCapacityDto.fromJS(resultData200);
3242
+ return result200;
3243
+ });
3244
+ }
3245
+ else if (status !== 200 && status !== 204) {
3246
+ return response.text().then((_responseText) => {
3247
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3248
+ });
3249
+ }
3250
+ return Promise.resolve(null);
3251
+ }
3252
+ getCalendarSettings2() {
3253
+ let url_ = this.baseUrl + "/kpiadmin/calendar/settings";
3131
3254
  url_ = url_.replace(/[?&]$/, "");
3132
3255
  let options_ = {
3133
3256
  method: "GET",
@@ -3138,10 +3261,209 @@ export class ResourcesClient extends AuthorizedApiBase {
3138
3261
  return this.transformOptions(options_).then(transformedOptions_ => {
3139
3262
  return this.http.fetch(url_, transformedOptions_);
3140
3263
  }).then((_response) => {
3141
- return this.processListLastDowntimeResourceStates(_response);
3264
+ return this.processGetCalendarSettings2(_response);
3265
+ });
3266
+ }
3267
+ processGetCalendarSettings2(response) {
3268
+ const status = response.status;
3269
+ let _headers = {};
3270
+ if (response.headers && response.headers.forEach) {
3271
+ response.headers.forEach((v, k) => _headers[k] = v);
3272
+ }
3273
+ ;
3274
+ if (status === 200) {
3275
+ return response.text().then((_responseText) => {
3276
+ let result200 = null;
3277
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3278
+ result200 = CalendarSettingsDto.fromJS(resultData200);
3279
+ return result200;
3280
+ });
3281
+ }
3282
+ else if (status !== 200 && status !== 204) {
3283
+ return response.text().then((_responseText) => {
3284
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3285
+ });
3286
+ }
3287
+ return Promise.resolve(null);
3288
+ }
3289
+ updateCalendarSettings2(cmd) {
3290
+ let url_ = this.baseUrl + "/kpiadmin/calendar/settings";
3291
+ url_ = url_.replace(/[?&]$/, "");
3292
+ const content_ = JSON.stringify(cmd);
3293
+ let options_ = {
3294
+ body: content_,
3295
+ method: "PUT",
3296
+ headers: {
3297
+ "Content-Type": "application/json",
3298
+ "Accept": "application/json"
3299
+ }
3300
+ };
3301
+ return this.transformOptions(options_).then(transformedOptions_ => {
3302
+ return this.http.fetch(url_, transformedOptions_);
3303
+ }).then((_response) => {
3304
+ return this.processUpdateCalendarSettings2(_response);
3142
3305
  });
3143
3306
  }
3144
- processListLastDowntimeResourceStates(response) {
3307
+ processUpdateCalendarSettings2(response) {
3308
+ const status = response.status;
3309
+ let _headers = {};
3310
+ if (response.headers && response.headers.forEach) {
3311
+ response.headers.forEach((v, k) => _headers[k] = v);
3312
+ }
3313
+ ;
3314
+ if (status === 200) {
3315
+ return response.text().then((_responseText) => {
3316
+ let result200 = null;
3317
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3318
+ result200 = CalendarSettingsDto.fromJS(resultData200);
3319
+ return result200;
3320
+ });
3321
+ }
3322
+ else if (status !== 200 && status !== 204) {
3323
+ return response.text().then((_responseText) => {
3324
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3325
+ });
3326
+ }
3327
+ return Promise.resolve(null);
3328
+ }
3329
+ }
3330
+ export class KpiClient extends AuthorizedApiBase {
3331
+ constructor(configuration, baseUrl, http) {
3332
+ super(configuration);
3333
+ this.jsonParseReviver = undefined;
3334
+ this.http = http ? http : window;
3335
+ this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
3336
+ }
3337
+ getMachineKpi(machineExternalId, previousPeriodStartDate, startDate, endDate, utcOffset) {
3338
+ let url_ = this.baseUrl + "/resourcekpi/capacity?";
3339
+ if (machineExternalId === null)
3340
+ throw new globalThis.Error("The parameter 'machineExternalId' cannot be null.");
3341
+ else if (machineExternalId !== undefined)
3342
+ url_ += "machineExternalId=" + encodeURIComponent("" + machineExternalId) + "&";
3343
+ if (previousPeriodStartDate === null)
3344
+ throw new globalThis.Error("The parameter 'previousPeriodStartDate' cannot be null.");
3345
+ else if (previousPeriodStartDate !== undefined)
3346
+ url_ += "previousPeriodStartDate=" + encodeURIComponent(previousPeriodStartDate ? "" + previousPeriodStartDate.toISOString() : "") + "&";
3347
+ if (startDate === null)
3348
+ throw new globalThis.Error("The parameter 'startDate' cannot be null.");
3349
+ else if (startDate !== undefined)
3350
+ url_ += "startDate=" + encodeURIComponent(startDate ? "" + startDate.toISOString() : "") + "&";
3351
+ if (endDate === null)
3352
+ throw new globalThis.Error("The parameter 'endDate' cannot be null.");
3353
+ else if (endDate !== undefined)
3354
+ url_ += "endDate=" + encodeURIComponent(endDate ? "" + endDate.toISOString() : "") + "&";
3355
+ if (utcOffset === null)
3356
+ throw new globalThis.Error("The parameter 'utcOffset' cannot be null.");
3357
+ else if (utcOffset !== undefined)
3358
+ url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
3359
+ url_ = url_.replace(/[?&]$/, "");
3360
+ let options_ = {
3361
+ method: "GET",
3362
+ headers: {
3363
+ "Accept": "application/json"
3364
+ }
3365
+ };
3366
+ return this.transformOptions(options_).then(transformedOptions_ => {
3367
+ return this.http.fetch(url_, transformedOptions_);
3368
+ }).then((_response) => {
3369
+ return this.processGetMachineKpi(_response);
3370
+ });
3371
+ }
3372
+ processGetMachineKpi(response) {
3373
+ const status = response.status;
3374
+ let _headers = {};
3375
+ if (response.headers && response.headers.forEach) {
3376
+ response.headers.forEach((v, k) => _headers[k] = v);
3377
+ }
3378
+ ;
3379
+ if (status === 200) {
3380
+ return response.text().then((_responseText) => {
3381
+ let result200 = null;
3382
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3383
+ result200 = ResourceKpiDto.fromJS(resultData200);
3384
+ return result200;
3385
+ });
3386
+ }
3387
+ else if (status !== 200 && status !== 204) {
3388
+ return response.text().then((_responseText) => {
3389
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3390
+ });
3391
+ }
3392
+ return Promise.resolve(null);
3393
+ }
3394
+ getMachineDailyUptime(machineExternalId, date, utcOffset) {
3395
+ let url_ = this.baseUrl + "/resourcekpi/daily-uptime?";
3396
+ if (machineExternalId === null)
3397
+ throw new globalThis.Error("The parameter 'machineExternalId' cannot be null.");
3398
+ else if (machineExternalId !== undefined)
3399
+ url_ += "machineExternalId=" + encodeURIComponent("" + machineExternalId) + "&";
3400
+ if (date === null)
3401
+ throw new globalThis.Error("The parameter 'date' cannot be null.");
3402
+ else if (date !== undefined)
3403
+ url_ += "date=" + encodeURIComponent(date ? "" + date.toISOString() : "") + "&";
3404
+ if (utcOffset === null)
3405
+ throw new globalThis.Error("The parameter 'utcOffset' cannot be null.");
3406
+ else if (utcOffset !== undefined)
3407
+ url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
3408
+ url_ = url_.replace(/[?&]$/, "");
3409
+ let options_ = {
3410
+ method: "GET",
3411
+ headers: {
3412
+ "Accept": "application/json"
3413
+ }
3414
+ };
3415
+ return this.transformOptions(options_).then(transformedOptions_ => {
3416
+ return this.http.fetch(url_, transformedOptions_);
3417
+ }).then((_response) => {
3418
+ return this.processGetMachineDailyUptime(_response);
3419
+ });
3420
+ }
3421
+ processGetMachineDailyUptime(response) {
3422
+ const status = response.status;
3423
+ let _headers = {};
3424
+ if (response.headers && response.headers.forEach) {
3425
+ response.headers.forEach((v, k) => _headers[k] = v);
3426
+ }
3427
+ ;
3428
+ if (status === 200) {
3429
+ return response.text().then((_responseText) => {
3430
+ let result200 = null;
3431
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3432
+ result200 = ResourceDailyUptimeDto.fromJS(resultData200);
3433
+ return result200;
3434
+ });
3435
+ }
3436
+ else if (status !== 200 && status !== 204) {
3437
+ return response.text().then((_responseText) => {
3438
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3439
+ });
3440
+ }
3441
+ return Promise.resolve(null);
3442
+ }
3443
+ getUptimeNormalTrend(assetId, assetExternalId, date, utcOffset) {
3444
+ let url_ = this.baseUrl + "/resourcekpi/normal-day-trendline?";
3445
+ if (assetId !== undefined && assetId !== null)
3446
+ url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
3447
+ if (assetExternalId !== undefined && assetExternalId !== null)
3448
+ url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
3449
+ if (date !== undefined && date !== null)
3450
+ url_ += "date=" + encodeURIComponent(date ? "" + date.toISOString() : "") + "&";
3451
+ if (utcOffset !== undefined && utcOffset !== null)
3452
+ url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
3453
+ url_ = url_.replace(/[?&]$/, "");
3454
+ let options_ = {
3455
+ method: "GET",
3456
+ headers: {
3457
+ "Accept": "application/json"
3458
+ }
3459
+ };
3460
+ return this.transformOptions(options_).then(transformedOptions_ => {
3461
+ return this.http.fetch(url_, transformedOptions_);
3462
+ }).then((_response) => {
3463
+ return this.processGetUptimeNormalTrend(_response);
3464
+ });
3465
+ }
3466
+ processGetUptimeNormalTrend(response) {
3145
3467
  const status = response.status;
3146
3468
  let _headers = {};
3147
3469
  if (response.headers && response.headers.forEach) {
@@ -3155,7 +3477,7 @@ export class ResourcesClient extends AuthorizedApiBase {
3155
3477
  if (Array.isArray(resultData200)) {
3156
3478
  result200 = [];
3157
3479
  for (let item of resultData200)
3158
- result200.push(DowntimeResourceStateDto.fromJS(item));
3480
+ result200.push(UptimeTrendDataPointDto.fromJS(item));
3159
3481
  }
3160
3482
  return result200;
3161
3483
  });
@@ -3167,15 +3489,28 @@ export class ResourcesClient extends AuthorizedApiBase {
3167
3489
  }
3168
3490
  return Promise.resolve(null);
3169
3491
  }
3170
- getResourceStateWithDowntimePeriods(id, timestamp) {
3171
- let url_ = this.baseUrl + "/resources/{id}/statewithdowntimeperiods?";
3172
- if (id === undefined || id === null)
3173
- throw new globalThis.Error("The parameter 'id' must be defined.");
3174
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
3175
- if (timestamp === null)
3176
- throw new globalThis.Error("The parameter 'timestamp' cannot be null.");
3177
- else if (timestamp !== undefined)
3178
- url_ += "timestamp=" + encodeURIComponent("" + timestamp) + "&";
3492
+ getMachineKpi2(machineExternalId, previousPeriodStartDate, startDate, endDate, utcOffset) {
3493
+ let url_ = this.baseUrl + "/kpi/capacity?";
3494
+ if (machineExternalId === null)
3495
+ throw new globalThis.Error("The parameter 'machineExternalId' cannot be null.");
3496
+ else if (machineExternalId !== undefined)
3497
+ url_ += "machineExternalId=" + encodeURIComponent("" + machineExternalId) + "&";
3498
+ if (previousPeriodStartDate === null)
3499
+ throw new globalThis.Error("The parameter 'previousPeriodStartDate' cannot be null.");
3500
+ else if (previousPeriodStartDate !== undefined)
3501
+ url_ += "previousPeriodStartDate=" + encodeURIComponent(previousPeriodStartDate ? "" + previousPeriodStartDate.toISOString() : "") + "&";
3502
+ if (startDate === null)
3503
+ throw new globalThis.Error("The parameter 'startDate' cannot be null.");
3504
+ else if (startDate !== undefined)
3505
+ url_ += "startDate=" + encodeURIComponent(startDate ? "" + startDate.toISOString() : "") + "&";
3506
+ if (endDate === null)
3507
+ throw new globalThis.Error("The parameter 'endDate' cannot be null.");
3508
+ else if (endDate !== undefined)
3509
+ url_ += "endDate=" + encodeURIComponent(endDate ? "" + endDate.toISOString() : "") + "&";
3510
+ if (utcOffset === null)
3511
+ throw new globalThis.Error("The parameter 'utcOffset' cannot be null.");
3512
+ else if (utcOffset !== undefined)
3513
+ url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
3179
3514
  url_ = url_.replace(/[?&]$/, "");
3180
3515
  let options_ = {
3181
3516
  method: "GET",
@@ -3186,10 +3521,10 @@ export class ResourcesClient extends AuthorizedApiBase {
3186
3521
  return this.transformOptions(options_).then(transformedOptions_ => {
3187
3522
  return this.http.fetch(url_, transformedOptions_);
3188
3523
  }).then((_response) => {
3189
- return this.processGetResourceStateWithDowntimePeriods(_response);
3524
+ return this.processGetMachineKpi2(_response);
3190
3525
  });
3191
3526
  }
3192
- processGetResourceStateWithDowntimePeriods(response) {
3527
+ processGetMachineKpi2(response) {
3193
3528
  const status = response.status;
3194
3529
  let _headers = {};
3195
3530
  if (response.headers && response.headers.forEach) {
@@ -3200,7 +3535,492 @@ export class ResourcesClient extends AuthorizedApiBase {
3200
3535
  return response.text().then((_responseText) => {
3201
3536
  let result200 = null;
3202
3537
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3203
- result200 = DowntimeResourceStateDto.fromJS(resultData200);
3538
+ result200 = MachineKpiDto.fromJS(resultData200);
3539
+ return result200;
3540
+ });
3541
+ }
3542
+ else if (status !== 200 && status !== 204) {
3543
+ return response.text().then((_responseText) => {
3544
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3545
+ });
3546
+ }
3547
+ return Promise.resolve(null);
3548
+ }
3549
+ getMachineDailyUptime2(machineExternalId, date, utcOffset) {
3550
+ let url_ = this.baseUrl + "/kpi/daily-uptime?";
3551
+ if (machineExternalId === null)
3552
+ throw new globalThis.Error("The parameter 'machineExternalId' cannot be null.");
3553
+ else if (machineExternalId !== undefined)
3554
+ url_ += "machineExternalId=" + encodeURIComponent("" + machineExternalId) + "&";
3555
+ if (date === null)
3556
+ throw new globalThis.Error("The parameter 'date' cannot be null.");
3557
+ else if (date !== undefined)
3558
+ url_ += "date=" + encodeURIComponent(date ? "" + date.toISOString() : "") + "&";
3559
+ if (utcOffset === null)
3560
+ throw new globalThis.Error("The parameter 'utcOffset' cannot be null.");
3561
+ else if (utcOffset !== undefined)
3562
+ url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
3563
+ url_ = url_.replace(/[?&]$/, "");
3564
+ let options_ = {
3565
+ method: "GET",
3566
+ headers: {
3567
+ "Accept": "application/json"
3568
+ }
3569
+ };
3570
+ return this.transformOptions(options_).then(transformedOptions_ => {
3571
+ return this.http.fetch(url_, transformedOptions_);
3572
+ }).then((_response) => {
3573
+ return this.processGetMachineDailyUptime2(_response);
3574
+ });
3575
+ }
3576
+ processGetMachineDailyUptime2(response) {
3577
+ const status = response.status;
3578
+ let _headers = {};
3579
+ if (response.headers && response.headers.forEach) {
3580
+ response.headers.forEach((v, k) => _headers[k] = v);
3581
+ }
3582
+ ;
3583
+ if (status === 200) {
3584
+ return response.text().then((_responseText) => {
3585
+ let result200 = null;
3586
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3587
+ result200 = MachineDailyUptimeDto.fromJS(resultData200);
3588
+ return result200;
3589
+ });
3590
+ }
3591
+ else if (status !== 200 && status !== 204) {
3592
+ return response.text().then((_responseText) => {
3593
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3594
+ });
3595
+ }
3596
+ return Promise.resolve(null);
3597
+ }
3598
+ getUptimeNormalTrend2(assetId, assetExternalId, date, utcOffset) {
3599
+ let url_ = this.baseUrl + "/kpi/normal-day-trendline?";
3600
+ if (assetId !== undefined && assetId !== null)
3601
+ url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
3602
+ if (assetExternalId !== undefined && assetExternalId !== null)
3603
+ url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
3604
+ if (date !== undefined && date !== null)
3605
+ url_ += "date=" + encodeURIComponent(date ? "" + date.toISOString() : "") + "&";
3606
+ if (utcOffset !== undefined && utcOffset !== null)
3607
+ url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
3608
+ url_ = url_.replace(/[?&]$/, "");
3609
+ let options_ = {
3610
+ method: "GET",
3611
+ headers: {
3612
+ "Accept": "application/json"
3613
+ }
3614
+ };
3615
+ return this.transformOptions(options_).then(transformedOptions_ => {
3616
+ return this.http.fetch(url_, transformedOptions_);
3617
+ }).then((_response) => {
3618
+ return this.processGetUptimeNormalTrend2(_response);
3619
+ });
3620
+ }
3621
+ processGetUptimeNormalTrend2(response) {
3622
+ const status = response.status;
3623
+ let _headers = {};
3624
+ if (response.headers && response.headers.forEach) {
3625
+ response.headers.forEach((v, k) => _headers[k] = v);
3626
+ }
3627
+ ;
3628
+ if (status === 200) {
3629
+ return response.text().then((_responseText) => {
3630
+ let result200 = null;
3631
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3632
+ if (Array.isArray(resultData200)) {
3633
+ result200 = [];
3634
+ for (let item of resultData200)
3635
+ result200.push(UptimeTrendDataPointDto.fromJS(item));
3636
+ }
3637
+ return result200;
3638
+ });
3639
+ }
3640
+ else if (status !== 200 && status !== 204) {
3641
+ return response.text().then((_responseText) => {
3642
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3643
+ });
3644
+ }
3645
+ return Promise.resolve(null);
3646
+ }
3647
+ }
3648
+ export class ResourcesClient extends AuthorizedApiBase {
3649
+ constructor(configuration, baseUrl, http) {
3650
+ super(configuration);
3651
+ this.jsonParseReviver = undefined;
3652
+ this.http = http ? http : window;
3653
+ this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
3654
+ }
3655
+ listResources(onlyConnectedResources) {
3656
+ let url_ = this.baseUrl + "/resources?";
3657
+ if (onlyConnectedResources === null)
3658
+ throw new globalThis.Error("The parameter 'onlyConnectedResources' cannot be null.");
3659
+ else if (onlyConnectedResources !== undefined)
3660
+ url_ += "onlyConnectedResources=" + encodeURIComponent("" + onlyConnectedResources) + "&";
3661
+ url_ = url_.replace(/[?&]$/, "");
3662
+ let options_ = {
3663
+ method: "GET",
3664
+ headers: {
3665
+ "Accept": "application/json"
3666
+ }
3667
+ };
3668
+ return this.transformOptions(options_).then(transformedOptions_ => {
3669
+ return this.http.fetch(url_, transformedOptions_);
3670
+ }).then((_response) => {
3671
+ return this.processListResources(_response);
3672
+ });
3673
+ }
3674
+ processListResources(response) {
3675
+ const status = response.status;
3676
+ let _headers = {};
3677
+ if (response.headers && response.headers.forEach) {
3678
+ response.headers.forEach((v, k) => _headers[k] = v);
3679
+ }
3680
+ ;
3681
+ if (status === 200) {
3682
+ return response.text().then((_responseText) => {
3683
+ let result200 = null;
3684
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3685
+ if (Array.isArray(resultData200)) {
3686
+ result200 = [];
3687
+ for (let item of resultData200)
3688
+ result200.push(ApplicationResourcesResourceDto.fromJS(item));
3689
+ }
3690
+ return result200;
3691
+ });
3692
+ }
3693
+ else if (status !== 200 && status !== 204) {
3694
+ return response.text().then((_responseText) => {
3695
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3696
+ });
3697
+ }
3698
+ return Promise.resolve(null);
3699
+ }
3700
+ listResourceGroups() {
3701
+ let url_ = this.baseUrl + "/resources/groups";
3702
+ url_ = url_.replace(/[?&]$/, "");
3703
+ let options_ = {
3704
+ method: "GET",
3705
+ headers: {
3706
+ "Accept": "application/json"
3707
+ }
3708
+ };
3709
+ return this.transformOptions(options_).then(transformedOptions_ => {
3710
+ return this.http.fetch(url_, transformedOptions_);
3711
+ }).then((_response) => {
3712
+ return this.processListResourceGroups(_response);
3713
+ });
3714
+ }
3715
+ processListResourceGroups(response) {
3716
+ const status = response.status;
3717
+ let _headers = {};
3718
+ if (response.headers && response.headers.forEach) {
3719
+ response.headers.forEach((v, k) => _headers[k] = v);
3720
+ }
3721
+ ;
3722
+ if (status === 200) {
3723
+ return response.text().then((_responseText) => {
3724
+ let result200 = null;
3725
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3726
+ if (Array.isArray(resultData200)) {
3727
+ result200 = [];
3728
+ for (let item of resultData200)
3729
+ result200.push(ApplicationResourcesResourceGroupDto.fromJS(item));
3730
+ }
3731
+ return result200;
3732
+ });
3733
+ }
3734
+ else if (status !== 200 && status !== 204) {
3735
+ return response.text().then((_responseText) => {
3736
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3737
+ });
3738
+ }
3739
+ return Promise.resolve(null);
3740
+ }
3741
+ createResourceGroup(request) {
3742
+ let url_ = this.baseUrl + "/resources/groups";
3743
+ url_ = url_.replace(/[?&]$/, "");
3744
+ const content_ = JSON.stringify(request);
3745
+ let options_ = {
3746
+ body: content_,
3747
+ method: "POST",
3748
+ headers: {
3749
+ "Content-Type": "application/json",
3750
+ "Accept": "application/json"
3751
+ }
3752
+ };
3753
+ return this.transformOptions(options_).then(transformedOptions_ => {
3754
+ return this.http.fetch(url_, transformedOptions_);
3755
+ }).then((_response) => {
3756
+ return this.processCreateResourceGroup(_response);
3757
+ });
3758
+ }
3759
+ processCreateResourceGroup(response) {
3760
+ const status = response.status;
3761
+ let _headers = {};
3762
+ if (response.headers && response.headers.forEach) {
3763
+ response.headers.forEach((v, k) => _headers[k] = v);
3764
+ }
3765
+ ;
3766
+ if (status === 200) {
3767
+ return response.text().then((_responseText) => {
3768
+ let result200 = null;
3769
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3770
+ result200 = CreateResourceGroupResponse.fromJS(resultData200);
3771
+ return result200;
3772
+ });
3773
+ }
3774
+ else if (status !== 200 && status !== 204) {
3775
+ return response.text().then((_responseText) => {
3776
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3777
+ });
3778
+ }
3779
+ return Promise.resolve(null);
3780
+ }
3781
+ updateResourceGroup(id, request) {
3782
+ let url_ = this.baseUrl + "/resources/groups/{id}";
3783
+ if (id === undefined || id === null)
3784
+ throw new globalThis.Error("The parameter 'id' must be defined.");
3785
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
3786
+ url_ = url_.replace(/[?&]$/, "");
3787
+ const content_ = JSON.stringify(request);
3788
+ let options_ = {
3789
+ body: content_,
3790
+ method: "PUT",
3791
+ headers: {
3792
+ "Content-Type": "application/json",
3793
+ }
3794
+ };
3795
+ return this.transformOptions(options_).then(transformedOptions_ => {
3796
+ return this.http.fetch(url_, transformedOptions_);
3797
+ }).then((_response) => {
3798
+ return this.processUpdateResourceGroup(_response);
3799
+ });
3800
+ }
3801
+ processUpdateResourceGroup(response) {
3802
+ const status = response.status;
3803
+ let _headers = {};
3804
+ if (response.headers && response.headers.forEach) {
3805
+ response.headers.forEach((v, k) => _headers[k] = v);
3806
+ }
3807
+ ;
3808
+ if (status === 204) {
3809
+ return response.text().then((_responseText) => {
3810
+ return;
3811
+ });
3812
+ }
3813
+ else if (status !== 200 && status !== 204) {
3814
+ return response.text().then((_responseText) => {
3815
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3816
+ });
3817
+ }
3818
+ return Promise.resolve(null);
3819
+ }
3820
+ deleteResourceGroup(id) {
3821
+ let url_ = this.baseUrl + "/resources/groups/{id}";
3822
+ if (id === undefined || id === null)
3823
+ throw new globalThis.Error("The parameter 'id' must be defined.");
3824
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
3825
+ url_ = url_.replace(/[?&]$/, "");
3826
+ let options_ = {
3827
+ method: "DELETE",
3828
+ headers: {}
3829
+ };
3830
+ return this.transformOptions(options_).then(transformedOptions_ => {
3831
+ return this.http.fetch(url_, transformedOptions_);
3832
+ }).then((_response) => {
3833
+ return this.processDeleteResourceGroup(_response);
3834
+ });
3835
+ }
3836
+ processDeleteResourceGroup(response) {
3837
+ const status = response.status;
3838
+ let _headers = {};
3839
+ if (response.headers && response.headers.forEach) {
3840
+ response.headers.forEach((v, k) => _headers[k] = v);
3841
+ }
3842
+ ;
3843
+ if (status === 204) {
3844
+ return response.text().then((_responseText) => {
3845
+ return;
3846
+ });
3847
+ }
3848
+ else if (status !== 200 && status !== 204) {
3849
+ return response.text().then((_responseText) => {
3850
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3851
+ });
3852
+ }
3853
+ return Promise.resolve(null);
3854
+ }
3855
+ listCurrentMachineStates(assetId) {
3856
+ let url_ = this.baseUrl + "/resources/states/now?";
3857
+ if (assetId !== undefined && assetId !== null)
3858
+ url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
3859
+ url_ = url_.replace(/[?&]$/, "");
3860
+ let options_ = {
3861
+ method: "GET",
3862
+ headers: {
3863
+ "Accept": "application/json"
3864
+ }
3865
+ };
3866
+ return this.transformOptions(options_).then(transformedOptions_ => {
3867
+ return this.http.fetch(url_, transformedOptions_);
3868
+ }).then((_response) => {
3869
+ return this.processListCurrentMachineStates(_response);
3870
+ });
3871
+ }
3872
+ processListCurrentMachineStates(response) {
3873
+ const status = response.status;
3874
+ let _headers = {};
3875
+ if (response.headers && response.headers.forEach) {
3876
+ response.headers.forEach((v, k) => _headers[k] = v);
3877
+ }
3878
+ ;
3879
+ if (status === 200) {
3880
+ return response.text().then((_responseText) => {
3881
+ let result200 = null;
3882
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3883
+ result200 = MachineStateListDto.fromJS(resultData200);
3884
+ return result200;
3885
+ });
3886
+ }
3887
+ else if (status !== 200 && status !== 204) {
3888
+ return response.text().then((_responseText) => {
3889
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3890
+ });
3891
+ }
3892
+ return Promise.resolve(null);
3893
+ }
3894
+ listMachineStates(id, startTime, endTime) {
3895
+ let url_ = this.baseUrl + "/resources/{id}/states?";
3896
+ if (id === undefined || id === null)
3897
+ throw new globalThis.Error("The parameter 'id' must be defined.");
3898
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
3899
+ if (startTime !== undefined && startTime !== null)
3900
+ url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
3901
+ if (endTime !== undefined && endTime !== null)
3902
+ url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
3903
+ url_ = url_.replace(/[?&]$/, "");
3904
+ let options_ = {
3905
+ method: "GET",
3906
+ headers: {
3907
+ "Accept": "application/json"
3908
+ }
3909
+ };
3910
+ return this.transformOptions(options_).then(transformedOptions_ => {
3911
+ return this.http.fetch(url_, transformedOptions_);
3912
+ }).then((_response) => {
3913
+ return this.processListMachineStates(_response);
3914
+ });
3915
+ }
3916
+ processListMachineStates(response) {
3917
+ const status = response.status;
3918
+ let _headers = {};
3919
+ if (response.headers && response.headers.forEach) {
3920
+ response.headers.forEach((v, k) => _headers[k] = v);
3921
+ }
3922
+ ;
3923
+ if (status === 200) {
3924
+ return response.text().then((_responseText) => {
3925
+ let result200 = null;
3926
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3927
+ if (Array.isArray(resultData200)) {
3928
+ result200 = [];
3929
+ for (let item of resultData200)
3930
+ result200.push(MachineStateDatapoint.fromJS(item));
3931
+ }
3932
+ return result200;
3933
+ });
3934
+ }
3935
+ else if (status !== 200 && status !== 204) {
3936
+ return response.text().then((_responseText) => {
3937
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3938
+ });
3939
+ }
3940
+ return Promise.resolve(null);
3941
+ }
3942
+ listLastDowntimeMachineStates(id, endTime, maxStates) {
3943
+ let url_ = this.baseUrl + "/resources/{id}/lastdowntimestates?";
3944
+ if (id === undefined || id === null)
3945
+ throw new globalThis.Error("The parameter 'id' must be defined.");
3946
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
3947
+ if (endTime !== undefined && endTime !== null)
3948
+ url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
3949
+ if (maxStates !== undefined && maxStates !== null)
3950
+ url_ += "maxStates=" + encodeURIComponent("" + maxStates) + "&";
3951
+ url_ = url_.replace(/[?&]$/, "");
3952
+ let options_ = {
3953
+ method: "GET",
3954
+ headers: {
3955
+ "Accept": "application/json"
3956
+ }
3957
+ };
3958
+ return this.transformOptions(options_).then(transformedOptions_ => {
3959
+ return this.http.fetch(url_, transformedOptions_);
3960
+ }).then((_response) => {
3961
+ return this.processListLastDowntimeMachineStates(_response);
3962
+ });
3963
+ }
3964
+ processListLastDowntimeMachineStates(response) {
3965
+ const status = response.status;
3966
+ let _headers = {};
3967
+ if (response.headers && response.headers.forEach) {
3968
+ response.headers.forEach((v, k) => _headers[k] = v);
3969
+ }
3970
+ ;
3971
+ if (status === 200) {
3972
+ return response.text().then((_responseText) => {
3973
+ let result200 = null;
3974
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3975
+ if (Array.isArray(resultData200)) {
3976
+ result200 = [];
3977
+ for (let item of resultData200)
3978
+ result200.push(DowntimeMachineStateDto.fromJS(item));
3979
+ }
3980
+ return result200;
3981
+ });
3982
+ }
3983
+ else if (status !== 200 && status !== 204) {
3984
+ return response.text().then((_responseText) => {
3985
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3986
+ });
3987
+ }
3988
+ return Promise.resolve(null);
3989
+ }
3990
+ getMachineStateWithDowntimePeriods(id, timestamp) {
3991
+ let url_ = this.baseUrl + "/resources/{id}/statewithdowntimeperiods?";
3992
+ if (id === undefined || id === null)
3993
+ throw new globalThis.Error("The parameter 'id' must be defined.");
3994
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
3995
+ if (timestamp === null)
3996
+ throw new globalThis.Error("The parameter 'timestamp' cannot be null.");
3997
+ else if (timestamp !== undefined)
3998
+ url_ += "timestamp=" + encodeURIComponent("" + timestamp) + "&";
3999
+ url_ = url_.replace(/[?&]$/, "");
4000
+ let options_ = {
4001
+ method: "GET",
4002
+ headers: {
4003
+ "Accept": "application/json"
4004
+ }
4005
+ };
4006
+ return this.transformOptions(options_).then(transformedOptions_ => {
4007
+ return this.http.fetch(url_, transformedOptions_);
4008
+ }).then((_response) => {
4009
+ return this.processGetMachineStateWithDowntimePeriods(_response);
4010
+ });
4011
+ }
4012
+ processGetMachineStateWithDowntimePeriods(response) {
4013
+ const status = response.status;
4014
+ let _headers = {};
4015
+ if (response.headers && response.headers.forEach) {
4016
+ response.headers.forEach((v, k) => _headers[k] = v);
4017
+ }
4018
+ ;
4019
+ if (status === 200) {
4020
+ return response.text().then((_responseText) => {
4021
+ let result200 = null;
4022
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4023
+ result200 = DowntimeMachineStateDto.fromJS(resultData200);
3204
4024
  return result200;
3205
4025
  });
3206
4026
  }
@@ -3211,7 +4031,7 @@ export class ResourcesClient extends AuthorizedApiBase {
3211
4031
  }
3212
4032
  return Promise.resolve(null);
3213
4033
  }
3214
- getResourceStatesSummary(id, startTime, endTime) {
4034
+ getMachineStatesSummary(id, startTime, endTime) {
3215
4035
  let url_ = this.baseUrl + "/resources/{id}/states/summary?";
3216
4036
  if (id === undefined || id === null)
3217
4037
  throw new globalThis.Error("The parameter 'id' must be defined.");
@@ -3230,10 +4050,10 @@ export class ResourcesClient extends AuthorizedApiBase {
3230
4050
  return this.transformOptions(options_).then(transformedOptions_ => {
3231
4051
  return this.http.fetch(url_, transformedOptions_);
3232
4052
  }).then((_response) => {
3233
- return this.processGetResourceStatesSummary(_response);
4053
+ return this.processGetMachineStatesSummary(_response);
3234
4054
  });
3235
4055
  }
3236
- processGetResourceStatesSummary(response) {
4056
+ processGetMachineStatesSummary(response) {
3237
4057
  const status = response.status;
3238
4058
  let _headers = {};
3239
4059
  if (response.headers && response.headers.forEach) {
@@ -3244,7 +4064,7 @@ export class ResourcesClient extends AuthorizedApiBase {
3244
4064
  return response.text().then((_responseText) => {
3245
4065
  let result200 = null;
3246
4066
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3247
- result200 = ResourceStatesSummaryDto.fromJS(resultData200);
4067
+ result200 = MachineStatesSummaryDto.fromJS(resultData200);
3248
4068
  return result200;
3249
4069
  });
3250
4070
  }
@@ -3764,6 +4584,13 @@ export class UtilizationClient extends AuthorizedApiBase {
3764
4584
  this.http = http ? http : window;
3765
4585
  this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
3766
4586
  }
4587
+ /**
4588
+ * @param utilizationType (optional)
4589
+ * @param startTime (optional)
4590
+ * @param endTime (optional)
4591
+ * @param ianaTimeZone (optional)
4592
+ * @deprecated
4593
+ */
3767
4594
  getCompanyUtilization(utilizationType, startTime, endTime, ianaTimeZone) {
3768
4595
  let url_ = this.baseUrl + "/utilization?";
3769
4596
  if (utilizationType === null)
@@ -3862,6 +4689,15 @@ export class UtilizationClient extends AuthorizedApiBase {
3862
4689
  }
3863
4690
  return Promise.resolve(null);
3864
4691
  }
4692
+ /**
4693
+ * @param utilizationType (optional)
4694
+ * @param startTime (optional)
4695
+ * @param endTime (optional)
4696
+ * @param ianaTimeZone (optional)
4697
+ * @param assetId (optional)
4698
+ * @param assetExternalId (optional)
4699
+ * @deprecated
4700
+ */
3865
4701
  getUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone, assetId, assetExternalId) {
3866
4702
  let url_ = this.baseUrl + "/utilization/datapoints?";
3867
4703
  if (utilizationType === null)
@@ -3915,6 +4751,13 @@ export class UtilizationClient extends AuthorizedApiBase {
3915
4751
  }
3916
4752
  return Promise.resolve(null);
3917
4753
  }
4754
+ /**
4755
+ * @param utilizationType (optional)
4756
+ * @param startTime (optional)
4757
+ * @param endTime (optional)
4758
+ * @param ianaTimeZone (optional)
4759
+ * @deprecated
4760
+ */
3918
4761
  getCompanyUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone) {
3919
4762
  let url_ = this.baseUrl + "/utilization/datapoints/company?";
3920
4763
  if (utilizationType === null)
@@ -3964,6 +4807,13 @@ export class UtilizationClient extends AuthorizedApiBase {
3964
4807
  }
3965
4808
  return Promise.resolve(null);
3966
4809
  }
4810
+ /**
4811
+ * @param utilizationType (optional)
4812
+ * @param startTime (optional)
4813
+ * @param endTime (optional)
4814
+ * @param ianaTimeZone (optional)
4815
+ * @deprecated
4816
+ */
3967
4817
  getCrossCompanyUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone) {
3968
4818
  let url_ = this.baseUrl + "/utilization/datapoints/cross-company?";
3969
4819
  if (utilizationType === null)
@@ -4013,13 +4863,213 @@ export class UtilizationClient extends AuthorizedApiBase {
4013
4863
  }
4014
4864
  return Promise.resolve(null);
4015
4865
  }
4016
- }
4017
- export class MrbClient extends AuthorizedApiBase {
4018
- constructor(configuration, baseUrl, http) {
4019
- super(configuration);
4020
- this.jsonParseReviver = undefined;
4021
- this.http = http ? http : window;
4022
- this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
4866
+ getCompanyResourceUtilization(utilizationType, startTime, endTime, ianaTimeZone) {
4867
+ let url_ = this.baseUrl + "/pulseutilization?";
4868
+ if (utilizationType === null)
4869
+ throw new globalThis.Error("The parameter 'utilizationType' cannot be null.");
4870
+ else if (utilizationType !== undefined)
4871
+ url_ += "utilizationType=" + encodeURIComponent("" + utilizationType) + "&";
4872
+ if (startTime === null)
4873
+ throw new globalThis.Error("The parameter 'startTime' cannot be null.");
4874
+ else if (startTime !== undefined)
4875
+ url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
4876
+ if (endTime !== undefined && endTime !== null)
4877
+ url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
4878
+ if (ianaTimeZone !== undefined && ianaTimeZone !== null)
4879
+ url_ += "ianaTimeZone=" + encodeURIComponent("" + ianaTimeZone) + "&";
4880
+ url_ = url_.replace(/[?&]$/, "");
4881
+ let options_ = {
4882
+ method: "GET",
4883
+ headers: {
4884
+ "Accept": "application/json"
4885
+ }
4886
+ };
4887
+ return this.transformOptions(options_).then(transformedOptions_ => {
4888
+ return this.http.fetch(url_, transformedOptions_);
4889
+ }).then((_response) => {
4890
+ return this.processGetCompanyResourceUtilization(_response);
4891
+ });
4892
+ }
4893
+ processGetCompanyResourceUtilization(response) {
4894
+ const status = response.status;
4895
+ let _headers = {};
4896
+ if (response.headers && response.headers.forEach) {
4897
+ response.headers.forEach((v, k) => _headers[k] = v);
4898
+ }
4899
+ ;
4900
+ if (status === 200) {
4901
+ return response.text().then((_responseText) => {
4902
+ let result200 = null;
4903
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4904
+ result200 = CompanyResourceUtilizationDto.fromJS(resultData200);
4905
+ return result200;
4906
+ });
4907
+ }
4908
+ else if (status !== 200 && status !== 204) {
4909
+ return response.text().then((_responseText) => {
4910
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
4911
+ });
4912
+ }
4913
+ return Promise.resolve(null);
4914
+ }
4915
+ getResourceUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone, assetId, assetExternalId) {
4916
+ let url_ = this.baseUrl + "/pulseutilization/datapoints?";
4917
+ if (utilizationType === null)
4918
+ throw new globalThis.Error("The parameter 'utilizationType' cannot be null.");
4919
+ else if (utilizationType !== undefined)
4920
+ url_ += "utilizationType=" + encodeURIComponent("" + utilizationType) + "&";
4921
+ if (startTime === null)
4922
+ throw new globalThis.Error("The parameter 'startTime' cannot be null.");
4923
+ else if (startTime !== undefined)
4924
+ url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
4925
+ if (endTime !== undefined && endTime !== null)
4926
+ url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
4927
+ if (ianaTimeZone !== undefined && ianaTimeZone !== null)
4928
+ url_ += "ianaTimeZone=" + encodeURIComponent("" + ianaTimeZone) + "&";
4929
+ if (assetId !== undefined && assetId !== null)
4930
+ url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
4931
+ if (assetExternalId !== undefined && assetExternalId !== null)
4932
+ url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
4933
+ url_ = url_.replace(/[?&]$/, "");
4934
+ let options_ = {
4935
+ method: "GET",
4936
+ headers: {
4937
+ "Accept": "application/json"
4938
+ }
4939
+ };
4940
+ return this.transformOptions(options_).then(transformedOptions_ => {
4941
+ return this.http.fetch(url_, transformedOptions_);
4942
+ }).then((_response) => {
4943
+ return this.processGetResourceUtilizationDatapoints(_response);
4944
+ });
4945
+ }
4946
+ processGetResourceUtilizationDatapoints(response) {
4947
+ const status = response.status;
4948
+ let _headers = {};
4949
+ if (response.headers && response.headers.forEach) {
4950
+ response.headers.forEach((v, k) => _headers[k] = v);
4951
+ }
4952
+ ;
4953
+ if (status === 200) {
4954
+ return response.text().then((_responseText) => {
4955
+ let result200 = null;
4956
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4957
+ result200 = ResourceUtilizationDatapointListDto.fromJS(resultData200);
4958
+ return result200;
4959
+ });
4960
+ }
4961
+ else if (status !== 200 && status !== 204) {
4962
+ return response.text().then((_responseText) => {
4963
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
4964
+ });
4965
+ }
4966
+ return Promise.resolve(null);
4967
+ }
4968
+ getCompanyResourceUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone) {
4969
+ let url_ = this.baseUrl + "/pulseutilization/company?";
4970
+ if (utilizationType === null)
4971
+ throw new globalThis.Error("The parameter 'utilizationType' cannot be null.");
4972
+ else if (utilizationType !== undefined)
4973
+ url_ += "utilizationType=" + encodeURIComponent("" + utilizationType) + "&";
4974
+ if (startTime === null)
4975
+ throw new globalThis.Error("The parameter 'startTime' cannot be null.");
4976
+ else if (startTime !== undefined)
4977
+ url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
4978
+ if (endTime !== undefined && endTime !== null)
4979
+ url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
4980
+ if (ianaTimeZone !== undefined && ianaTimeZone !== null)
4981
+ url_ += "ianaTimeZone=" + encodeURIComponent("" + ianaTimeZone) + "&";
4982
+ url_ = url_.replace(/[?&]$/, "");
4983
+ let options_ = {
4984
+ method: "GET",
4985
+ headers: {
4986
+ "Accept": "application/json"
4987
+ }
4988
+ };
4989
+ return this.transformOptions(options_).then(transformedOptions_ => {
4990
+ return this.http.fetch(url_, transformedOptions_);
4991
+ }).then((_response) => {
4992
+ return this.processGetCompanyResourceUtilizationDatapoints(_response);
4993
+ });
4994
+ }
4995
+ processGetCompanyResourceUtilizationDatapoints(response) {
4996
+ const status = response.status;
4997
+ let _headers = {};
4998
+ if (response.headers && response.headers.forEach) {
4999
+ response.headers.forEach((v, k) => _headers[k] = v);
5000
+ }
5001
+ ;
5002
+ if (status === 200) {
5003
+ return response.text().then((_responseText) => {
5004
+ let result200 = null;
5005
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5006
+ result200 = CompanyResourceUtilizationDatapointListDto.fromJS(resultData200);
5007
+ return result200;
5008
+ });
5009
+ }
5010
+ else if (status !== 200 && status !== 204) {
5011
+ return response.text().then((_responseText) => {
5012
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5013
+ });
5014
+ }
5015
+ return Promise.resolve(null);
5016
+ }
5017
+ getCrossCompanyResourceUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone) {
5018
+ let url_ = this.baseUrl + "/pulseutilization/cross-company?";
5019
+ if (utilizationType === null)
5020
+ throw new globalThis.Error("The parameter 'utilizationType' cannot be null.");
5021
+ else if (utilizationType !== undefined)
5022
+ url_ += "utilizationType=" + encodeURIComponent("" + utilizationType) + "&";
5023
+ if (startTime === null)
5024
+ throw new globalThis.Error("The parameter 'startTime' cannot be null.");
5025
+ else if (startTime !== undefined)
5026
+ url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
5027
+ if (endTime !== undefined && endTime !== null)
5028
+ url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
5029
+ if (ianaTimeZone !== undefined && ianaTimeZone !== null)
5030
+ url_ += "ianaTimeZone=" + encodeURIComponent("" + ianaTimeZone) + "&";
5031
+ url_ = url_.replace(/[?&]$/, "");
5032
+ let options_ = {
5033
+ method: "GET",
5034
+ headers: {
5035
+ "Accept": "application/json"
5036
+ }
5037
+ };
5038
+ return this.transformOptions(options_).then(transformedOptions_ => {
5039
+ return this.http.fetch(url_, transformedOptions_);
5040
+ }).then((_response) => {
5041
+ return this.processGetCrossCompanyResourceUtilizationDatapoints(_response);
5042
+ });
5043
+ }
5044
+ processGetCrossCompanyResourceUtilizationDatapoints(response) {
5045
+ const status = response.status;
5046
+ let _headers = {};
5047
+ if (response.headers && response.headers.forEach) {
5048
+ response.headers.forEach((v, k) => _headers[k] = v);
5049
+ }
5050
+ ;
5051
+ if (status === 200) {
5052
+ return response.text().then((_responseText) => {
5053
+ let result200 = null;
5054
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5055
+ result200 = CrossCompanyResourceUtilizationDatapointListDto.fromJS(resultData200);
5056
+ return result200;
5057
+ });
5058
+ }
5059
+ else if (status !== 200 && status !== 204) {
5060
+ return response.text().then((_responseText) => {
5061
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5062
+ });
5063
+ }
5064
+ return Promise.resolve(null);
5065
+ }
5066
+ }
5067
+ export class MrbClient extends AuthorizedApiBase {
5068
+ constructor(configuration, baseUrl, http) {
5069
+ super(configuration);
5070
+ this.jsonParseReviver = undefined;
5071
+ this.http = http ? http : window;
5072
+ this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
4023
5073
  }
4024
5074
  listMrbInstances(customerOrder, customerOrderLine) {
4025
5075
  let url_ = this.baseUrl + "/mrb?";
@@ -7717,8 +8767,8 @@ export class DowntimeReasonsClient extends AuthorizedApiBase {
7717
8767
  }
7718
8768
  return Promise.resolve(null);
7719
8769
  }
7720
- createReport(request) {
7721
- let url_ = this.baseUrl + "/downtimereasons/report";
8770
+ listTopDowntimeReasonsForResources(request) {
8771
+ let url_ = this.baseUrl + "/downtimereasons/topreasonsforresources";
7722
8772
  url_ = url_.replace(/[?&]$/, "");
7723
8773
  const content_ = JSON.stringify(request);
7724
8774
  let options_ = {
@@ -7732,10 +8782,10 @@ export class DowntimeReasonsClient extends AuthorizedApiBase {
7732
8782
  return this.transformOptions(options_).then(transformedOptions_ => {
7733
8783
  return this.http.fetch(url_, transformedOptions_);
7734
8784
  }).then((_response) => {
7735
- return this.processCreateReport(_response);
8785
+ return this.processListTopDowntimeReasonsForResources(_response);
7736
8786
  });
7737
8787
  }
7738
- processCreateReport(response) {
8788
+ processListTopDowntimeReasonsForResources(response) {
7739
8789
  const status = response.status;
7740
8790
  let _headers = {};
7741
8791
  if (response.headers && response.headers.forEach) {
@@ -7746,7 +8796,7 @@ export class DowntimeReasonsClient extends AuthorizedApiBase {
7746
8796
  return response.text().then((_responseText) => {
7747
8797
  let result200 = null;
7748
8798
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
7749
- result200 = DowntimeReasonsReportDto.fromJS(resultData200);
8799
+ result200 = TopDowntimeReasonsDto.fromJS(resultData200);
7750
8800
  return result200;
7751
8801
  });
7752
8802
  }
@@ -7757,8 +8807,8 @@ export class DowntimeReasonsClient extends AuthorizedApiBase {
7757
8807
  }
7758
8808
  return Promise.resolve(null);
7759
8809
  }
7760
- exportReportToCsv(request) {
7761
- let url_ = this.baseUrl + "/downtimereasons/exporttocsv";
8810
+ createReport(request) {
8811
+ let url_ = this.baseUrl + "/downtimereasons/report";
7762
8812
  url_ = url_.replace(/[?&]$/, "");
7763
8813
  const content_ = JSON.stringify(request);
7764
8814
  let options_ = {
@@ -7772,10 +8822,10 @@ export class DowntimeReasonsClient extends AuthorizedApiBase {
7772
8822
  return this.transformOptions(options_).then(transformedOptions_ => {
7773
8823
  return this.http.fetch(url_, transformedOptions_);
7774
8824
  }).then((_response) => {
7775
- return this.processExportReportToCsv(_response);
8825
+ return this.processCreateReport(_response);
7776
8826
  });
7777
8827
  }
7778
- processExportReportToCsv(response) {
8828
+ processCreateReport(response) {
7779
8829
  const status = response.status;
7780
8830
  let _headers = {};
7781
8831
  if (response.headers && response.headers.forEach) {
@@ -7786,7 +8836,7 @@ export class DowntimeReasonsClient extends AuthorizedApiBase {
7786
8836
  return response.text().then((_responseText) => {
7787
8837
  let result200 = null;
7788
8838
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
7789
- result200 = DowntimeReasonsReportCsvDto.fromJS(resultData200);
8839
+ result200 = DowntimeReasonsReportDto.fromJS(resultData200);
7790
8840
  return result200;
7791
8841
  });
7792
8842
  }
@@ -7797,30 +8847,25 @@ export class DowntimeReasonsClient extends AuthorizedApiBase {
7797
8847
  }
7798
8848
  return Promise.resolve(null);
7799
8849
  }
7800
- }
7801
- export class KpiAdminClient extends AuthorizedApiBase {
7802
- constructor(configuration, baseUrl, http) {
7803
- super(configuration);
7804
- this.jsonParseReviver = undefined;
7805
- this.http = http ? http : window;
7806
- this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
7807
- }
7808
- getMachineCapacityAdmin() {
7809
- let url_ = this.baseUrl + "/kpiadmin/capacity";
8850
+ exportReportToCsv(request) {
8851
+ let url_ = this.baseUrl + "/downtimereasons/exporttocsv";
7810
8852
  url_ = url_.replace(/[?&]$/, "");
8853
+ const content_ = JSON.stringify(request);
7811
8854
  let options_ = {
7812
- method: "GET",
8855
+ body: content_,
8856
+ method: "POST",
7813
8857
  headers: {
8858
+ "Content-Type": "application/json",
7814
8859
  "Accept": "application/json"
7815
8860
  }
7816
8861
  };
7817
8862
  return this.transformOptions(options_).then(transformedOptions_ => {
7818
8863
  return this.http.fetch(url_, transformedOptions_);
7819
8864
  }).then((_response) => {
7820
- return this.processGetMachineCapacityAdmin(_response);
8865
+ return this.processExportReportToCsv(_response);
7821
8866
  });
7822
8867
  }
7823
- processGetMachineCapacityAdmin(response) {
8868
+ processExportReportToCsv(response) {
7824
8869
  const status = response.status;
7825
8870
  let _headers = {};
7826
8871
  if (response.headers && response.headers.forEach) {
@@ -7831,11 +8876,7 @@ export class KpiAdminClient extends AuthorizedApiBase {
7831
8876
  return response.text().then((_responseText) => {
7832
8877
  let result200 = null;
7833
8878
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
7834
- if (Array.isArray(resultData200)) {
7835
- result200 = [];
7836
- for (let item of resultData200)
7837
- result200.push(MachineGroupCapacityDto.fromJS(item));
7838
- }
8879
+ result200 = DowntimeReasonsReportCsvDto.fromJS(resultData200);
7839
8880
  return result200;
7840
8881
  });
7841
8882
  }
@@ -7846,25 +8887,34 @@ export class KpiAdminClient extends AuthorizedApiBase {
7846
8887
  }
7847
8888
  return Promise.resolve(null);
7848
8889
  }
7849
- updateMachineCapacityAdmin(request) {
7850
- let url_ = this.baseUrl + "/kpiadmin/capacity";
8890
+ }
8891
+ export class MachinesClient extends AuthorizedApiBase {
8892
+ constructor(configuration, baseUrl, http) {
8893
+ super(configuration);
8894
+ this.jsonParseReviver = undefined;
8895
+ this.http = http ? http : window;
8896
+ this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
8897
+ }
8898
+ listMachines(onlyConnectedMachines) {
8899
+ let url_ = this.baseUrl + "/machines?";
8900
+ if (onlyConnectedMachines === null)
8901
+ throw new globalThis.Error("The parameter 'onlyConnectedMachines' cannot be null.");
8902
+ else if (onlyConnectedMachines !== undefined)
8903
+ url_ += "onlyConnectedMachines=" + encodeURIComponent("" + onlyConnectedMachines) + "&";
7851
8904
  url_ = url_.replace(/[?&]$/, "");
7852
- const content_ = JSON.stringify(request);
7853
8905
  let options_ = {
7854
- body: content_,
7855
- method: "PUT",
8906
+ method: "GET",
7856
8907
  headers: {
7857
- "Content-Type": "application/json",
7858
8908
  "Accept": "application/json"
7859
8909
  }
7860
8910
  };
7861
8911
  return this.transformOptions(options_).then(transformedOptions_ => {
7862
8912
  return this.http.fetch(url_, transformedOptions_);
7863
8913
  }).then((_response) => {
7864
- return this.processUpdateMachineCapacityAdmin(_response);
8914
+ return this.processListMachines(_response);
7865
8915
  });
7866
8916
  }
7867
- processUpdateMachineCapacityAdmin(response) {
8917
+ processListMachines(response) {
7868
8918
  const status = response.status;
7869
8919
  let _headers = {};
7870
8920
  if (response.headers && response.headers.forEach) {
@@ -7875,7 +8925,11 @@ export class KpiAdminClient extends AuthorizedApiBase {
7875
8925
  return response.text().then((_responseText) => {
7876
8926
  let result200 = null;
7877
8927
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
7878
- result200 = MachineCapacityDto.fromJS(resultData200);
8928
+ if (Array.isArray(resultData200)) {
8929
+ result200 = [];
8930
+ for (let item of resultData200)
8931
+ result200.push(MachineDto.fromJS(item));
8932
+ }
7879
8933
  return result200;
7880
8934
  });
7881
8935
  }
@@ -7886,16 +8940,8 @@ export class KpiAdminClient extends AuthorizedApiBase {
7886
8940
  }
7887
8941
  return Promise.resolve(null);
7888
8942
  }
7889
- getCalendarCapacityAdmin(startDate, endDate) {
7890
- let url_ = this.baseUrl + "/kpiadmin/calendar?";
7891
- if (startDate === null)
7892
- throw new globalThis.Error("The parameter 'startDate' cannot be null.");
7893
- else if (startDate !== undefined)
7894
- url_ += "startDate=" + encodeURIComponent(startDate ? "" + startDate.toISOString() : "") + "&";
7895
- if (endDate === null)
7896
- throw new globalThis.Error("The parameter 'endDate' cannot be null.");
7897
- else if (endDate !== undefined)
7898
- url_ += "endDate=" + encodeURIComponent(endDate ? "" + endDate.toISOString() : "") + "&";
8943
+ listMachineGroups() {
8944
+ let url_ = this.baseUrl + "/machines/groups";
7899
8945
  url_ = url_.replace(/[?&]$/, "");
7900
8946
  let options_ = {
7901
8947
  method: "GET",
@@ -7906,10 +8952,10 @@ export class KpiAdminClient extends AuthorizedApiBase {
7906
8952
  return this.transformOptions(options_).then(transformedOptions_ => {
7907
8953
  return this.http.fetch(url_, transformedOptions_);
7908
8954
  }).then((_response) => {
7909
- return this.processGetCalendarCapacityAdmin(_response);
8955
+ return this.processListMachineGroups(_response);
7910
8956
  });
7911
8957
  }
7912
- processGetCalendarCapacityAdmin(response) {
8958
+ processListMachineGroups(response) {
7913
8959
  const status = response.status;
7914
8960
  let _headers = {};
7915
8961
  if (response.headers && response.headers.forEach) {
@@ -7923,7 +8969,7 @@ export class KpiAdminClient extends AuthorizedApiBase {
7923
8969
  if (Array.isArray(resultData200)) {
7924
8970
  result200 = [];
7925
8971
  for (let item of resultData200)
7926
- result200.push(CalendarDayDto.fromJS(item));
8972
+ result200.push(MachineGroupDto.fromJS(item));
7927
8973
  }
7928
8974
  return result200;
7929
8975
  });
@@ -7935,13 +8981,13 @@ export class KpiAdminClient extends AuthorizedApiBase {
7935
8981
  }
7936
8982
  return Promise.resolve(null);
7937
8983
  }
7938
- updateCalendarCapacityAdmin(request) {
7939
- let url_ = this.baseUrl + "/kpiadmin/calendar";
8984
+ createMachineGroup(request) {
8985
+ let url_ = this.baseUrl + "/machines/groups";
7940
8986
  url_ = url_.replace(/[?&]$/, "");
7941
8987
  const content_ = JSON.stringify(request);
7942
8988
  let options_ = {
7943
8989
  body: content_,
7944
- method: "PUT",
8990
+ method: "POST",
7945
8991
  headers: {
7946
8992
  "Content-Type": "application/json",
7947
8993
  "Accept": "application/json"
@@ -7950,10 +8996,10 @@ export class KpiAdminClient extends AuthorizedApiBase {
7950
8996
  return this.transformOptions(options_).then(transformedOptions_ => {
7951
8997
  return this.http.fetch(url_, transformedOptions_);
7952
8998
  }).then((_response) => {
7953
- return this.processUpdateCalendarCapacityAdmin(_response);
8999
+ return this.processCreateMachineGroup(_response);
7954
9000
  });
7955
9001
  }
7956
- processUpdateCalendarCapacityAdmin(response) {
9002
+ processCreateMachineGroup(response) {
7957
9003
  const status = response.status;
7958
9004
  let _headers = {};
7959
9005
  if (response.headers && response.headers.forEach) {
@@ -7964,7 +9010,7 @@ export class KpiAdminClient extends AuthorizedApiBase {
7964
9010
  return response.text().then((_responseText) => {
7965
9011
  let result200 = null;
7966
9012
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
7967
- result200 = CalendarCapacityDto.fromJS(resultData200);
9013
+ result200 = CreateMachineGroupResponse.fromJS(resultData200);
7968
9014
  return result200;
7969
9015
  });
7970
9016
  }
@@ -7975,34 +9021,36 @@ export class KpiAdminClient extends AuthorizedApiBase {
7975
9021
  }
7976
9022
  return Promise.resolve(null);
7977
9023
  }
7978
- getCalendarSettings() {
7979
- let url_ = this.baseUrl + "/kpiadmin/calendar/settings";
9024
+ updateMachineGroup(id, request) {
9025
+ let url_ = this.baseUrl + "/machines/groups/{id}";
9026
+ if (id === undefined || id === null)
9027
+ throw new globalThis.Error("The parameter 'id' must be defined.");
9028
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
7980
9029
  url_ = url_.replace(/[?&]$/, "");
9030
+ const content_ = JSON.stringify(request);
7981
9031
  let options_ = {
7982
- method: "GET",
9032
+ body: content_,
9033
+ method: "PUT",
7983
9034
  headers: {
7984
- "Accept": "application/json"
9035
+ "Content-Type": "application/json",
7985
9036
  }
7986
9037
  };
7987
9038
  return this.transformOptions(options_).then(transformedOptions_ => {
7988
9039
  return this.http.fetch(url_, transformedOptions_);
7989
9040
  }).then((_response) => {
7990
- return this.processGetCalendarSettings(_response);
9041
+ return this.processUpdateMachineGroup(_response);
7991
9042
  });
7992
9043
  }
7993
- processGetCalendarSettings(response) {
9044
+ processUpdateMachineGroup(response) {
7994
9045
  const status = response.status;
7995
9046
  let _headers = {};
7996
9047
  if (response.headers && response.headers.forEach) {
7997
9048
  response.headers.forEach((v, k) => _headers[k] = v);
7998
9049
  }
7999
9050
  ;
8000
- if (status === 200) {
9051
+ if (status === 204) {
8001
9052
  return response.text().then((_responseText) => {
8002
- let result200 = null;
8003
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
8004
- result200 = CalendarSettingsDto.fromJS(resultData200);
8005
- return result200;
9053
+ return;
8006
9054
  });
8007
9055
  }
8008
9056
  else if (status !== 200 && status !== 204) {
@@ -8012,37 +9060,32 @@ export class KpiAdminClient extends AuthorizedApiBase {
8012
9060
  }
8013
9061
  return Promise.resolve(null);
8014
9062
  }
8015
- updateCalendarSettings(cmd) {
8016
- let url_ = this.baseUrl + "/kpiadmin/calendar/settings";
9063
+ deleteMachineGroup(id) {
9064
+ let url_ = this.baseUrl + "/machines/groups/{id}";
9065
+ if (id === undefined || id === null)
9066
+ throw new globalThis.Error("The parameter 'id' must be defined.");
9067
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
8017
9068
  url_ = url_.replace(/[?&]$/, "");
8018
- const content_ = JSON.stringify(cmd);
8019
9069
  let options_ = {
8020
- body: content_,
8021
- method: "PUT",
8022
- headers: {
8023
- "Content-Type": "application/json",
8024
- "Accept": "application/json"
8025
- }
9070
+ method: "DELETE",
9071
+ headers: {}
8026
9072
  };
8027
9073
  return this.transformOptions(options_).then(transformedOptions_ => {
8028
9074
  return this.http.fetch(url_, transformedOptions_);
8029
9075
  }).then((_response) => {
8030
- return this.processUpdateCalendarSettings(_response);
9076
+ return this.processDeleteMachineGroup(_response);
8031
9077
  });
8032
9078
  }
8033
- processUpdateCalendarSettings(response) {
9079
+ processDeleteMachineGroup(response) {
8034
9080
  const status = response.status;
8035
9081
  let _headers = {};
8036
9082
  if (response.headers && response.headers.forEach) {
8037
9083
  response.headers.forEach((v, k) => _headers[k] = v);
8038
9084
  }
8039
9085
  ;
8040
- if (status === 200) {
9086
+ if (status === 204) {
8041
9087
  return response.text().then((_responseText) => {
8042
- let result200 = null;
8043
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
8044
- result200 = CalendarSettingsDto.fromJS(resultData200);
8045
- return result200;
9088
+ return;
8046
9089
  });
8047
9090
  }
8048
9091
  else if (status !== 200 && status !== 204) {
@@ -8052,36 +9095,10 @@ export class KpiAdminClient extends AuthorizedApiBase {
8052
9095
  }
8053
9096
  return Promise.resolve(null);
8054
9097
  }
8055
- }
8056
- export class KpiClient extends AuthorizedApiBase {
8057
- constructor(configuration, baseUrl, http) {
8058
- super(configuration);
8059
- this.jsonParseReviver = undefined;
8060
- this.http = http ? http : window;
8061
- this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
8062
- }
8063
- getMachineKpi(machineExternalId, previousPeriodStartDate, startDate, endDate, utcOffset) {
8064
- let url_ = this.baseUrl + "/kpi/capacity?";
8065
- if (machineExternalId === null)
8066
- throw new globalThis.Error("The parameter 'machineExternalId' cannot be null.");
8067
- else if (machineExternalId !== undefined)
8068
- url_ += "machineExternalId=" + encodeURIComponent("" + machineExternalId) + "&";
8069
- if (previousPeriodStartDate === null)
8070
- throw new globalThis.Error("The parameter 'previousPeriodStartDate' cannot be null.");
8071
- else if (previousPeriodStartDate !== undefined)
8072
- url_ += "previousPeriodStartDate=" + encodeURIComponent(previousPeriodStartDate ? "" + previousPeriodStartDate.toISOString() : "") + "&";
8073
- if (startDate === null)
8074
- throw new globalThis.Error("The parameter 'startDate' cannot be null.");
8075
- else if (startDate !== undefined)
8076
- url_ += "startDate=" + encodeURIComponent(startDate ? "" + startDate.toISOString() : "") + "&";
8077
- if (endDate === null)
8078
- throw new globalThis.Error("The parameter 'endDate' cannot be null.");
8079
- else if (endDate !== undefined)
8080
- url_ += "endDate=" + encodeURIComponent(endDate ? "" + endDate.toISOString() : "") + "&";
8081
- if (utcOffset === null)
8082
- throw new globalThis.Error("The parameter 'utcOffset' cannot be null.");
8083
- else if (utcOffset !== undefined)
8084
- url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
9098
+ listCurrentMachineStates(assetId) {
9099
+ let url_ = this.baseUrl + "/machines/states/now?";
9100
+ if (assetId !== undefined && assetId !== null)
9101
+ url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
8085
9102
  url_ = url_.replace(/[?&]$/, "");
8086
9103
  let options_ = {
8087
9104
  method: "GET",
@@ -8092,10 +9109,10 @@ export class KpiClient extends AuthorizedApiBase {
8092
9109
  return this.transformOptions(options_).then(transformedOptions_ => {
8093
9110
  return this.http.fetch(url_, transformedOptions_);
8094
9111
  }).then((_response) => {
8095
- return this.processGetMachineKpi(_response);
9112
+ return this.processListCurrentMachineStates(_response);
8096
9113
  });
8097
9114
  }
8098
- processGetMachineKpi(response) {
9115
+ processListCurrentMachineStates(response) {
8099
9116
  const status = response.status;
8100
9117
  let _headers = {};
8101
9118
  if (response.headers && response.headers.forEach) {
@@ -8106,7 +9123,7 @@ export class KpiClient extends AuthorizedApiBase {
8106
9123
  return response.text().then((_responseText) => {
8107
9124
  let result200 = null;
8108
9125
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
8109
- result200 = MachineKpiDto.fromJS(resultData200);
9126
+ result200 = MachineStateListDto.fromJS(resultData200);
8110
9127
  return result200;
8111
9128
  });
8112
9129
  }
@@ -8117,20 +9134,15 @@ export class KpiClient extends AuthorizedApiBase {
8117
9134
  }
8118
9135
  return Promise.resolve(null);
8119
9136
  }
8120
- getMachineDailyUptime(machineExternalId, date, utcOffset) {
8121
- let url_ = this.baseUrl + "/kpi/daily-uptime?";
8122
- if (machineExternalId === null)
8123
- throw new globalThis.Error("The parameter 'machineExternalId' cannot be null.");
8124
- else if (machineExternalId !== undefined)
8125
- url_ += "machineExternalId=" + encodeURIComponent("" + machineExternalId) + "&";
8126
- if (date === null)
8127
- throw new globalThis.Error("The parameter 'date' cannot be null.");
8128
- else if (date !== undefined)
8129
- url_ += "date=" + encodeURIComponent(date ? "" + date.toISOString() : "") + "&";
8130
- if (utcOffset === null)
8131
- throw new globalThis.Error("The parameter 'utcOffset' cannot be null.");
8132
- else if (utcOffset !== undefined)
8133
- url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
9137
+ listMachineStates(id, startTime, endTime) {
9138
+ let url_ = this.baseUrl + "/machines/{id}/states?";
9139
+ if (id === undefined || id === null)
9140
+ throw new globalThis.Error("The parameter 'id' must be defined.");
9141
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
9142
+ if (startTime !== undefined && startTime !== null)
9143
+ url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
9144
+ if (endTime !== undefined && endTime !== null)
9145
+ url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
8134
9146
  url_ = url_.replace(/[?&]$/, "");
8135
9147
  let options_ = {
8136
9148
  method: "GET",
@@ -8141,10 +9153,10 @@ export class KpiClient extends AuthorizedApiBase {
8141
9153
  return this.transformOptions(options_).then(transformedOptions_ => {
8142
9154
  return this.http.fetch(url_, transformedOptions_);
8143
9155
  }).then((_response) => {
8144
- return this.processGetMachineDailyUptime(_response);
9156
+ return this.processListMachineStates(_response);
8145
9157
  });
8146
9158
  }
8147
- processGetMachineDailyUptime(response) {
9159
+ processListMachineStates(response) {
8148
9160
  const status = response.status;
8149
9161
  let _headers = {};
8150
9162
  if (response.headers && response.headers.forEach) {
@@ -8155,7 +9167,11 @@ export class KpiClient extends AuthorizedApiBase {
8155
9167
  return response.text().then((_responseText) => {
8156
9168
  let result200 = null;
8157
9169
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
8158
- result200 = MachineDailyUptimeDto.fromJS(resultData200);
9170
+ if (Array.isArray(resultData200)) {
9171
+ result200 = [];
9172
+ for (let item of resultData200)
9173
+ result200.push(MachineStateDatapoint.fromJS(item));
9174
+ }
8159
9175
  return result200;
8160
9176
  });
8161
9177
  }
@@ -8166,16 +9182,15 @@ export class KpiClient extends AuthorizedApiBase {
8166
9182
  }
8167
9183
  return Promise.resolve(null);
8168
9184
  }
8169
- getUptimeNormalTrend(assetId, assetExternalId, date, utcOffset) {
8170
- let url_ = this.baseUrl + "/kpi/normal-day-trendline?";
8171
- if (assetId !== undefined && assetId !== null)
8172
- url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
8173
- if (assetExternalId !== undefined && assetExternalId !== null)
8174
- url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
8175
- if (date !== undefined && date !== null)
8176
- url_ += "date=" + encodeURIComponent(date ? "" + date.toISOString() : "") + "&";
8177
- if (utcOffset !== undefined && utcOffset !== null)
8178
- url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
9185
+ listLastDowntimeMachineStates(id, endTime, maxStates) {
9186
+ let url_ = this.baseUrl + "/machines/{id}/lastdowntimestates?";
9187
+ if (id === undefined || id === null)
9188
+ throw new globalThis.Error("The parameter 'id' must be defined.");
9189
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
9190
+ if (endTime !== undefined && endTime !== null)
9191
+ url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
9192
+ if (maxStates !== undefined && maxStates !== null)
9193
+ url_ += "maxStates=" + encodeURIComponent("" + maxStates) + "&";
8179
9194
  url_ = url_.replace(/[?&]$/, "");
8180
9195
  let options_ = {
8181
9196
  method: "GET",
@@ -8186,10 +9201,10 @@ export class KpiClient extends AuthorizedApiBase {
8186
9201
  return this.transformOptions(options_).then(transformedOptions_ => {
8187
9202
  return this.http.fetch(url_, transformedOptions_);
8188
9203
  }).then((_response) => {
8189
- return this.processGetUptimeNormalTrend(_response);
9204
+ return this.processListLastDowntimeMachineStates(_response);
8190
9205
  });
8191
9206
  }
8192
- processGetUptimeNormalTrend(response) {
9207
+ processListLastDowntimeMachineStates(response) {
8193
9208
  const status = response.status;
8194
9209
  let _headers = {};
8195
9210
  if (response.headers && response.headers.forEach) {
@@ -8203,7 +9218,7 @@ export class KpiClient extends AuthorizedApiBase {
8203
9218
  if (Array.isArray(resultData200)) {
8204
9219
  result200 = [];
8205
9220
  for (let item of resultData200)
8206
- result200.push(UptimeTrendDataPointDto.fromJS(item));
9221
+ result200.push(DowntimeMachineStateDto.fromJS(item));
8207
9222
  }
8208
9223
  return result200;
8209
9224
  });
@@ -8215,20 +9230,15 @@ export class KpiClient extends AuthorizedApiBase {
8215
9230
  }
8216
9231
  return Promise.resolve(null);
8217
9232
  }
8218
- }
8219
- export class MachinesClient extends AuthorizedApiBase {
8220
- constructor(configuration, baseUrl, http) {
8221
- super(configuration);
8222
- this.jsonParseReviver = undefined;
8223
- this.http = http ? http : window;
8224
- this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
8225
- }
8226
- listMachines(onlyConnectedMachines) {
8227
- let url_ = this.baseUrl + "/machines?";
8228
- if (onlyConnectedMachines === null)
8229
- throw new globalThis.Error("The parameter 'onlyConnectedMachines' cannot be null.");
8230
- else if (onlyConnectedMachines !== undefined)
8231
- url_ += "onlyConnectedMachines=" + encodeURIComponent("" + onlyConnectedMachines) + "&";
9233
+ getMachineStateWithDowntimePeriods(id, timestamp) {
9234
+ let url_ = this.baseUrl + "/machines/{id}/statewithdowntimeperiods?";
9235
+ if (id === undefined || id === null)
9236
+ throw new globalThis.Error("The parameter 'id' must be defined.");
9237
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
9238
+ if (timestamp === null)
9239
+ throw new globalThis.Error("The parameter 'timestamp' cannot be null.");
9240
+ else if (timestamp !== undefined)
9241
+ url_ += "timestamp=" + encodeURIComponent("" + timestamp) + "&";
8232
9242
  url_ = url_.replace(/[?&]$/, "");
8233
9243
  let options_ = {
8234
9244
  method: "GET",
@@ -8239,10 +9249,10 @@ export class MachinesClient extends AuthorizedApiBase {
8239
9249
  return this.transformOptions(options_).then(transformedOptions_ => {
8240
9250
  return this.http.fetch(url_, transformedOptions_);
8241
9251
  }).then((_response) => {
8242
- return this.processListMachines(_response);
9252
+ return this.processGetMachineStateWithDowntimePeriods(_response);
8243
9253
  });
8244
9254
  }
8245
- processListMachines(response) {
9255
+ processGetMachineStateWithDowntimePeriods(response) {
8246
9256
  const status = response.status;
8247
9257
  let _headers = {};
8248
9258
  if (response.headers && response.headers.forEach) {
@@ -8253,11 +9263,7 @@ export class MachinesClient extends AuthorizedApiBase {
8253
9263
  return response.text().then((_responseText) => {
8254
9264
  let result200 = null;
8255
9265
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
8256
- if (Array.isArray(resultData200)) {
8257
- result200 = [];
8258
- for (let item of resultData200)
8259
- result200.push(MachineDto.fromJS(item));
8260
- }
9266
+ result200 = DowntimeMachineStateDto.fromJS(resultData200);
8261
9267
  return result200;
8262
9268
  });
8263
9269
  }
@@ -8268,8 +9274,15 @@ export class MachinesClient extends AuthorizedApiBase {
8268
9274
  }
8269
9275
  return Promise.resolve(null);
8270
9276
  }
8271
- listMachineGroups() {
8272
- let url_ = this.baseUrl + "/machines/groups";
9277
+ getMachineStatesSummary(id, startTime, endTime) {
9278
+ let url_ = this.baseUrl + "/machines/{id}/states/summary?";
9279
+ if (id === undefined || id === null)
9280
+ throw new globalThis.Error("The parameter 'id' must be defined.");
9281
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
9282
+ if (startTime !== undefined && startTime !== null)
9283
+ url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
9284
+ if (endTime !== undefined && endTime !== null)
9285
+ url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
8273
9286
  url_ = url_.replace(/[?&]$/, "");
8274
9287
  let options_ = {
8275
9288
  method: "GET",
@@ -8280,10 +9293,10 @@ export class MachinesClient extends AuthorizedApiBase {
8280
9293
  return this.transformOptions(options_).then(transformedOptions_ => {
8281
9294
  return this.http.fetch(url_, transformedOptions_);
8282
9295
  }).then((_response) => {
8283
- return this.processListMachineGroups(_response);
9296
+ return this.processGetMachineStatesSummary(_response);
8284
9297
  });
8285
9298
  }
8286
- processListMachineGroups(response) {
9299
+ processGetMachineStatesSummary(response) {
8287
9300
  const status = response.status;
8288
9301
  let _headers = {};
8289
9302
  if (response.headers && response.headers.forEach) {
@@ -8294,11 +9307,7 @@ export class MachinesClient extends AuthorizedApiBase {
8294
9307
  return response.text().then((_responseText) => {
8295
9308
  let result200 = null;
8296
9309
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
8297
- if (Array.isArray(resultData200)) {
8298
- result200 = [];
8299
- for (let item of resultData200)
8300
- result200.push(MachineGroupDto.fromJS(item));
8301
- }
9310
+ result200 = MachineStatesSummaryDto.fromJS(resultData200);
8302
9311
  return result200;
8303
9312
  });
8304
9313
  }
@@ -8309,25 +9318,22 @@ export class MachinesClient extends AuthorizedApiBase {
8309
9318
  }
8310
9319
  return Promise.resolve(null);
8311
9320
  }
8312
- createMachineGroup(request) {
8313
- let url_ = this.baseUrl + "/machines/groups";
9321
+ listMachineErpData() {
9322
+ let url_ = this.baseUrl + "/machines/erp";
8314
9323
  url_ = url_.replace(/[?&]$/, "");
8315
- const content_ = JSON.stringify(request);
8316
9324
  let options_ = {
8317
- body: content_,
8318
- method: "POST",
9325
+ method: "GET",
8319
9326
  headers: {
8320
- "Content-Type": "application/json",
8321
9327
  "Accept": "application/json"
8322
9328
  }
8323
9329
  };
8324
9330
  return this.transformOptions(options_).then(transformedOptions_ => {
8325
9331
  return this.http.fetch(url_, transformedOptions_);
8326
9332
  }).then((_response) => {
8327
- return this.processCreateMachineGroup(_response);
9333
+ return this.processListMachineErpData(_response);
8328
9334
  });
8329
9335
  }
8330
- processCreateMachineGroup(response) {
9336
+ processListMachineErpData(response) {
8331
9337
  const status = response.status;
8332
9338
  let _headers = {};
8333
9339
  if (response.headers && response.headers.forEach) {
@@ -8338,341 +9344,7 @@ export class MachinesClient extends AuthorizedApiBase {
8338
9344
  return response.text().then((_responseText) => {
8339
9345
  let result200 = null;
8340
9346
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
8341
- result200 = CreateMachineGroupResponse.fromJS(resultData200);
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
- }
8352
- updateMachineGroup(id, request) {
8353
- let url_ = this.baseUrl + "/machines/groups/{id}";
8354
- if (id === undefined || id === null)
8355
- throw new globalThis.Error("The parameter 'id' must be defined.");
8356
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
8357
- url_ = url_.replace(/[?&]$/, "");
8358
- const content_ = JSON.stringify(request);
8359
- let options_ = {
8360
- body: content_,
8361
- method: "PUT",
8362
- headers: {
8363
- "Content-Type": "application/json",
8364
- }
8365
- };
8366
- return this.transformOptions(options_).then(transformedOptions_ => {
8367
- return this.http.fetch(url_, transformedOptions_);
8368
- }).then((_response) => {
8369
- return this.processUpdateMachineGroup(_response);
8370
- });
8371
- }
8372
- processUpdateMachineGroup(response) {
8373
- const status = response.status;
8374
- let _headers = {};
8375
- if (response.headers && response.headers.forEach) {
8376
- response.headers.forEach((v, k) => _headers[k] = v);
8377
- }
8378
- ;
8379
- if (status === 204) {
8380
- return response.text().then((_responseText) => {
8381
- return;
8382
- });
8383
- }
8384
- else if (status !== 200 && status !== 204) {
8385
- return response.text().then((_responseText) => {
8386
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
8387
- });
8388
- }
8389
- return Promise.resolve(null);
8390
- }
8391
- deleteMachineGroup(id) {
8392
- let url_ = this.baseUrl + "/machines/groups/{id}";
8393
- if (id === undefined || id === null)
8394
- throw new globalThis.Error("The parameter 'id' must be defined.");
8395
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
8396
- url_ = url_.replace(/[?&]$/, "");
8397
- let options_ = {
8398
- method: "DELETE",
8399
- headers: {}
8400
- };
8401
- return this.transformOptions(options_).then(transformedOptions_ => {
8402
- return this.http.fetch(url_, transformedOptions_);
8403
- }).then((_response) => {
8404
- return this.processDeleteMachineGroup(_response);
8405
- });
8406
- }
8407
- processDeleteMachineGroup(response) {
8408
- const status = response.status;
8409
- let _headers = {};
8410
- if (response.headers && response.headers.forEach) {
8411
- response.headers.forEach((v, k) => _headers[k] = v);
8412
- }
8413
- ;
8414
- if (status === 204) {
8415
- return response.text().then((_responseText) => {
8416
- return;
8417
- });
8418
- }
8419
- else if (status !== 200 && status !== 204) {
8420
- return response.text().then((_responseText) => {
8421
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
8422
- });
8423
- }
8424
- return Promise.resolve(null);
8425
- }
8426
- listCurrentMachineStates(assetId) {
8427
- let url_ = this.baseUrl + "/machines/states/now?";
8428
- if (assetId !== undefined && assetId !== null)
8429
- url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
8430
- url_ = url_.replace(/[?&]$/, "");
8431
- let options_ = {
8432
- method: "GET",
8433
- headers: {
8434
- "Accept": "application/json"
8435
- }
8436
- };
8437
- return this.transformOptions(options_).then(transformedOptions_ => {
8438
- return this.http.fetch(url_, transformedOptions_);
8439
- }).then((_response) => {
8440
- return this.processListCurrentMachineStates(_response);
8441
- });
8442
- }
8443
- processListCurrentMachineStates(response) {
8444
- const status = response.status;
8445
- let _headers = {};
8446
- if (response.headers && response.headers.forEach) {
8447
- response.headers.forEach((v, k) => _headers[k] = v);
8448
- }
8449
- ;
8450
- if (status === 200) {
8451
- return response.text().then((_responseText) => {
8452
- let result200 = null;
8453
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
8454
- result200 = MachineStateListDto.fromJS(resultData200);
8455
- return result200;
8456
- });
8457
- }
8458
- else if (status !== 200 && status !== 204) {
8459
- return response.text().then((_responseText) => {
8460
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
8461
- });
8462
- }
8463
- return Promise.resolve(null);
8464
- }
8465
- listMachineStates(id, startTime, endTime) {
8466
- let url_ = this.baseUrl + "/machines/{id}/states?";
8467
- if (id === undefined || id === null)
8468
- throw new globalThis.Error("The parameter 'id' must be defined.");
8469
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
8470
- if (startTime !== undefined && startTime !== null)
8471
- url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
8472
- if (endTime !== undefined && endTime !== null)
8473
- url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
8474
- url_ = url_.replace(/[?&]$/, "");
8475
- let options_ = {
8476
- method: "GET",
8477
- headers: {
8478
- "Accept": "application/json"
8479
- }
8480
- };
8481
- return this.transformOptions(options_).then(transformedOptions_ => {
8482
- return this.http.fetch(url_, transformedOptions_);
8483
- }).then((_response) => {
8484
- return this.processListMachineStates(_response);
8485
- });
8486
- }
8487
- processListMachineStates(response) {
8488
- const status = response.status;
8489
- let _headers = {};
8490
- if (response.headers && response.headers.forEach) {
8491
- response.headers.forEach((v, k) => _headers[k] = v);
8492
- }
8493
- ;
8494
- if (status === 200) {
8495
- return response.text().then((_responseText) => {
8496
- let result200 = null;
8497
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
8498
- if (Array.isArray(resultData200)) {
8499
- result200 = [];
8500
- for (let item of resultData200)
8501
- result200.push(MachineStateDatapoint.fromJS(item));
8502
- }
8503
- return result200;
8504
- });
8505
- }
8506
- else if (status !== 200 && status !== 204) {
8507
- return response.text().then((_responseText) => {
8508
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
8509
- });
8510
- }
8511
- return Promise.resolve(null);
8512
- }
8513
- listLastDowntimeMachineStates(id, endTime, maxStates) {
8514
- let url_ = this.baseUrl + "/machines/{id}/lastdowntimestates?";
8515
- if (id === undefined || id === null)
8516
- throw new globalThis.Error("The parameter 'id' must be defined.");
8517
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
8518
- if (endTime !== undefined && endTime !== null)
8519
- url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
8520
- if (maxStates !== undefined && maxStates !== null)
8521
- url_ += "maxStates=" + encodeURIComponent("" + maxStates) + "&";
8522
- url_ = url_.replace(/[?&]$/, "");
8523
- let options_ = {
8524
- method: "GET",
8525
- headers: {
8526
- "Accept": "application/json"
8527
- }
8528
- };
8529
- return this.transformOptions(options_).then(transformedOptions_ => {
8530
- return this.http.fetch(url_, transformedOptions_);
8531
- }).then((_response) => {
8532
- return this.processListLastDowntimeMachineStates(_response);
8533
- });
8534
- }
8535
- processListLastDowntimeMachineStates(response) {
8536
- const status = response.status;
8537
- let _headers = {};
8538
- if (response.headers && response.headers.forEach) {
8539
- response.headers.forEach((v, k) => _headers[k] = v);
8540
- }
8541
- ;
8542
- if (status === 200) {
8543
- return response.text().then((_responseText) => {
8544
- let result200 = null;
8545
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
8546
- if (Array.isArray(resultData200)) {
8547
- result200 = [];
8548
- for (let item of resultData200)
8549
- result200.push(DowntimeMachineStateDto.fromJS(item));
8550
- }
8551
- return result200;
8552
- });
8553
- }
8554
- else if (status !== 200 && status !== 204) {
8555
- return response.text().then((_responseText) => {
8556
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
8557
- });
8558
- }
8559
- return Promise.resolve(null);
8560
- }
8561
- getMachineStateWithDowntimePeriods(id, timestamp) {
8562
- let url_ = this.baseUrl + "/machines/{id}/statewithdowntimeperiods?";
8563
- if (id === undefined || id === null)
8564
- throw new globalThis.Error("The parameter 'id' must be defined.");
8565
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
8566
- if (timestamp === null)
8567
- throw new globalThis.Error("The parameter 'timestamp' cannot be null.");
8568
- else if (timestamp !== undefined)
8569
- url_ += "timestamp=" + encodeURIComponent("" + timestamp) + "&";
8570
- url_ = url_.replace(/[?&]$/, "");
8571
- let options_ = {
8572
- method: "GET",
8573
- headers: {
8574
- "Accept": "application/json"
8575
- }
8576
- };
8577
- return this.transformOptions(options_).then(transformedOptions_ => {
8578
- return this.http.fetch(url_, transformedOptions_);
8579
- }).then((_response) => {
8580
- return this.processGetMachineStateWithDowntimePeriods(_response);
8581
- });
8582
- }
8583
- processGetMachineStateWithDowntimePeriods(response) {
8584
- const status = response.status;
8585
- let _headers = {};
8586
- if (response.headers && response.headers.forEach) {
8587
- response.headers.forEach((v, k) => _headers[k] = v);
8588
- }
8589
- ;
8590
- if (status === 200) {
8591
- return response.text().then((_responseText) => {
8592
- let result200 = null;
8593
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
8594
- result200 = DowntimeMachineStateDto.fromJS(resultData200);
8595
- return result200;
8596
- });
8597
- }
8598
- else if (status !== 200 && status !== 204) {
8599
- return response.text().then((_responseText) => {
8600
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
8601
- });
8602
- }
8603
- return Promise.resolve(null);
8604
- }
8605
- getMachineStatesSummary(id, startTime, endTime) {
8606
- let url_ = this.baseUrl + "/machines/{id}/states/summary?";
8607
- if (id === undefined || id === null)
8608
- throw new globalThis.Error("The parameter 'id' must be defined.");
8609
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
8610
- if (startTime !== undefined && startTime !== null)
8611
- url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
8612
- if (endTime !== undefined && endTime !== null)
8613
- url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
8614
- url_ = url_.replace(/[?&]$/, "");
8615
- let options_ = {
8616
- method: "GET",
8617
- headers: {
8618
- "Accept": "application/json"
8619
- }
8620
- };
8621
- return this.transformOptions(options_).then(transformedOptions_ => {
8622
- return this.http.fetch(url_, transformedOptions_);
8623
- }).then((_response) => {
8624
- return this.processGetMachineStatesSummary(_response);
8625
- });
8626
- }
8627
- processGetMachineStatesSummary(response) {
8628
- const status = response.status;
8629
- let _headers = {};
8630
- if (response.headers && response.headers.forEach) {
8631
- response.headers.forEach((v, k) => _headers[k] = v);
8632
- }
8633
- ;
8634
- if (status === 200) {
8635
- return response.text().then((_responseText) => {
8636
- let result200 = null;
8637
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
8638
- result200 = MachineStatesSummaryDto.fromJS(resultData200);
8639
- return result200;
8640
- });
8641
- }
8642
- else if (status !== 200 && status !== 204) {
8643
- return response.text().then((_responseText) => {
8644
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
8645
- });
8646
- }
8647
- return Promise.resolve(null);
8648
- }
8649
- listMachineErpData() {
8650
- let url_ = this.baseUrl + "/machines/erp";
8651
- url_ = url_.replace(/[?&]$/, "");
8652
- let options_ = {
8653
- method: "GET",
8654
- headers: {
8655
- "Accept": "application/json"
8656
- }
8657
- };
8658
- return this.transformOptions(options_).then(transformedOptions_ => {
8659
- return this.http.fetch(url_, transformedOptions_);
8660
- }).then((_response) => {
8661
- return this.processListMachineErpData(_response);
8662
- });
8663
- }
8664
- processListMachineErpData(response) {
8665
- const status = response.status;
8666
- let _headers = {};
8667
- if (response.headers && response.headers.forEach) {
8668
- response.headers.forEach((v, k) => _headers[k] = v);
8669
- }
8670
- ;
8671
- if (status === 200) {
8672
- return response.text().then((_responseText) => {
8673
- let result200 = null;
8674
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
8675
- result200 = MachineErpDataListDto.fromJS(resultData200);
9347
+ result200 = MachineErpDataListDto.fromJS(resultData200);
8676
9348
  return result200;
8677
9349
  });
8678
9350
  }
@@ -26085,6 +26757,104 @@ export class ResourceUtilizationDetailsDto {
26085
26757
  return data;
26086
26758
  }
26087
26759
  }
26760
+ export class ResourceUptimesAggregateDto {
26761
+ constructor(data) {
26762
+ if (data) {
26763
+ for (var property in data) {
26764
+ if (data.hasOwnProperty(property))
26765
+ this[property] = data[property];
26766
+ }
26767
+ }
26768
+ if (!data) {
26769
+ this.resourceUptimes = [];
26770
+ this.sum = new ResourceUptimeSumDto();
26771
+ }
26772
+ }
26773
+ init(_data) {
26774
+ if (_data) {
26775
+ if (Array.isArray(_data["resourceUptimes"])) {
26776
+ this.resourceUptimes = [];
26777
+ for (let item of _data["resourceUptimes"])
26778
+ this.resourceUptimes.push(ResourceUptimeDto.fromJS(item));
26779
+ }
26780
+ this.sum = _data["sum"] ? ResourceUptimeSumDto.fromJS(_data["sum"]) : new ResourceUptimeSumDto();
26781
+ }
26782
+ }
26783
+ static fromJS(data) {
26784
+ data = typeof data === 'object' ? data : {};
26785
+ let result = new ResourceUptimesAggregateDto();
26786
+ result.init(data);
26787
+ return result;
26788
+ }
26789
+ toJSON(data) {
26790
+ data = typeof data === 'object' ? data : {};
26791
+ if (Array.isArray(this.resourceUptimes)) {
26792
+ data["resourceUptimes"] = [];
26793
+ for (let item of this.resourceUptimes)
26794
+ data["resourceUptimes"].push(item ? item.toJSON() : undefined);
26795
+ }
26796
+ data["sum"] = this.sum ? this.sum.toJSON() : undefined;
26797
+ return data;
26798
+ }
26799
+ }
26800
+ export class ResourceUptimeDto {
26801
+ constructor(data) {
26802
+ if (data) {
26803
+ for (var property in data) {
26804
+ if (data.hasOwnProperty(property))
26805
+ this[property] = data[property];
26806
+ }
26807
+ }
26808
+ }
26809
+ init(_data) {
26810
+ if (_data) {
26811
+ this.assetExternalId = _data["assetExternalId"];
26812
+ this.percent = _data["percent"];
26813
+ this.numberOfSeconds = _data["numberOfSeconds"];
26814
+ }
26815
+ }
26816
+ static fromJS(data) {
26817
+ data = typeof data === 'object' ? data : {};
26818
+ let result = new ResourceUptimeDto();
26819
+ result.init(data);
26820
+ return result;
26821
+ }
26822
+ toJSON(data) {
26823
+ data = typeof data === 'object' ? data : {};
26824
+ data["assetExternalId"] = this.assetExternalId;
26825
+ data["percent"] = this.percent;
26826
+ data["numberOfSeconds"] = this.numberOfSeconds;
26827
+ return data;
26828
+ }
26829
+ }
26830
+ export class ResourceUptimeSumDto {
26831
+ constructor(data) {
26832
+ if (data) {
26833
+ for (var property in data) {
26834
+ if (data.hasOwnProperty(property))
26835
+ this[property] = data[property];
26836
+ }
26837
+ }
26838
+ }
26839
+ init(_data) {
26840
+ if (_data) {
26841
+ this.percent = _data["percent"];
26842
+ this.numberOfSeconds = _data["numberOfSeconds"];
26843
+ }
26844
+ }
26845
+ static fromJS(data) {
26846
+ data = typeof data === 'object' ? data : {};
26847
+ let result = new ResourceUptimeSumDto();
26848
+ result.init(data);
26849
+ return result;
26850
+ }
26851
+ toJSON(data) {
26852
+ data = typeof data === 'object' ? data : {};
26853
+ data["percent"] = this.percent;
26854
+ data["numberOfSeconds"] = this.numberOfSeconds;
26855
+ return data;
26856
+ }
26857
+ }
26088
26858
  export class ListResourceUptimesTodayRequest {
26089
26859
  constructor(data) {
26090
26860
  if (data) {
@@ -27576,6 +28346,517 @@ export class CncProgramInfoDto {
27576
28346
  return data;
27577
28347
  }
27578
28348
  }
28349
+ export class ResourceGroupCapacityDto {
28350
+ constructor(data) {
28351
+ if (data) {
28352
+ for (var property in data) {
28353
+ if (data.hasOwnProperty(property))
28354
+ this[property] = data[property];
28355
+ }
28356
+ }
28357
+ if (!data) {
28358
+ this.resource = [];
28359
+ }
28360
+ }
28361
+ init(_data) {
28362
+ if (_data) {
28363
+ this.resourceGroupName = _data["resourceGroupName"];
28364
+ if (Array.isArray(_data["resource"])) {
28365
+ this.resource = [];
28366
+ for (let item of _data["resource"])
28367
+ this.resource.push(ResourceCapacityDto.fromJS(item));
28368
+ }
28369
+ }
28370
+ }
28371
+ static fromJS(data) {
28372
+ data = typeof data === 'object' ? data : {};
28373
+ let result = new ResourceGroupCapacityDto();
28374
+ result.init(data);
28375
+ return result;
28376
+ }
28377
+ toJSON(data) {
28378
+ data = typeof data === 'object' ? data : {};
28379
+ data["resourceGroupName"] = this.resourceGroupName;
28380
+ if (Array.isArray(this.resource)) {
28381
+ data["resource"] = [];
28382
+ for (let item of this.resource)
28383
+ data["resource"].push(item ? item.toJSON() : undefined);
28384
+ }
28385
+ return data;
28386
+ }
28387
+ }
28388
+ export class ResourceCapacityDto {
28389
+ constructor(data) {
28390
+ if (data) {
28391
+ for (var property in data) {
28392
+ if (data.hasOwnProperty(property))
28393
+ this[property] = data[property];
28394
+ }
28395
+ }
28396
+ if (!data) {
28397
+ this.capacity = [];
28398
+ }
28399
+ }
28400
+ init(_data) {
28401
+ if (_data) {
28402
+ this.resourceExternalId = _data["resourceExternalId"];
28403
+ this.name = _data["name"];
28404
+ this.description = _data["description"];
28405
+ this.comment = _data["comment"];
28406
+ this.utilizationPercent = _data["utilizationPercent"];
28407
+ if (Array.isArray(_data["capacity"])) {
28408
+ this.capacity = [];
28409
+ for (let item of _data["capacity"])
28410
+ this.capacity.push(ResourceCapacitySettingsDto.fromJS(item));
28411
+ }
28412
+ this.created = _data["created"] ? new Date(_data["created"].toString()) : undefined;
28413
+ this.updated = _data["updated"] ? new Date(_data["updated"].toString()) : undefined;
28414
+ this.updatedBy = _data["updatedBy"];
28415
+ this.updatedById = _data["updatedById"];
28416
+ }
28417
+ }
28418
+ static fromJS(data) {
28419
+ data = typeof data === 'object' ? data : {};
28420
+ let result = new ResourceCapacityDto();
28421
+ result.init(data);
28422
+ return result;
28423
+ }
28424
+ toJSON(data) {
28425
+ data = typeof data === 'object' ? data : {};
28426
+ data["resourceExternalId"] = this.resourceExternalId;
28427
+ data["name"] = this.name;
28428
+ data["description"] = this.description;
28429
+ data["comment"] = this.comment;
28430
+ data["utilizationPercent"] = this.utilizationPercent;
28431
+ if (Array.isArray(this.capacity)) {
28432
+ data["capacity"] = [];
28433
+ for (let item of this.capacity)
28434
+ data["capacity"].push(item ? item.toJSON() : undefined);
28435
+ }
28436
+ data["created"] = this.created ? this.created.toISOString() : undefined;
28437
+ data["updated"] = this.updated ? this.updated.toISOString() : undefined;
28438
+ data["updatedBy"] = this.updatedBy;
28439
+ data["updatedById"] = this.updatedById;
28440
+ return data;
28441
+ }
28442
+ }
28443
+ export class ResourceCapacitySettingsDto {
28444
+ constructor(data) {
28445
+ if (data) {
28446
+ for (var property in data) {
28447
+ if (data.hasOwnProperty(property))
28448
+ this[property] = data[property];
28449
+ }
28450
+ }
28451
+ }
28452
+ init(_data) {
28453
+ if (_data) {
28454
+ this.dayIndex = _data["dayIndex"];
28455
+ this.capacityHours = _data["capacityHours"];
28456
+ }
28457
+ }
28458
+ static fromJS(data) {
28459
+ data = typeof data === 'object' ? data : {};
28460
+ let result = new ResourceCapacitySettingsDto();
28461
+ result.init(data);
28462
+ return result;
28463
+ }
28464
+ toJSON(data) {
28465
+ data = typeof data === 'object' ? data : {};
28466
+ data["dayIndex"] = this.dayIndex;
28467
+ data["capacityHours"] = this.capacityHours;
28468
+ return data;
28469
+ }
28470
+ }
28471
+ export class UpdateResourcesCapacity {
28472
+ constructor(data) {
28473
+ if (data) {
28474
+ for (var property in data) {
28475
+ if (data.hasOwnProperty(property))
28476
+ this[property] = data[property];
28477
+ }
28478
+ }
28479
+ }
28480
+ init(_data) {
28481
+ if (_data) {
28482
+ this.resourceExternalId = _data["resourceExternalId"];
28483
+ this.comment = _data["comment"];
28484
+ this.utilizationPercent = _data["utilizationPercent"];
28485
+ if (Array.isArray(_data["capacity"])) {
28486
+ this.capacity = [];
28487
+ for (let item of _data["capacity"])
28488
+ this.capacity.push(ResourceCapacitySettingsDto.fromJS(item));
28489
+ }
28490
+ }
28491
+ }
28492
+ static fromJS(data) {
28493
+ data = typeof data === 'object' ? data : {};
28494
+ let result = new UpdateResourcesCapacity();
28495
+ result.init(data);
28496
+ return result;
28497
+ }
28498
+ toJSON(data) {
28499
+ data = typeof data === 'object' ? data : {};
28500
+ data["resourceExternalId"] = this.resourceExternalId;
28501
+ data["comment"] = this.comment;
28502
+ data["utilizationPercent"] = this.utilizationPercent;
28503
+ if (Array.isArray(this.capacity)) {
28504
+ data["capacity"] = [];
28505
+ for (let item of this.capacity)
28506
+ data["capacity"].push(item ? item.toJSON() : undefined);
28507
+ }
28508
+ return data;
28509
+ }
28510
+ }
28511
+ export class CalendarDayDto {
28512
+ constructor(data) {
28513
+ if (data) {
28514
+ for (var property in data) {
28515
+ if (data.hasOwnProperty(property))
28516
+ this[property] = data[property];
28517
+ }
28518
+ }
28519
+ }
28520
+ init(_data) {
28521
+ if (_data) {
28522
+ this.date = _data["date"] ? new Date(_data["date"].toString()) : undefined;
28523
+ this.dayCapacity = _data["dayCapacity"];
28524
+ this.capacityHours = _data["capacityHours"];
28525
+ this.companyId = _data["companyId"];
28526
+ }
28527
+ }
28528
+ static fromJS(data) {
28529
+ data = typeof data === 'object' ? data : {};
28530
+ let result = new CalendarDayDto();
28531
+ result.init(data);
28532
+ return result;
28533
+ }
28534
+ toJSON(data) {
28535
+ data = typeof data === 'object' ? data : {};
28536
+ data["date"] = this.date ? this.date.toISOString() : undefined;
28537
+ data["dayCapacity"] = this.dayCapacity;
28538
+ data["capacityHours"] = this.capacityHours;
28539
+ data["companyId"] = this.companyId;
28540
+ return data;
28541
+ }
28542
+ }
28543
+ export class CalendarCapacityDto {
28544
+ constructor(data) {
28545
+ if (data) {
28546
+ for (var property in data) {
28547
+ if (data.hasOwnProperty(property))
28548
+ this[property] = data[property];
28549
+ }
28550
+ }
28551
+ }
28552
+ init(_data) {
28553
+ if (_data) {
28554
+ this.date = _data["date"] ? new Date(_data["date"].toString()) : undefined;
28555
+ this.dayCapacity = _data["dayCapacity"];
28556
+ }
28557
+ }
28558
+ static fromJS(data) {
28559
+ data = typeof data === 'object' ? data : {};
28560
+ let result = new CalendarCapacityDto();
28561
+ result.init(data);
28562
+ return result;
28563
+ }
28564
+ toJSON(data) {
28565
+ data = typeof data === 'object' ? data : {};
28566
+ data["date"] = this.date ? this.date.toISOString() : undefined;
28567
+ data["dayCapacity"] = this.dayCapacity;
28568
+ return data;
28569
+ }
28570
+ }
28571
+ export class UpdateCalendarCapacity {
28572
+ constructor(data) {
28573
+ if (data) {
28574
+ for (var property in data) {
28575
+ if (data.hasOwnProperty(property))
28576
+ this[property] = data[property];
28577
+ }
28578
+ }
28579
+ }
28580
+ init(_data) {
28581
+ if (_data) {
28582
+ this.date = _data["date"] ? new Date(_data["date"].toString()) : undefined;
28583
+ this.dayCapacity = _data["dayCapacity"];
28584
+ }
28585
+ }
28586
+ static fromJS(data) {
28587
+ data = typeof data === 'object' ? data : {};
28588
+ let result = new UpdateCalendarCapacity();
28589
+ result.init(data);
28590
+ return result;
28591
+ }
28592
+ toJSON(data) {
28593
+ data = typeof data === 'object' ? data : {};
28594
+ data["date"] = this.date ? this.date.toISOString() : undefined;
28595
+ data["dayCapacity"] = this.dayCapacity;
28596
+ return data;
28597
+ }
28598
+ }
28599
+ export class CalendarSettingsDto {
28600
+ constructor(data) {
28601
+ if (data) {
28602
+ for (var property in data) {
28603
+ if (data.hasOwnProperty(property))
28604
+ this[property] = data[property];
28605
+ }
28606
+ }
28607
+ }
28608
+ init(_data) {
28609
+ if (_data) {
28610
+ if (_data["defaultHoursPerWeekday"]) {
28611
+ this.defaultHoursPerWeekday = {};
28612
+ for (let key in _data["defaultHoursPerWeekday"]) {
28613
+ if (_data["defaultHoursPerWeekday"].hasOwnProperty(key))
28614
+ this.defaultHoursPerWeekday[key] = _data["defaultHoursPerWeekday"][key];
28615
+ }
28616
+ }
28617
+ this.halfDayHours = _data["halfDayHours"];
28618
+ this.holidayHours = _data["holidayHours"];
28619
+ }
28620
+ }
28621
+ static fromJS(data) {
28622
+ data = typeof data === 'object' ? data : {};
28623
+ let result = new CalendarSettingsDto();
28624
+ result.init(data);
28625
+ return result;
28626
+ }
28627
+ toJSON(data) {
28628
+ data = typeof data === 'object' ? data : {};
28629
+ if (this.defaultHoursPerWeekday) {
28630
+ data["defaultHoursPerWeekday"] = {};
28631
+ for (let key in this.defaultHoursPerWeekday) {
28632
+ if (this.defaultHoursPerWeekday.hasOwnProperty(key))
28633
+ data["defaultHoursPerWeekday"][key] = this.defaultHoursPerWeekday[key];
28634
+ }
28635
+ }
28636
+ data["halfDayHours"] = this.halfDayHours;
28637
+ data["holidayHours"] = this.holidayHours;
28638
+ return data;
28639
+ }
28640
+ }
28641
+ export class UpdateCalendarSettingsCommand {
28642
+ constructor(data) {
28643
+ if (data) {
28644
+ for (var property in data) {
28645
+ if (data.hasOwnProperty(property))
28646
+ this[property] = data[property];
28647
+ }
28648
+ }
28649
+ }
28650
+ init(_data) {
28651
+ if (_data) {
28652
+ if (_data["defaultHoursPerWeekday"]) {
28653
+ this.defaultHoursPerWeekday = {};
28654
+ for (let key in _data["defaultHoursPerWeekday"]) {
28655
+ if (_data["defaultHoursPerWeekday"].hasOwnProperty(key))
28656
+ this.defaultHoursPerWeekday[key] = _data["defaultHoursPerWeekday"][key];
28657
+ }
28658
+ }
28659
+ this.halfDayHours = _data["halfDayHours"];
28660
+ this.holidayHours = _data["holidayHours"];
28661
+ }
28662
+ }
28663
+ static fromJS(data) {
28664
+ data = typeof data === 'object' ? data : {};
28665
+ let result = new UpdateCalendarSettingsCommand();
28666
+ result.init(data);
28667
+ return result;
28668
+ }
28669
+ toJSON(data) {
28670
+ data = typeof data === 'object' ? data : {};
28671
+ if (this.defaultHoursPerWeekday) {
28672
+ data["defaultHoursPerWeekday"] = {};
28673
+ for (let key in this.defaultHoursPerWeekday) {
28674
+ if (this.defaultHoursPerWeekday.hasOwnProperty(key))
28675
+ data["defaultHoursPerWeekday"][key] = this.defaultHoursPerWeekday[key];
28676
+ }
28677
+ }
28678
+ data["halfDayHours"] = this.halfDayHours;
28679
+ data["holidayHours"] = this.holidayHours;
28680
+ return data;
28681
+ }
28682
+ }
28683
+ export class ResourceKpiDto {
28684
+ constructor(data) {
28685
+ if (data) {
28686
+ for (var property in data) {
28687
+ if (data.hasOwnProperty(property))
28688
+ this[property] = data[property];
28689
+ }
28690
+ }
28691
+ if (!data) {
28692
+ this.days = [];
28693
+ }
28694
+ }
28695
+ init(_data) {
28696
+ if (_data) {
28697
+ this.uptimeToNow = _data["uptimeToNow"];
28698
+ this.uptimeToNowPreviousPeriod = _data["uptimeToNowPreviousPeriod"];
28699
+ this.averageUpTime = _data["averageUpTime"];
28700
+ this.uptimeTargetReached = _data["uptimeTargetReached"];
28701
+ if (Array.isArray(_data["days"])) {
28702
+ this.days = [];
28703
+ for (let item of _data["days"])
28704
+ this.days.push(ResourceDayKpiDto.fromJS(item));
28705
+ }
28706
+ }
28707
+ }
28708
+ static fromJS(data) {
28709
+ data = typeof data === 'object' ? data : {};
28710
+ let result = new ResourceKpiDto();
28711
+ result.init(data);
28712
+ return result;
28713
+ }
28714
+ toJSON(data) {
28715
+ data = typeof data === 'object' ? data : {};
28716
+ data["uptimeToNow"] = this.uptimeToNow;
28717
+ data["uptimeToNowPreviousPeriod"] = this.uptimeToNowPreviousPeriod;
28718
+ data["averageUpTime"] = this.averageUpTime;
28719
+ data["uptimeTargetReached"] = this.uptimeTargetReached;
28720
+ if (Array.isArray(this.days)) {
28721
+ data["days"] = [];
28722
+ for (let item of this.days)
28723
+ data["days"].push(item ? item.toJSON() : undefined);
28724
+ }
28725
+ return data;
28726
+ }
28727
+ }
28728
+ export class ResourceDayKpiDto {
28729
+ constructor(data) {
28730
+ if (data) {
28731
+ for (var property in data) {
28732
+ if (data.hasOwnProperty(property))
28733
+ this[property] = data[property];
28734
+ }
28735
+ }
28736
+ }
28737
+ init(_data) {
28738
+ if (_data) {
28739
+ this.date = _data["date"] ? new Date(_data["date"].toString()) : undefined;
28740
+ this.uptime = _data["uptime"];
28741
+ this.utilizationGoal = _data["utilizationGoal"];
28742
+ }
28743
+ }
28744
+ static fromJS(data) {
28745
+ data = typeof data === 'object' ? data : {};
28746
+ let result = new ResourceDayKpiDto();
28747
+ result.init(data);
28748
+ return result;
28749
+ }
28750
+ toJSON(data) {
28751
+ data = typeof data === 'object' ? data : {};
28752
+ data["date"] = this.date ? this.date.toISOString() : undefined;
28753
+ data["uptime"] = this.uptime;
28754
+ data["utilizationGoal"] = this.utilizationGoal;
28755
+ return data;
28756
+ }
28757
+ }
28758
+ export class ResourceDailyUptimeDto {
28759
+ constructor(data) {
28760
+ if (data) {
28761
+ for (var property in data) {
28762
+ if (data.hasOwnProperty(property))
28763
+ this[property] = data[property];
28764
+ }
28765
+ }
28766
+ }
28767
+ init(_data) {
28768
+ if (_data) {
28769
+ this.date = _data["date"] ? new Date(_data["date"].toString()) : undefined;
28770
+ if (Array.isArray(_data["historicUptimeDataPoints"])) {
28771
+ this.historicUptimeDataPoints = [];
28772
+ for (let item of _data["historicUptimeDataPoints"])
28773
+ this.historicUptimeDataPoints.push(ResourceDailyUptimePointDto.fromJS(item));
28774
+ }
28775
+ if (Array.isArray(_data["todayUptimeDataPoints"])) {
28776
+ this.todayUptimeDataPoints = [];
28777
+ for (let item of _data["todayUptimeDataPoints"])
28778
+ this.todayUptimeDataPoints.push(ResourceDailyUptimePointDto.fromJS(item));
28779
+ }
28780
+ }
28781
+ }
28782
+ static fromJS(data) {
28783
+ data = typeof data === 'object' ? data : {};
28784
+ let result = new ResourceDailyUptimeDto();
28785
+ result.init(data);
28786
+ return result;
28787
+ }
28788
+ toJSON(data) {
28789
+ data = typeof data === 'object' ? data : {};
28790
+ data["date"] = this.date ? this.date.toISOString() : undefined;
28791
+ if (Array.isArray(this.historicUptimeDataPoints)) {
28792
+ data["historicUptimeDataPoints"] = [];
28793
+ for (let item of this.historicUptimeDataPoints)
28794
+ data["historicUptimeDataPoints"].push(item ? item.toJSON() : undefined);
28795
+ }
28796
+ if (Array.isArray(this.todayUptimeDataPoints)) {
28797
+ data["todayUptimeDataPoints"] = [];
28798
+ for (let item of this.todayUptimeDataPoints)
28799
+ data["todayUptimeDataPoints"].push(item ? item.toJSON() : undefined);
28800
+ }
28801
+ return data;
28802
+ }
28803
+ }
28804
+ export class ResourceDailyUptimePointDto {
28805
+ constructor(data) {
28806
+ if (data) {
28807
+ for (var property in data) {
28808
+ if (data.hasOwnProperty(property))
28809
+ this[property] = data[property];
28810
+ }
28811
+ }
28812
+ }
28813
+ init(_data) {
28814
+ if (_data) {
28815
+ this.date = _data["date"] ? new Date(_data["date"].toString()) : undefined;
28816
+ this.uptime = _data["uptime"];
28817
+ }
28818
+ }
28819
+ static fromJS(data) {
28820
+ data = typeof data === 'object' ? data : {};
28821
+ let result = new ResourceDailyUptimePointDto();
28822
+ result.init(data);
28823
+ return result;
28824
+ }
28825
+ toJSON(data) {
28826
+ data = typeof data === 'object' ? data : {};
28827
+ data["date"] = this.date ? this.date.toISOString() : undefined;
28828
+ data["uptime"] = this.uptime;
28829
+ return data;
28830
+ }
28831
+ }
28832
+ export class UptimeTrendDataPointDto {
28833
+ constructor(data) {
28834
+ if (data) {
28835
+ for (var property in data) {
28836
+ if (data.hasOwnProperty(property))
28837
+ this[property] = data[property];
28838
+ }
28839
+ }
28840
+ }
28841
+ init(_data) {
28842
+ if (_data) {
28843
+ this.timestamp = _data["timestamp"] ? new Date(_data["timestamp"].toString()) : undefined;
28844
+ this.uptime = _data["uptime"];
28845
+ }
28846
+ }
28847
+ static fromJS(data) {
28848
+ data = typeof data === 'object' ? data : {};
28849
+ let result = new UptimeTrendDataPointDto();
28850
+ result.init(data);
28851
+ return result;
28852
+ }
28853
+ toJSON(data) {
28854
+ data = typeof data === 'object' ? data : {};
28855
+ data["timestamp"] = this.timestamp ? this.timestamp.toISOString() : undefined;
28856
+ data["uptime"] = this.uptime;
28857
+ return data;
28858
+ }
28859
+ }
27579
28860
  export class ApplicationResourcesResourceDto {
27580
28861
  constructor(data) {
27581
28862
  if (data) {
@@ -27803,7 +29084,7 @@ export class UpdateResourceGroup {
27803
29084
  return data;
27804
29085
  }
27805
29086
  }
27806
- export class ResourceStateListDto {
29087
+ export class MachineStateListDto {
27807
29088
  constructor(data) {
27808
29089
  if (data) {
27809
29090
  for (var property in data) {
@@ -27814,30 +29095,30 @@ export class ResourceStateListDto {
27814
29095
  }
27815
29096
  init(_data) {
27816
29097
  if (_data) {
27817
- if (Array.isArray(_data["resources"])) {
27818
- this.resources = [];
27819
- for (let item of _data["resources"])
27820
- this.resources.push(ResourceStateDto.fromJS(item));
29098
+ if (Array.isArray(_data["machines"])) {
29099
+ this.machines = [];
29100
+ for (let item of _data["machines"])
29101
+ this.machines.push(MachineStateDto.fromJS(item));
27821
29102
  }
27822
29103
  }
27823
29104
  }
27824
29105
  static fromJS(data) {
27825
29106
  data = typeof data === 'object' ? data : {};
27826
- let result = new ResourceStateListDto();
29107
+ let result = new MachineStateListDto();
27827
29108
  result.init(data);
27828
29109
  return result;
27829
29110
  }
27830
29111
  toJSON(data) {
27831
29112
  data = typeof data === 'object' ? data : {};
27832
- if (Array.isArray(this.resources)) {
27833
- data["resources"] = [];
27834
- for (let item of this.resources)
27835
- data["resources"].push(item ? item.toJSON() : undefined);
29113
+ if (Array.isArray(this.machines)) {
29114
+ data["machines"] = [];
29115
+ for (let item of this.machines)
29116
+ data["machines"].push(item ? item.toJSON() : undefined);
27836
29117
  }
27837
29118
  return data;
27838
29119
  }
27839
29120
  }
27840
- export class ResourceStateDto {
29121
+ export class MachineStateDto {
27841
29122
  constructor(data) {
27842
29123
  if (data) {
27843
29124
  for (var property in data) {
@@ -27852,13 +29133,13 @@ export class ResourceStateDto {
27852
29133
  this.name = _data["name"];
27853
29134
  this.description = _data["description"];
27854
29135
  this.state = _data["state"];
27855
- this.resourceState = _data["resourceState"];
29136
+ this.machineState = _data["machineState"];
27856
29137
  this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
27857
29138
  }
27858
29139
  }
27859
29140
  static fromJS(data) {
27860
29141
  data = typeof data === 'object' ? data : {};
27861
- let result = new ResourceStateDto();
29142
+ let result = new MachineStateDto();
27862
29143
  result.init(data);
27863
29144
  return result;
27864
29145
  }
@@ -27868,57 +29149,12 @@ export class ResourceStateDto {
27868
29149
  data["name"] = this.name;
27869
29150
  data["description"] = this.description;
27870
29151
  data["state"] = this.state;
27871
- data["resourceState"] = this.resourceState;
29152
+ data["machineState"] = this.machineState;
27872
29153
  data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined;
27873
29154
  return data;
27874
29155
  }
27875
29156
  }
27876
- export class ResourceStateDatapoint {
27877
- constructor(data) {
27878
- if (data) {
27879
- for (var property in data) {
27880
- if (data.hasOwnProperty(property))
27881
- this[property] = data[property];
27882
- }
27883
- }
27884
- if (!data) {
27885
- this.downtimePeriodReasons = [];
27886
- }
27887
- }
27888
- init(_data) {
27889
- if (_data) {
27890
- this.resourceStateText = _data["resourceStateText"];
27891
- this.resourceState = _data["resourceState"];
27892
- this.timestamp = _data["timestamp"];
27893
- this.isDowntime = _data["isDowntime"];
27894
- if (Array.isArray(_data["downtimePeriodReasons"])) {
27895
- this.downtimePeriodReasons = [];
27896
- for (let item of _data["downtimePeriodReasons"])
27897
- this.downtimePeriodReasons.push(DowntimePeriodReasonDto.fromJS(item));
27898
- }
27899
- }
27900
- }
27901
- static fromJS(data) {
27902
- data = typeof data === 'object' ? data : {};
27903
- let result = new ResourceStateDatapoint();
27904
- result.init(data);
27905
- return result;
27906
- }
27907
- toJSON(data) {
27908
- data = typeof data === 'object' ? data : {};
27909
- data["resourceStateText"] = this.resourceStateText;
27910
- data["resourceState"] = this.resourceState;
27911
- data["timestamp"] = this.timestamp;
27912
- data["isDowntime"] = this.isDowntime;
27913
- if (Array.isArray(this.downtimePeriodReasons)) {
27914
- data["downtimePeriodReasons"] = [];
27915
- for (let item of this.downtimePeriodReasons)
27916
- data["downtimePeriodReasons"].push(item ? item.toJSON() : undefined);
27917
- }
27918
- return data;
27919
- }
27920
- }
27921
- export class DowntimeResourceStateDto {
29157
+ export class DowntimeMachineStateDto {
27922
29158
  constructor(data) {
27923
29159
  if (data) {
27924
29160
  for (var property in data) {
@@ -27927,19 +29163,19 @@ export class DowntimeResourceStateDto {
27927
29163
  }
27928
29164
  }
27929
29165
  if (!data) {
27930
- this.datapoint = new ResourceStateDatapoint();
29166
+ this.datapoint = new MachineStateDatapoint();
27931
29167
  }
27932
29168
  }
27933
29169
  init(_data) {
27934
29170
  if (_data) {
27935
- this.datapoint = _data["datapoint"] ? ResourceStateDatapoint.fromJS(_data["datapoint"]) : new ResourceStateDatapoint();
29171
+ this.datapoint = _data["datapoint"] ? MachineStateDatapoint.fromJS(_data["datapoint"]) : new MachineStateDatapoint();
27936
29172
  this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
27937
29173
  this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : undefined;
27938
29174
  }
27939
29175
  }
27940
29176
  static fromJS(data) {
27941
29177
  data = typeof data === 'object' ? data : {};
27942
- let result = new DowntimeResourceStateDto();
29178
+ let result = new DowntimeMachineStateDto();
27943
29179
  result.init(data);
27944
29180
  return result;
27945
29181
  }
@@ -27951,73 +29187,6 @@ export class DowntimeResourceStateDto {
27951
29187
  return data;
27952
29188
  }
27953
29189
  }
27954
- export class ResourceStatesSummaryDto {
27955
- constructor(data) {
27956
- if (data) {
27957
- for (var property in data) {
27958
- if (data.hasOwnProperty(property))
27959
- this[property] = data[property];
27960
- }
27961
- }
27962
- if (!data) {
27963
- this.states = [];
27964
- }
27965
- }
27966
- init(_data) {
27967
- if (_data) {
27968
- if (Array.isArray(_data["states"])) {
27969
- this.states = [];
27970
- for (let item of _data["states"])
27971
- this.states.push(ApplicationResourceStatesStateDto.fromJS(item));
27972
- }
27973
- }
27974
- }
27975
- static fromJS(data) {
27976
- data = typeof data === 'object' ? data : {};
27977
- let result = new ResourceStatesSummaryDto();
27978
- result.init(data);
27979
- return result;
27980
- }
27981
- toJSON(data) {
27982
- data = typeof data === 'object' ? data : {};
27983
- if (Array.isArray(this.states)) {
27984
- data["states"] = [];
27985
- for (let item of this.states)
27986
- data["states"].push(item ? item.toJSON() : undefined);
27987
- }
27988
- return data;
27989
- }
27990
- }
27991
- export class ApplicationResourceStatesStateDto {
27992
- constructor(data) {
27993
- if (data) {
27994
- for (var property in data) {
27995
- if (data.hasOwnProperty(property))
27996
- this[property] = data[property];
27997
- }
27998
- }
27999
- }
28000
- init(_data) {
28001
- if (_data) {
28002
- this.state = _data["state"];
28003
- this.resourceState = _data["resourceState"];
28004
- this.seconds = _data["seconds"];
28005
- }
28006
- }
28007
- static fromJS(data) {
28008
- data = typeof data === 'object' ? data : {};
28009
- let result = new ApplicationResourceStatesStateDto();
28010
- result.init(data);
28011
- return result;
28012
- }
28013
- toJSON(data) {
28014
- data = typeof data === 'object' ? data : {};
28015
- data["state"] = this.state;
28016
- data["resourceState"] = this.resourceState;
28017
- data["seconds"] = this.seconds;
28018
- return data;
28019
- }
28020
- }
28021
29190
  export class ResourceErpDataListDto {
28022
29191
  constructor(data) {
28023
29192
  if (data) {
@@ -29478,6 +30647,297 @@ export class NamedCompanyUtilizationDatapointListDto extends CompanyUtilizationD
29478
30647
  return data;
29479
30648
  }
29480
30649
  }
30650
+ export class CompanyResourceUtilizationDto {
30651
+ constructor(data) {
30652
+ if (data) {
30653
+ for (var property in data) {
30654
+ if (data.hasOwnProperty(property))
30655
+ this[property] = data[property];
30656
+ }
30657
+ }
30658
+ if (!data) {
30659
+ this.companyUtilization = new UtilizationDetailsV2Dto();
30660
+ this.groups = [];
30661
+ this.ungroupedResources = [];
30662
+ }
30663
+ }
30664
+ init(_data) {
30665
+ if (_data) {
30666
+ this.utilizationType = _data["utilizationType"];
30667
+ this.companyUtilization = _data["companyUtilization"] ? UtilizationDetailsV2Dto.fromJS(_data["companyUtilization"]) : new UtilizationDetailsV2Dto();
30668
+ if (Array.isArray(_data["groups"])) {
30669
+ this.groups = [];
30670
+ for (let item of _data["groups"])
30671
+ this.groups.push(ResourceGroupUtilizationV2Dto.fromJS(item));
30672
+ }
30673
+ if (Array.isArray(_data["ungroupedResources"])) {
30674
+ this.ungroupedResources = [];
30675
+ for (let item of _data["ungroupedResources"])
30676
+ this.ungroupedResources.push(ResourceUtilizationV3Dto.fromJS(item));
30677
+ }
30678
+ }
30679
+ }
30680
+ static fromJS(data) {
30681
+ data = typeof data === 'object' ? data : {};
30682
+ let result = new CompanyResourceUtilizationDto();
30683
+ result.init(data);
30684
+ return result;
30685
+ }
30686
+ toJSON(data) {
30687
+ data = typeof data === 'object' ? data : {};
30688
+ data["utilizationType"] = this.utilizationType;
30689
+ data["companyUtilization"] = this.companyUtilization ? this.companyUtilization.toJSON() : undefined;
30690
+ if (Array.isArray(this.groups)) {
30691
+ data["groups"] = [];
30692
+ for (let item of this.groups)
30693
+ data["groups"].push(item ? item.toJSON() : undefined);
30694
+ }
30695
+ if (Array.isArray(this.ungroupedResources)) {
30696
+ data["ungroupedResources"] = [];
30697
+ for (let item of this.ungroupedResources)
30698
+ data["ungroupedResources"].push(item ? item.toJSON() : undefined);
30699
+ }
30700
+ return data;
30701
+ }
30702
+ }
30703
+ export class ResourceGroupUtilizationV2Dto {
30704
+ constructor(data) {
30705
+ if (data) {
30706
+ for (var property in data) {
30707
+ if (data.hasOwnProperty(property))
30708
+ this[property] = data[property];
30709
+ }
30710
+ }
30711
+ if (!data) {
30712
+ this.utilization = new UtilizationDetailsV2Dto();
30713
+ this.resources = [];
30714
+ }
30715
+ }
30716
+ init(_data) {
30717
+ if (_data) {
30718
+ this.name = _data["name"];
30719
+ this.utilization = _data["utilization"] ? UtilizationDetailsV2Dto.fromJS(_data["utilization"]) : new UtilizationDetailsV2Dto();
30720
+ if (Array.isArray(_data["resources"])) {
30721
+ this.resources = [];
30722
+ for (let item of _data["resources"])
30723
+ this.resources.push(ResourceUtilizationV3Dto.fromJS(item));
30724
+ }
30725
+ }
30726
+ }
30727
+ static fromJS(data) {
30728
+ data = typeof data === 'object' ? data : {};
30729
+ let result = new ResourceGroupUtilizationV2Dto();
30730
+ result.init(data);
30731
+ return result;
30732
+ }
30733
+ toJSON(data) {
30734
+ data = typeof data === 'object' ? data : {};
30735
+ data["name"] = this.name;
30736
+ data["utilization"] = this.utilization ? this.utilization.toJSON() : undefined;
30737
+ if (Array.isArray(this.resources)) {
30738
+ data["resources"] = [];
30739
+ for (let item of this.resources)
30740
+ data["resources"].push(item ? item.toJSON() : undefined);
30741
+ }
30742
+ return data;
30743
+ }
30744
+ }
30745
+ export class ResourceUtilizationV3Dto {
30746
+ constructor(data) {
30747
+ if (data) {
30748
+ for (var property in data) {
30749
+ if (data.hasOwnProperty(property))
30750
+ this[property] = data[property];
30751
+ }
30752
+ }
30753
+ if (!data) {
30754
+ this.utilization = new UtilizationDetailsV2Dto();
30755
+ }
30756
+ }
30757
+ init(_data) {
30758
+ if (_data) {
30759
+ this.id = _data["id"];
30760
+ this.name = _data["name"];
30761
+ this.description = _data["description"];
30762
+ this.utilization = _data["utilization"] ? UtilizationDetailsV2Dto.fromJS(_data["utilization"]) : new UtilizationDetailsV2Dto();
30763
+ }
30764
+ }
30765
+ static fromJS(data) {
30766
+ data = typeof data === 'object' ? data : {};
30767
+ let result = new ResourceUtilizationV3Dto();
30768
+ result.init(data);
30769
+ return result;
30770
+ }
30771
+ toJSON(data) {
30772
+ data = typeof data === 'object' ? data : {};
30773
+ data["id"] = this.id;
30774
+ data["name"] = this.name;
30775
+ data["description"] = this.description;
30776
+ data["utilization"] = this.utilization ? this.utilization.toJSON() : undefined;
30777
+ return data;
30778
+ }
30779
+ }
30780
+ export class ResourceUtilizationDatapointListDto extends UtilizationDatapointListDto {
30781
+ constructor(data) {
30782
+ super(data);
30783
+ }
30784
+ init(_data) {
30785
+ super.init(_data);
30786
+ if (_data) {
30787
+ this.externalId = _data["externalId"];
30788
+ this.id = _data["id"];
30789
+ this.name = _data["name"];
30790
+ this.description = _data["description"];
30791
+ }
30792
+ }
30793
+ static fromJS(data) {
30794
+ data = typeof data === 'object' ? data : {};
30795
+ let result = new ResourceUtilizationDatapointListDto();
30796
+ result.init(data);
30797
+ return result;
30798
+ }
30799
+ toJSON(data) {
30800
+ data = typeof data === 'object' ? data : {};
30801
+ data["externalId"] = this.externalId;
30802
+ data["id"] = this.id;
30803
+ data["name"] = this.name;
30804
+ data["description"] = this.description;
30805
+ super.toJSON(data);
30806
+ return data;
30807
+ }
30808
+ }
30809
+ export class CompanyResourceUtilizationDatapointListDto extends UtilizationDatapointListDto {
30810
+ constructor(data) {
30811
+ super(data);
30812
+ }
30813
+ init(_data) {
30814
+ super.init(_data);
30815
+ if (_data) {
30816
+ if (Array.isArray(_data["groups"])) {
30817
+ this.groups = [];
30818
+ for (let item of _data["groups"])
30819
+ this.groups.push(ResourceGroupUtilizationDatapointListDto.fromJS(item));
30820
+ }
30821
+ if (Array.isArray(_data["ungroupedResources"])) {
30822
+ this.ungroupedResources = [];
30823
+ for (let item of _data["ungroupedResources"])
30824
+ this.ungroupedResources.push(ResourceUtilizationDatapointListDto.fromJS(item));
30825
+ }
30826
+ }
30827
+ }
30828
+ static fromJS(data) {
30829
+ data = typeof data === 'object' ? data : {};
30830
+ let result = new CompanyResourceUtilizationDatapointListDto();
30831
+ result.init(data);
30832
+ return result;
30833
+ }
30834
+ toJSON(data) {
30835
+ data = typeof data === 'object' ? data : {};
30836
+ if (Array.isArray(this.groups)) {
30837
+ data["groups"] = [];
30838
+ for (let item of this.groups)
30839
+ data["groups"].push(item ? item.toJSON() : undefined);
30840
+ }
30841
+ if (Array.isArray(this.ungroupedResources)) {
30842
+ data["ungroupedResources"] = [];
30843
+ for (let item of this.ungroupedResources)
30844
+ data["ungroupedResources"].push(item ? item.toJSON() : undefined);
30845
+ }
30846
+ super.toJSON(data);
30847
+ return data;
30848
+ }
30849
+ }
30850
+ export class ResourceGroupUtilizationDatapointListDto extends UtilizationDatapointListDto {
30851
+ constructor(data) {
30852
+ super(data);
30853
+ }
30854
+ init(_data) {
30855
+ super.init(_data);
30856
+ if (_data) {
30857
+ this.groupId = _data["groupId"];
30858
+ this.groupName = _data["groupName"];
30859
+ if (Array.isArray(_data["resources"])) {
30860
+ this.resources = [];
30861
+ for (let item of _data["resources"])
30862
+ this.resources.push(ResourceUtilizationDatapointListDto.fromJS(item));
30863
+ }
30864
+ }
30865
+ }
30866
+ static fromJS(data) {
30867
+ data = typeof data === 'object' ? data : {};
30868
+ let result = new ResourceGroupUtilizationDatapointListDto();
30869
+ result.init(data);
30870
+ return result;
30871
+ }
30872
+ toJSON(data) {
30873
+ data = typeof data === 'object' ? data : {};
30874
+ data["groupId"] = this.groupId;
30875
+ data["groupName"] = this.groupName;
30876
+ if (Array.isArray(this.resources)) {
30877
+ data["resources"] = [];
30878
+ for (let item of this.resources)
30879
+ data["resources"].push(item ? item.toJSON() : undefined);
30880
+ }
30881
+ super.toJSON(data);
30882
+ return data;
30883
+ }
30884
+ }
30885
+ export class CrossCompanyResourceUtilizationDatapointListDto extends UtilizationDatapointListDto {
30886
+ constructor(data) {
30887
+ super(data);
30888
+ }
30889
+ init(_data) {
30890
+ super.init(_data);
30891
+ if (_data) {
30892
+ if (Array.isArray(_data["companies"])) {
30893
+ this.companies = [];
30894
+ for (let item of _data["companies"])
30895
+ this.companies.push(NamedCompanyResourceUtilizationDatapointListDto.fromJS(item));
30896
+ }
30897
+ }
30898
+ }
30899
+ static fromJS(data) {
30900
+ data = typeof data === 'object' ? data : {};
30901
+ let result = new CrossCompanyResourceUtilizationDatapointListDto();
30902
+ result.init(data);
30903
+ return result;
30904
+ }
30905
+ toJSON(data) {
30906
+ data = typeof data === 'object' ? data : {};
30907
+ if (Array.isArray(this.companies)) {
30908
+ data["companies"] = [];
30909
+ for (let item of this.companies)
30910
+ data["companies"].push(item ? item.toJSON() : undefined);
30911
+ }
30912
+ super.toJSON(data);
30913
+ return data;
30914
+ }
30915
+ }
30916
+ export class NamedCompanyResourceUtilizationDatapointListDto extends CompanyResourceUtilizationDatapointListDto {
30917
+ constructor(data) {
30918
+ super(data);
30919
+ }
30920
+ init(_data) {
30921
+ super.init(_data);
30922
+ if (_data) {
30923
+ this.companyId = _data["companyId"];
30924
+ this.companyName = _data["companyName"];
30925
+ }
30926
+ }
30927
+ static fromJS(data) {
30928
+ data = typeof data === 'object' ? data : {};
30929
+ let result = new NamedCompanyResourceUtilizationDatapointListDto();
30930
+ result.init(data);
30931
+ return result;
30932
+ }
30933
+ toJSON(data) {
30934
+ data = typeof data === 'object' ? data : {};
30935
+ data["companyId"] = this.companyId;
30936
+ data["companyName"] = this.companyName;
30937
+ super.toJSON(data);
30938
+ return data;
30939
+ }
30940
+ }
29481
30941
  export class MrbInstanceDto {
29482
30942
  constructor(data) {
29483
30943
  if (data) {
@@ -33315,6 +34775,44 @@ export class DowntimeReasonCountDto {
33315
34775
  return data;
33316
34776
  }
33317
34777
  }
34778
+ export class ListTopDowntimeReasonsForResourcesRequest {
34779
+ constructor(data) {
34780
+ if (data) {
34781
+ for (var property in data) {
34782
+ if (data.hasOwnProperty(property))
34783
+ this[property] = data[property];
34784
+ }
34785
+ }
34786
+ }
34787
+ init(_data) {
34788
+ if (_data) {
34789
+ this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
34790
+ this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : undefined;
34791
+ if (Array.isArray(_data["resourceExternalIds"])) {
34792
+ this.resourceExternalIds = [];
34793
+ for (let item of _data["resourceExternalIds"])
34794
+ this.resourceExternalIds.push(item);
34795
+ }
34796
+ }
34797
+ }
34798
+ static fromJS(data) {
34799
+ data = typeof data === 'object' ? data : {};
34800
+ let result = new ListTopDowntimeReasonsForResourcesRequest();
34801
+ result.init(data);
34802
+ return result;
34803
+ }
34804
+ toJSON(data) {
34805
+ data = typeof data === 'object' ? data : {};
34806
+ data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined;
34807
+ data["endTime"] = this.endTime ? this.endTime.toISOString() : undefined;
34808
+ if (Array.isArray(this.resourceExternalIds)) {
34809
+ data["resourceExternalIds"] = [];
34810
+ for (let item of this.resourceExternalIds)
34811
+ data["resourceExternalIds"].push(item);
34812
+ }
34813
+ return data;
34814
+ }
34815
+ }
33318
34816
  export class DowntimeReasonsReportDto {
33319
34817
  constructor(data) {
33320
34818
  if (data) {
@@ -33675,178 +35173,6 @@ export class UpdateMachinesCapacity {
33675
35173
  return data;
33676
35174
  }
33677
35175
  }
33678
- export class CalendarDayDto {
33679
- constructor(data) {
33680
- if (data) {
33681
- for (var property in data) {
33682
- if (data.hasOwnProperty(property))
33683
- this[property] = data[property];
33684
- }
33685
- }
33686
- }
33687
- init(_data) {
33688
- if (_data) {
33689
- this.date = _data["date"] ? new Date(_data["date"].toString()) : undefined;
33690
- this.dayCapacity = _data["dayCapacity"];
33691
- this.capacityHours = _data["capacityHours"];
33692
- this.companyId = _data["companyId"];
33693
- }
33694
- }
33695
- static fromJS(data) {
33696
- data = typeof data === 'object' ? data : {};
33697
- let result = new CalendarDayDto();
33698
- result.init(data);
33699
- return result;
33700
- }
33701
- toJSON(data) {
33702
- data = typeof data === 'object' ? data : {};
33703
- data["date"] = this.date ? this.date.toISOString() : undefined;
33704
- data["dayCapacity"] = this.dayCapacity;
33705
- data["capacityHours"] = this.capacityHours;
33706
- data["companyId"] = this.companyId;
33707
- return data;
33708
- }
33709
- }
33710
- export class CalendarCapacityDto {
33711
- constructor(data) {
33712
- if (data) {
33713
- for (var property in data) {
33714
- if (data.hasOwnProperty(property))
33715
- this[property] = data[property];
33716
- }
33717
- }
33718
- }
33719
- init(_data) {
33720
- if (_data) {
33721
- this.date = _data["date"] ? new Date(_data["date"].toString()) : undefined;
33722
- this.dayCapacity = _data["dayCapacity"];
33723
- }
33724
- }
33725
- static fromJS(data) {
33726
- data = typeof data === 'object' ? data : {};
33727
- let result = new CalendarCapacityDto();
33728
- result.init(data);
33729
- return result;
33730
- }
33731
- toJSON(data) {
33732
- data = typeof data === 'object' ? data : {};
33733
- data["date"] = this.date ? this.date.toISOString() : undefined;
33734
- data["dayCapacity"] = this.dayCapacity;
33735
- return data;
33736
- }
33737
- }
33738
- export class UpdateCalendarCapacity {
33739
- constructor(data) {
33740
- if (data) {
33741
- for (var property in data) {
33742
- if (data.hasOwnProperty(property))
33743
- this[property] = data[property];
33744
- }
33745
- }
33746
- }
33747
- init(_data) {
33748
- if (_data) {
33749
- this.date = _data["date"] ? new Date(_data["date"].toString()) : undefined;
33750
- this.dayCapacity = _data["dayCapacity"];
33751
- }
33752
- }
33753
- static fromJS(data) {
33754
- data = typeof data === 'object' ? data : {};
33755
- let result = new UpdateCalendarCapacity();
33756
- result.init(data);
33757
- return result;
33758
- }
33759
- toJSON(data) {
33760
- data = typeof data === 'object' ? data : {};
33761
- data["date"] = this.date ? this.date.toISOString() : undefined;
33762
- data["dayCapacity"] = this.dayCapacity;
33763
- return data;
33764
- }
33765
- }
33766
- export class CalendarSettingsDto {
33767
- constructor(data) {
33768
- if (data) {
33769
- for (var property in data) {
33770
- if (data.hasOwnProperty(property))
33771
- this[property] = data[property];
33772
- }
33773
- }
33774
- }
33775
- init(_data) {
33776
- if (_data) {
33777
- if (_data["defaultHoursPerWeekday"]) {
33778
- this.defaultHoursPerWeekday = {};
33779
- for (let key in _data["defaultHoursPerWeekday"]) {
33780
- if (_data["defaultHoursPerWeekday"].hasOwnProperty(key))
33781
- this.defaultHoursPerWeekday[key] = _data["defaultHoursPerWeekday"][key];
33782
- }
33783
- }
33784
- this.halfDayHours = _data["halfDayHours"];
33785
- this.holidayHours = _data["holidayHours"];
33786
- }
33787
- }
33788
- static fromJS(data) {
33789
- data = typeof data === 'object' ? data : {};
33790
- let result = new CalendarSettingsDto();
33791
- result.init(data);
33792
- return result;
33793
- }
33794
- toJSON(data) {
33795
- data = typeof data === 'object' ? data : {};
33796
- if (this.defaultHoursPerWeekday) {
33797
- data["defaultHoursPerWeekday"] = {};
33798
- for (let key in this.defaultHoursPerWeekday) {
33799
- if (this.defaultHoursPerWeekday.hasOwnProperty(key))
33800
- data["defaultHoursPerWeekday"][key] = this.defaultHoursPerWeekday[key];
33801
- }
33802
- }
33803
- data["halfDayHours"] = this.halfDayHours;
33804
- data["holidayHours"] = this.holidayHours;
33805
- return data;
33806
- }
33807
- }
33808
- export class UpdateCalendarSettingsCommand {
33809
- constructor(data) {
33810
- if (data) {
33811
- for (var property in data) {
33812
- if (data.hasOwnProperty(property))
33813
- this[property] = data[property];
33814
- }
33815
- }
33816
- }
33817
- init(_data) {
33818
- if (_data) {
33819
- if (_data["defaultHoursPerWeekday"]) {
33820
- this.defaultHoursPerWeekday = {};
33821
- for (let key in _data["defaultHoursPerWeekday"]) {
33822
- if (_data["defaultHoursPerWeekday"].hasOwnProperty(key))
33823
- this.defaultHoursPerWeekday[key] = _data["defaultHoursPerWeekday"][key];
33824
- }
33825
- }
33826
- this.halfDayHours = _data["halfDayHours"];
33827
- this.holidayHours = _data["holidayHours"];
33828
- }
33829
- }
33830
- static fromJS(data) {
33831
- data = typeof data === 'object' ? data : {};
33832
- let result = new UpdateCalendarSettingsCommand();
33833
- result.init(data);
33834
- return result;
33835
- }
33836
- toJSON(data) {
33837
- data = typeof data === 'object' ? data : {};
33838
- if (this.defaultHoursPerWeekday) {
33839
- data["defaultHoursPerWeekday"] = {};
33840
- for (let key in this.defaultHoursPerWeekday) {
33841
- if (this.defaultHoursPerWeekday.hasOwnProperty(key))
33842
- data["defaultHoursPerWeekday"][key] = this.defaultHoursPerWeekday[key];
33843
- }
33844
- }
33845
- data["halfDayHours"] = this.halfDayHours;
33846
- data["holidayHours"] = this.holidayHours;
33847
- return data;
33848
- }
33849
- }
33850
35176
  export class MachineKpiDto {
33851
35177
  constructor(data) {
33852
35178
  if (data) {
@@ -33996,34 +35322,6 @@ export class MachineDailyUptimePointDto {
33996
35322
  return data;
33997
35323
  }
33998
35324
  }
33999
- export class UptimeTrendDataPointDto {
34000
- constructor(data) {
34001
- if (data) {
34002
- for (var property in data) {
34003
- if (data.hasOwnProperty(property))
34004
- this[property] = data[property];
34005
- }
34006
- }
34007
- }
34008
- init(_data) {
34009
- if (_data) {
34010
- this.timestamp = _data["timestamp"] ? new Date(_data["timestamp"].toString()) : undefined;
34011
- this.uptime = _data["uptime"];
34012
- }
34013
- }
34014
- static fromJS(data) {
34015
- data = typeof data === 'object' ? data : {};
34016
- let result = new UptimeTrendDataPointDto();
34017
- result.init(data);
34018
- return result;
34019
- }
34020
- toJSON(data) {
34021
- data = typeof data === 'object' ? data : {};
34022
- data["timestamp"] = this.timestamp ? this.timestamp.toISOString() : undefined;
34023
- data["uptime"] = this.uptime;
34024
- return data;
34025
- }
34026
- }
34027
35325
  export class MachineGroupDto {
34028
35326
  constructor(data) {
34029
35327
  if (data) {
@@ -34201,109 +35499,6 @@ export class UpdateMachineGroup {
34201
35499
  return data;
34202
35500
  }
34203
35501
  }
34204
- export class MachineStateListDto {
34205
- constructor(data) {
34206
- if (data) {
34207
- for (var property in data) {
34208
- if (data.hasOwnProperty(property))
34209
- this[property] = data[property];
34210
- }
34211
- }
34212
- }
34213
- init(_data) {
34214
- if (_data) {
34215
- if (Array.isArray(_data["machines"])) {
34216
- this.machines = [];
34217
- for (let item of _data["machines"])
34218
- this.machines.push(MachineStateDto.fromJS(item));
34219
- }
34220
- }
34221
- }
34222
- static fromJS(data) {
34223
- data = typeof data === 'object' ? data : {};
34224
- let result = new MachineStateListDto();
34225
- result.init(data);
34226
- return result;
34227
- }
34228
- toJSON(data) {
34229
- data = typeof data === 'object' ? data : {};
34230
- if (Array.isArray(this.machines)) {
34231
- data["machines"] = [];
34232
- for (let item of this.machines)
34233
- data["machines"].push(item ? item.toJSON() : undefined);
34234
- }
34235
- return data;
34236
- }
34237
- }
34238
- export class MachineStateDto {
34239
- constructor(data) {
34240
- if (data) {
34241
- for (var property in data) {
34242
- if (data.hasOwnProperty(property))
34243
- this[property] = data[property];
34244
- }
34245
- }
34246
- }
34247
- init(_data) {
34248
- if (_data) {
34249
- this.assetId = _data["assetId"];
34250
- this.name = _data["name"];
34251
- this.description = _data["description"];
34252
- this.state = _data["state"];
34253
- this.machineState = _data["machineState"];
34254
- this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
34255
- }
34256
- }
34257
- static fromJS(data) {
34258
- data = typeof data === 'object' ? data : {};
34259
- let result = new MachineStateDto();
34260
- result.init(data);
34261
- return result;
34262
- }
34263
- toJSON(data) {
34264
- data = typeof data === 'object' ? data : {};
34265
- data["assetId"] = this.assetId;
34266
- data["name"] = this.name;
34267
- data["description"] = this.description;
34268
- data["state"] = this.state;
34269
- data["machineState"] = this.machineState;
34270
- data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined;
34271
- return data;
34272
- }
34273
- }
34274
- export class DowntimeMachineStateDto {
34275
- constructor(data) {
34276
- if (data) {
34277
- for (var property in data) {
34278
- if (data.hasOwnProperty(property))
34279
- this[property] = data[property];
34280
- }
34281
- }
34282
- if (!data) {
34283
- this.datapoint = new MachineStateDatapoint();
34284
- }
34285
- }
34286
- init(_data) {
34287
- if (_data) {
34288
- this.datapoint = _data["datapoint"] ? MachineStateDatapoint.fromJS(_data["datapoint"]) : new MachineStateDatapoint();
34289
- this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
34290
- this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : undefined;
34291
- }
34292
- }
34293
- static fromJS(data) {
34294
- data = typeof data === 'object' ? data : {};
34295
- let result = new DowntimeMachineStateDto();
34296
- result.init(data);
34297
- return result;
34298
- }
34299
- toJSON(data) {
34300
- data = typeof data === 'object' ? data : {};
34301
- data["datapoint"] = this.datapoint ? this.datapoint.toJSON() : undefined;
34302
- data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined;
34303
- data["endTime"] = this.endTime ? this.endTime.toISOString() : undefined;
34304
- return data;
34305
- }
34306
- }
34307
35502
  export class MachineErpDataListDto {
34308
35503
  constructor(data) {
34309
35504
  if (data) {
@@ -42249,6 +43444,7 @@ export class ProductionOrderDto {
42249
43444
  }
42250
43445
  this.startDate = _data["startDate"] ? new Date(_data["startDate"].toString()) : undefined;
42251
43446
  this.endDate = _data["endDate"] ? new Date(_data["endDate"].toString()) : undefined;
43447
+ this.deliveryDate = _data["deliveryDate"] ? new Date(_data["deliveryDate"].toString()) : undefined;
42252
43448
  this.bomPosition = _data["bomPosition"];
42253
43449
  this.drawing = _data["drawing"] ? DrawingDto.fromJS(_data["drawing"]) : undefined;
42254
43450
  this.orderReference = _data["orderReference"] ? OrderReferenceDto.fromJS(_data["orderReference"]) : undefined;
@@ -42288,6 +43484,7 @@ export class ProductionOrderDto {
42288
43484
  }
42289
43485
  data["startDate"] = this.startDate ? this.startDate.toISOString() : undefined;
42290
43486
  data["endDate"] = this.endDate ? this.endDate.toISOString() : undefined;
43487
+ data["deliveryDate"] = this.deliveryDate ? this.deliveryDate.toISOString() : undefined;
42291
43488
  data["bomPosition"] = this.bomPosition;
42292
43489
  data["drawing"] = this.drawing ? this.drawing.toJSON() : undefined;
42293
43490
  data["orderReference"] = this.orderReference ? this.orderReference.toJSON() : undefined;