@ignos/api-client 20260115.0.13741-alpha → 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.
- package/lib/ignosportal-api.d.ts +370 -139
- package/lib/ignosportal-api.js +1574 -599
- package/package.json +1 -1
- package/src/ignosportal-api.ts +4493 -3312
package/lib/ignosportal-api.js
CHANGED
|
@@ -2825,6 +2825,826 @@ export class MachineAlarmsClient extends AuthorizedApiBase {
|
|
|
2825
2825
|
return Promise.resolve(null);
|
|
2826
2826
|
}
|
|
2827
2827
|
}
|
|
2828
|
+
export class KpiAdminClient extends AuthorizedApiBase {
|
|
2829
|
+
constructor(configuration, baseUrl, http) {
|
|
2830
|
+
super(configuration);
|
|
2831
|
+
this.jsonParseReviver = undefined;
|
|
2832
|
+
this.http = http ? http : window;
|
|
2833
|
+
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
2834
|
+
}
|
|
2835
|
+
getResourceCapacityAdmin() {
|
|
2836
|
+
let url_ = this.baseUrl + "/resourcekpiadmin/capacity";
|
|
2837
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2838
|
+
let options_ = {
|
|
2839
|
+
method: "GET",
|
|
2840
|
+
headers: {
|
|
2841
|
+
"Accept": "application/json"
|
|
2842
|
+
}
|
|
2843
|
+
};
|
|
2844
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2845
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
2846
|
+
}).then((_response) => {
|
|
2847
|
+
return this.processGetResourceCapacityAdmin(_response);
|
|
2848
|
+
});
|
|
2849
|
+
}
|
|
2850
|
+
processGetResourceCapacityAdmin(response) {
|
|
2851
|
+
const status = response.status;
|
|
2852
|
+
let _headers = {};
|
|
2853
|
+
if (response.headers && response.headers.forEach) {
|
|
2854
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
2855
|
+
}
|
|
2856
|
+
;
|
|
2857
|
+
if (status === 200) {
|
|
2858
|
+
return response.text().then((_responseText) => {
|
|
2859
|
+
let result200 = null;
|
|
2860
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2861
|
+
if (Array.isArray(resultData200)) {
|
|
2862
|
+
result200 = [];
|
|
2863
|
+
for (let item of resultData200)
|
|
2864
|
+
result200.push(ResourceGroupCapacityDto.fromJS(item));
|
|
2865
|
+
}
|
|
2866
|
+
return result200;
|
|
2867
|
+
});
|
|
2868
|
+
}
|
|
2869
|
+
else if (status !== 200 && status !== 204) {
|
|
2870
|
+
return response.text().then((_responseText) => {
|
|
2871
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2872
|
+
});
|
|
2873
|
+
}
|
|
2874
|
+
return Promise.resolve(null);
|
|
2875
|
+
}
|
|
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() : "") + "&";
|
|
2926
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2927
|
+
let options_ = {
|
|
2928
|
+
method: "GET",
|
|
2929
|
+
headers: {
|
|
2930
|
+
"Accept": "application/json"
|
|
2931
|
+
}
|
|
2932
|
+
};
|
|
2933
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2934
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
2935
|
+
}).then((_response) => {
|
|
2936
|
+
return this.processGetCalendarCapacityAdmin(_response);
|
|
2937
|
+
});
|
|
2938
|
+
}
|
|
2939
|
+
processGetCalendarCapacityAdmin(response) {
|
|
2940
|
+
const status = response.status;
|
|
2941
|
+
let _headers = {};
|
|
2942
|
+
if (response.headers && response.headers.forEach) {
|
|
2943
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
2944
|
+
}
|
|
2945
|
+
;
|
|
2946
|
+
if (status === 200) {
|
|
2947
|
+
return response.text().then((_responseText) => {
|
|
2948
|
+
let result200 = null;
|
|
2949
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2950
|
+
if (Array.isArray(resultData200)) {
|
|
2951
|
+
result200 = [];
|
|
2952
|
+
for (let item of resultData200)
|
|
2953
|
+
result200.push(CalendarDayDto.fromJS(item));
|
|
2954
|
+
}
|
|
2955
|
+
return result200;
|
|
2956
|
+
});
|
|
2957
|
+
}
|
|
2958
|
+
else if (status !== 200 && status !== 204) {
|
|
2959
|
+
return response.text().then((_responseText) => {
|
|
2960
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2961
|
+
});
|
|
2962
|
+
}
|
|
2963
|
+
return Promise.resolve(null);
|
|
2964
|
+
}
|
|
2965
|
+
updateCalendarCapacityAdmin(request) {
|
|
2966
|
+
let url_ = this.baseUrl + "/resourcekpiadmin/calendar";
|
|
2967
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2968
|
+
const content_ = JSON.stringify(request);
|
|
2969
|
+
let options_ = {
|
|
2970
|
+
body: content_,
|
|
2971
|
+
method: "PUT",
|
|
2972
|
+
headers: {
|
|
2973
|
+
"Content-Type": "application/json",
|
|
2974
|
+
"Accept": "application/json"
|
|
2975
|
+
}
|
|
2976
|
+
};
|
|
2977
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2978
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
2979
|
+
}).then((_response) => {
|
|
2980
|
+
return this.processUpdateCalendarCapacityAdmin(_response);
|
|
2981
|
+
});
|
|
2982
|
+
}
|
|
2983
|
+
processUpdateCalendarCapacityAdmin(response) {
|
|
2984
|
+
const status = response.status;
|
|
2985
|
+
let _headers = {};
|
|
2986
|
+
if (response.headers && response.headers.forEach) {
|
|
2987
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
2988
|
+
}
|
|
2989
|
+
;
|
|
2990
|
+
if (status === 200) {
|
|
2991
|
+
return response.text().then((_responseText) => {
|
|
2992
|
+
let result200 = null;
|
|
2993
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2994
|
+
result200 = CalendarCapacityDto.fromJS(resultData200);
|
|
2995
|
+
return result200;
|
|
2996
|
+
});
|
|
2997
|
+
}
|
|
2998
|
+
else if (status !== 200 && status !== 204) {
|
|
2999
|
+
return response.text().then((_responseText) => {
|
|
3000
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3001
|
+
});
|
|
3002
|
+
}
|
|
3003
|
+
return Promise.resolve(null);
|
|
3004
|
+
}
|
|
3005
|
+
getCalendarSettings() {
|
|
3006
|
+
let url_ = this.baseUrl + "/resourcekpiadmin/calendar/settings";
|
|
3007
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
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);
|
|
3046
|
+
let options_ = {
|
|
3047
|
+
body: content_,
|
|
3048
|
+
method: "PUT",
|
|
3049
|
+
headers: {
|
|
3050
|
+
"Content-Type": "application/json",
|
|
3051
|
+
"Accept": "application/json"
|
|
3052
|
+
}
|
|
3053
|
+
};
|
|
3054
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3055
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
3056
|
+
}).then((_response) => {
|
|
3057
|
+
return this.processUpdateCalendarSettings(_response);
|
|
3058
|
+
});
|
|
3059
|
+
}
|
|
3060
|
+
processUpdateCalendarSettings(response) {
|
|
3061
|
+
const status = response.status;
|
|
3062
|
+
let _headers = {};
|
|
3063
|
+
if (response.headers && response.headers.forEach) {
|
|
3064
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
3065
|
+
}
|
|
3066
|
+
;
|
|
3067
|
+
if (status === 200) {
|
|
3068
|
+
return response.text().then((_responseText) => {
|
|
3069
|
+
let result200 = null;
|
|
3070
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3071
|
+
result200 = CalendarSettingsDto.fromJS(resultData200);
|
|
3072
|
+
return result200;
|
|
3073
|
+
});
|
|
3074
|
+
}
|
|
3075
|
+
else if (status !== 200 && status !== 204) {
|
|
3076
|
+
return response.text().then((_responseText) => {
|
|
3077
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3078
|
+
});
|
|
3079
|
+
}
|
|
3080
|
+
return Promise.resolve(null);
|
|
3081
|
+
}
|
|
3082
|
+
getMachineCapacityAdmin() {
|
|
3083
|
+
let url_ = this.baseUrl + "/kpiadmin/capacity";
|
|
3084
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3085
|
+
let options_ = {
|
|
3086
|
+
method: "GET",
|
|
3087
|
+
headers: {
|
|
3088
|
+
"Accept": "application/json"
|
|
3089
|
+
}
|
|
3090
|
+
};
|
|
3091
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3092
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
3093
|
+
}).then((_response) => {
|
|
3094
|
+
return this.processGetMachineCapacityAdmin(_response);
|
|
3095
|
+
});
|
|
3096
|
+
}
|
|
3097
|
+
processGetMachineCapacityAdmin(response) {
|
|
3098
|
+
const status = response.status;
|
|
3099
|
+
let _headers = {};
|
|
3100
|
+
if (response.headers && response.headers.forEach) {
|
|
3101
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
3102
|
+
}
|
|
3103
|
+
;
|
|
3104
|
+
if (status === 200) {
|
|
3105
|
+
return response.text().then((_responseText) => {
|
|
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;
|
|
3114
|
+
});
|
|
3115
|
+
}
|
|
3116
|
+
else if (status !== 200 && status !== 204) {
|
|
3117
|
+
return response.text().then((_responseText) => {
|
|
3118
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3119
|
+
});
|
|
3120
|
+
}
|
|
3121
|
+
return Promise.resolve(null);
|
|
3122
|
+
}
|
|
3123
|
+
updateMachineCapacityAdmin(request) {
|
|
3124
|
+
let url_ = this.baseUrl + "/kpiadmin/capacity";
|
|
3125
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3126
|
+
const content_ = JSON.stringify(request);
|
|
3127
|
+
let options_ = {
|
|
3128
|
+
body: content_,
|
|
3129
|
+
method: "PUT",
|
|
3130
|
+
headers: {
|
|
3131
|
+
"Content-Type": "application/json",
|
|
3132
|
+
"Accept": "application/json"
|
|
3133
|
+
}
|
|
3134
|
+
};
|
|
3135
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3136
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
3137
|
+
}).then((_response) => {
|
|
3138
|
+
return this.processUpdateMachineCapacityAdmin(_response);
|
|
3139
|
+
});
|
|
3140
|
+
}
|
|
3141
|
+
processUpdateMachineCapacityAdmin(response) {
|
|
3142
|
+
const status = response.status;
|
|
3143
|
+
let _headers = {};
|
|
3144
|
+
if (response.headers && response.headers.forEach) {
|
|
3145
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
3146
|
+
}
|
|
3147
|
+
;
|
|
3148
|
+
if (status === 200) {
|
|
3149
|
+
return response.text().then((_responseText) => {
|
|
3150
|
+
let result200 = null;
|
|
3151
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3152
|
+
result200 = MachineCapacityDto.fromJS(resultData200);
|
|
3153
|
+
return result200;
|
|
3154
|
+
});
|
|
3155
|
+
}
|
|
3156
|
+
else if (status !== 200 && status !== 204) {
|
|
3157
|
+
return response.text().then((_responseText) => {
|
|
3158
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3159
|
+
});
|
|
3160
|
+
}
|
|
3161
|
+
return Promise.resolve(null);
|
|
3162
|
+
}
|
|
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() : "") + "&";
|
|
3173
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3174
|
+
let options_ = {
|
|
3175
|
+
method: "GET",
|
|
3176
|
+
headers: {
|
|
3177
|
+
"Accept": "application/json"
|
|
3178
|
+
}
|
|
3179
|
+
};
|
|
3180
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3181
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
3182
|
+
}).then((_response) => {
|
|
3183
|
+
return this.processGetCalendarCapacityAdmin2(_response);
|
|
3184
|
+
});
|
|
3185
|
+
}
|
|
3186
|
+
processGetCalendarCapacityAdmin2(response) {
|
|
3187
|
+
const status = response.status;
|
|
3188
|
+
let _headers = {};
|
|
3189
|
+
if (response.headers && response.headers.forEach) {
|
|
3190
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
3191
|
+
}
|
|
3192
|
+
;
|
|
3193
|
+
if (status === 200) {
|
|
3194
|
+
return response.text().then((_responseText) => {
|
|
3195
|
+
let result200 = null;
|
|
3196
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3197
|
+
if (Array.isArray(resultData200)) {
|
|
3198
|
+
result200 = [];
|
|
3199
|
+
for (let item of resultData200)
|
|
3200
|
+
result200.push(CalendarDayDto.fromJS(item));
|
|
3201
|
+
}
|
|
3202
|
+
return result200;
|
|
3203
|
+
});
|
|
3204
|
+
}
|
|
3205
|
+
else if (status !== 200 && status !== 204) {
|
|
3206
|
+
return response.text().then((_responseText) => {
|
|
3207
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3208
|
+
});
|
|
3209
|
+
}
|
|
3210
|
+
return Promise.resolve(null);
|
|
3211
|
+
}
|
|
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";
|
|
3254
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3255
|
+
let options_ = {
|
|
3256
|
+
method: "GET",
|
|
3257
|
+
headers: {
|
|
3258
|
+
"Accept": "application/json"
|
|
3259
|
+
}
|
|
3260
|
+
};
|
|
3261
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3262
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
3263
|
+
}).then((_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);
|
|
3305
|
+
});
|
|
3306
|
+
}
|
|
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) {
|
|
3467
|
+
const status = response.status;
|
|
3468
|
+
let _headers = {};
|
|
3469
|
+
if (response.headers && response.headers.forEach) {
|
|
3470
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
3471
|
+
}
|
|
3472
|
+
;
|
|
3473
|
+
if (status === 200) {
|
|
3474
|
+
return response.text().then((_responseText) => {
|
|
3475
|
+
let result200 = null;
|
|
3476
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3477
|
+
if (Array.isArray(resultData200)) {
|
|
3478
|
+
result200 = [];
|
|
3479
|
+
for (let item of resultData200)
|
|
3480
|
+
result200.push(UptimeTrendDataPointDto.fromJS(item));
|
|
3481
|
+
}
|
|
3482
|
+
return result200;
|
|
3483
|
+
});
|
|
3484
|
+
}
|
|
3485
|
+
else if (status !== 200 && status !== 204) {
|
|
3486
|
+
return response.text().then((_responseText) => {
|
|
3487
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3488
|
+
});
|
|
3489
|
+
}
|
|
3490
|
+
return Promise.resolve(null);
|
|
3491
|
+
}
|
|
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) + "&";
|
|
3514
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3515
|
+
let options_ = {
|
|
3516
|
+
method: "GET",
|
|
3517
|
+
headers: {
|
|
3518
|
+
"Accept": "application/json"
|
|
3519
|
+
}
|
|
3520
|
+
};
|
|
3521
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3522
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
3523
|
+
}).then((_response) => {
|
|
3524
|
+
return this.processGetMachineKpi2(_response);
|
|
3525
|
+
});
|
|
3526
|
+
}
|
|
3527
|
+
processGetMachineKpi2(response) {
|
|
3528
|
+
const status = response.status;
|
|
3529
|
+
let _headers = {};
|
|
3530
|
+
if (response.headers && response.headers.forEach) {
|
|
3531
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
3532
|
+
}
|
|
3533
|
+
;
|
|
3534
|
+
if (status === 200) {
|
|
3535
|
+
return response.text().then((_responseText) => {
|
|
3536
|
+
let result200 = null;
|
|
3537
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
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
|
+
}
|
|
2828
3648
|
export class ResourcesClient extends AuthorizedApiBase {
|
|
2829
3649
|
constructor(configuration, baseUrl, http) {
|
|
2830
3650
|
super(configuration);
|
|
@@ -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)
|
|
@@ -4036,8 +4863,57 @@ export class UtilizationClient extends AuthorizedApiBase {
|
|
|
4036
4863
|
}
|
|
4037
4864
|
return Promise.resolve(null);
|
|
4038
4865
|
}
|
|
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
|
+
}
|
|
4039
4915
|
getResourceUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone, assetId, assetExternalId) {
|
|
4040
|
-
let url_ = this.baseUrl + "/
|
|
4916
|
+
let url_ = this.baseUrl + "/pulseutilization/datapoints?";
|
|
4041
4917
|
if (utilizationType === null)
|
|
4042
4918
|
throw new globalThis.Error("The parameter 'utilizationType' cannot be null.");
|
|
4043
4919
|
else if (utilizationType !== undefined)
|
|
@@ -4090,7 +4966,7 @@ export class UtilizationClient extends AuthorizedApiBase {
|
|
|
4090
4966
|
return Promise.resolve(null);
|
|
4091
4967
|
}
|
|
4092
4968
|
getCompanyResourceUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone) {
|
|
4093
|
-
let url_ = this.baseUrl + "/
|
|
4969
|
+
let url_ = this.baseUrl + "/pulseutilization/company?";
|
|
4094
4970
|
if (utilizationType === null)
|
|
4095
4971
|
throw new globalThis.Error("The parameter 'utilizationType' cannot be null.");
|
|
4096
4972
|
else if (utilizationType !== undefined)
|
|
@@ -4139,7 +5015,7 @@ export class UtilizationClient extends AuthorizedApiBase {
|
|
|
4139
5015
|
return Promise.resolve(null);
|
|
4140
5016
|
}
|
|
4141
5017
|
getCrossCompanyResourceUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone) {
|
|
4142
|
-
let url_ = this.baseUrl + "/
|
|
5018
|
+
let url_ = this.baseUrl + "/pulseutilization/cross-company?";
|
|
4143
5019
|
if (utilizationType === null)
|
|
4144
5020
|
throw new globalThis.Error("The parameter 'utilizationType' cannot be null.");
|
|
4145
5021
|
else if (utilizationType !== undefined)
|
|
@@ -7891,8 +8767,8 @@ export class DowntimeReasonsClient extends AuthorizedApiBase {
|
|
|
7891
8767
|
}
|
|
7892
8768
|
return Promise.resolve(null);
|
|
7893
8769
|
}
|
|
7894
|
-
|
|
7895
|
-
let url_ = this.baseUrl + "/downtimereasons/
|
|
8770
|
+
listTopDowntimeReasonsForResources(request) {
|
|
8771
|
+
let url_ = this.baseUrl + "/downtimereasons/topreasonsforresources";
|
|
7896
8772
|
url_ = url_.replace(/[?&]$/, "");
|
|
7897
8773
|
const content_ = JSON.stringify(request);
|
|
7898
8774
|
let options_ = {
|
|
@@ -7906,10 +8782,10 @@ export class DowntimeReasonsClient extends AuthorizedApiBase {
|
|
|
7906
8782
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7907
8783
|
return this.http.fetch(url_, transformedOptions_);
|
|
7908
8784
|
}).then((_response) => {
|
|
7909
|
-
return this.
|
|
8785
|
+
return this.processListTopDowntimeReasonsForResources(_response);
|
|
7910
8786
|
});
|
|
7911
8787
|
}
|
|
7912
|
-
|
|
8788
|
+
processListTopDowntimeReasonsForResources(response) {
|
|
7913
8789
|
const status = response.status;
|
|
7914
8790
|
let _headers = {};
|
|
7915
8791
|
if (response.headers && response.headers.forEach) {
|
|
@@ -7920,7 +8796,7 @@ export class DowntimeReasonsClient extends AuthorizedApiBase {
|
|
|
7920
8796
|
return response.text().then((_responseText) => {
|
|
7921
8797
|
let result200 = null;
|
|
7922
8798
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
7923
|
-
result200 =
|
|
8799
|
+
result200 = TopDowntimeReasonsDto.fromJS(resultData200);
|
|
7924
8800
|
return result200;
|
|
7925
8801
|
});
|
|
7926
8802
|
}
|
|
@@ -7931,8 +8807,8 @@ export class DowntimeReasonsClient extends AuthorizedApiBase {
|
|
|
7931
8807
|
}
|
|
7932
8808
|
return Promise.resolve(null);
|
|
7933
8809
|
}
|
|
7934
|
-
|
|
7935
|
-
let url_ = this.baseUrl + "/downtimereasons/
|
|
8810
|
+
createReport(request) {
|
|
8811
|
+
let url_ = this.baseUrl + "/downtimereasons/report";
|
|
7936
8812
|
url_ = url_.replace(/[?&]$/, "");
|
|
7937
8813
|
const content_ = JSON.stringify(request);
|
|
7938
8814
|
let options_ = {
|
|
@@ -7946,144 +8822,10 @@ export class DowntimeReasonsClient extends AuthorizedApiBase {
|
|
|
7946
8822
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7947
8823
|
return this.http.fetch(url_, transformedOptions_);
|
|
7948
8824
|
}).then((_response) => {
|
|
7949
|
-
return this.
|
|
7950
|
-
});
|
|
7951
|
-
}
|
|
7952
|
-
processExportReportToCsv(response) {
|
|
7953
|
-
const status = response.status;
|
|
7954
|
-
let _headers = {};
|
|
7955
|
-
if (response.headers && response.headers.forEach) {
|
|
7956
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
7957
|
-
}
|
|
7958
|
-
;
|
|
7959
|
-
if (status === 200) {
|
|
7960
|
-
return response.text().then((_responseText) => {
|
|
7961
|
-
let result200 = null;
|
|
7962
|
-
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
7963
|
-
result200 = DowntimeReasonsReportCsvDto.fromJS(resultData200);
|
|
7964
|
-
return result200;
|
|
7965
|
-
});
|
|
7966
|
-
}
|
|
7967
|
-
else if (status !== 200 && status !== 204) {
|
|
7968
|
-
return response.text().then((_responseText) => {
|
|
7969
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
7970
|
-
});
|
|
7971
|
-
}
|
|
7972
|
-
return Promise.resolve(null);
|
|
7973
|
-
}
|
|
7974
|
-
}
|
|
7975
|
-
export class KpiAdminClient extends AuthorizedApiBase {
|
|
7976
|
-
constructor(configuration, baseUrl, http) {
|
|
7977
|
-
super(configuration);
|
|
7978
|
-
this.jsonParseReviver = undefined;
|
|
7979
|
-
this.http = http ? http : window;
|
|
7980
|
-
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
7981
|
-
}
|
|
7982
|
-
getMachineCapacityAdmin() {
|
|
7983
|
-
let url_ = this.baseUrl + "/kpiadmin/capacity";
|
|
7984
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
7985
|
-
let options_ = {
|
|
7986
|
-
method: "GET",
|
|
7987
|
-
headers: {
|
|
7988
|
-
"Accept": "application/json"
|
|
7989
|
-
}
|
|
7990
|
-
};
|
|
7991
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7992
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
7993
|
-
}).then((_response) => {
|
|
7994
|
-
return this.processGetMachineCapacityAdmin(_response);
|
|
7995
|
-
});
|
|
7996
|
-
}
|
|
7997
|
-
processGetMachineCapacityAdmin(response) {
|
|
7998
|
-
const status = response.status;
|
|
7999
|
-
let _headers = {};
|
|
8000
|
-
if (response.headers && response.headers.forEach) {
|
|
8001
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
8002
|
-
}
|
|
8003
|
-
;
|
|
8004
|
-
if (status === 200) {
|
|
8005
|
-
return response.text().then((_responseText) => {
|
|
8006
|
-
let result200 = null;
|
|
8007
|
-
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
8008
|
-
if (Array.isArray(resultData200)) {
|
|
8009
|
-
result200 = [];
|
|
8010
|
-
for (let item of resultData200)
|
|
8011
|
-
result200.push(MachineGroupCapacityDto.fromJS(item));
|
|
8012
|
-
}
|
|
8013
|
-
return result200;
|
|
8014
|
-
});
|
|
8015
|
-
}
|
|
8016
|
-
else if (status !== 200 && status !== 204) {
|
|
8017
|
-
return response.text().then((_responseText) => {
|
|
8018
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
8019
|
-
});
|
|
8020
|
-
}
|
|
8021
|
-
return Promise.resolve(null);
|
|
8022
|
-
}
|
|
8023
|
-
updateMachineCapacityAdmin(request) {
|
|
8024
|
-
let url_ = this.baseUrl + "/kpiadmin/capacity";
|
|
8025
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
8026
|
-
const content_ = JSON.stringify(request);
|
|
8027
|
-
let options_ = {
|
|
8028
|
-
body: content_,
|
|
8029
|
-
method: "PUT",
|
|
8030
|
-
headers: {
|
|
8031
|
-
"Content-Type": "application/json",
|
|
8032
|
-
"Accept": "application/json"
|
|
8033
|
-
}
|
|
8034
|
-
};
|
|
8035
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
8036
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
8037
|
-
}).then((_response) => {
|
|
8038
|
-
return this.processUpdateMachineCapacityAdmin(_response);
|
|
8039
|
-
});
|
|
8040
|
-
}
|
|
8041
|
-
processUpdateMachineCapacityAdmin(response) {
|
|
8042
|
-
const status = response.status;
|
|
8043
|
-
let _headers = {};
|
|
8044
|
-
if (response.headers && response.headers.forEach) {
|
|
8045
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
8046
|
-
}
|
|
8047
|
-
;
|
|
8048
|
-
if (status === 200) {
|
|
8049
|
-
return response.text().then((_responseText) => {
|
|
8050
|
-
let result200 = null;
|
|
8051
|
-
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
8052
|
-
result200 = MachineCapacityDto.fromJS(resultData200);
|
|
8053
|
-
return result200;
|
|
8054
|
-
});
|
|
8055
|
-
}
|
|
8056
|
-
else if (status !== 200 && status !== 204) {
|
|
8057
|
-
return response.text().then((_responseText) => {
|
|
8058
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
8059
|
-
});
|
|
8060
|
-
}
|
|
8061
|
-
return Promise.resolve(null);
|
|
8062
|
-
}
|
|
8063
|
-
getCalendarCapacityAdmin(startDate, endDate) {
|
|
8064
|
-
let url_ = this.baseUrl + "/kpiadmin/calendar?";
|
|
8065
|
-
if (startDate === null)
|
|
8066
|
-
throw new globalThis.Error("The parameter 'startDate' cannot be null.");
|
|
8067
|
-
else if (startDate !== undefined)
|
|
8068
|
-
url_ += "startDate=" + encodeURIComponent(startDate ? "" + startDate.toISOString() : "") + "&";
|
|
8069
|
-
if (endDate === null)
|
|
8070
|
-
throw new globalThis.Error("The parameter 'endDate' cannot be null.");
|
|
8071
|
-
else if (endDate !== undefined)
|
|
8072
|
-
url_ += "endDate=" + encodeURIComponent(endDate ? "" + endDate.toISOString() : "") + "&";
|
|
8073
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
8074
|
-
let options_ = {
|
|
8075
|
-
method: "GET",
|
|
8076
|
-
headers: {
|
|
8077
|
-
"Accept": "application/json"
|
|
8078
|
-
}
|
|
8079
|
-
};
|
|
8080
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
8081
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
8082
|
-
}).then((_response) => {
|
|
8083
|
-
return this.processGetCalendarCapacityAdmin(_response);
|
|
8825
|
+
return this.processCreateReport(_response);
|
|
8084
8826
|
});
|
|
8085
8827
|
}
|
|
8086
|
-
|
|
8828
|
+
processCreateReport(response) {
|
|
8087
8829
|
const status = response.status;
|
|
8088
8830
|
let _headers = {};
|
|
8089
8831
|
if (response.headers && response.headers.forEach) {
|
|
@@ -8094,11 +8836,7 @@ export class KpiAdminClient extends AuthorizedApiBase {
|
|
|
8094
8836
|
return response.text().then((_responseText) => {
|
|
8095
8837
|
let result200 = null;
|
|
8096
8838
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
8097
|
-
|
|
8098
|
-
result200 = [];
|
|
8099
|
-
for (let item of resultData200)
|
|
8100
|
-
result200.push(CalendarDayDto.fromJS(item));
|
|
8101
|
-
}
|
|
8839
|
+
result200 = DowntimeReasonsReportDto.fromJS(resultData200);
|
|
8102
8840
|
return result200;
|
|
8103
8841
|
});
|
|
8104
8842
|
}
|
|
@@ -8109,90 +8847,13 @@ export class KpiAdminClient extends AuthorizedApiBase {
|
|
|
8109
8847
|
}
|
|
8110
8848
|
return Promise.resolve(null);
|
|
8111
8849
|
}
|
|
8112
|
-
|
|
8113
|
-
let url_ = this.baseUrl + "/
|
|
8850
|
+
exportReportToCsv(request) {
|
|
8851
|
+
let url_ = this.baseUrl + "/downtimereasons/exporttocsv";
|
|
8114
8852
|
url_ = url_.replace(/[?&]$/, "");
|
|
8115
8853
|
const content_ = JSON.stringify(request);
|
|
8116
8854
|
let options_ = {
|
|
8117
8855
|
body: content_,
|
|
8118
|
-
method: "
|
|
8119
|
-
headers: {
|
|
8120
|
-
"Content-Type": "application/json",
|
|
8121
|
-
"Accept": "application/json"
|
|
8122
|
-
}
|
|
8123
|
-
};
|
|
8124
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
8125
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
8126
|
-
}).then((_response) => {
|
|
8127
|
-
return this.processUpdateCalendarCapacityAdmin(_response);
|
|
8128
|
-
});
|
|
8129
|
-
}
|
|
8130
|
-
processUpdateCalendarCapacityAdmin(response) {
|
|
8131
|
-
const status = response.status;
|
|
8132
|
-
let _headers = {};
|
|
8133
|
-
if (response.headers && response.headers.forEach) {
|
|
8134
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
8135
|
-
}
|
|
8136
|
-
;
|
|
8137
|
-
if (status === 200) {
|
|
8138
|
-
return response.text().then((_responseText) => {
|
|
8139
|
-
let result200 = null;
|
|
8140
|
-
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
8141
|
-
result200 = CalendarCapacityDto.fromJS(resultData200);
|
|
8142
|
-
return result200;
|
|
8143
|
-
});
|
|
8144
|
-
}
|
|
8145
|
-
else if (status !== 200 && status !== 204) {
|
|
8146
|
-
return response.text().then((_responseText) => {
|
|
8147
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
8148
|
-
});
|
|
8149
|
-
}
|
|
8150
|
-
return Promise.resolve(null);
|
|
8151
|
-
}
|
|
8152
|
-
getCalendarSettings() {
|
|
8153
|
-
let url_ = this.baseUrl + "/kpiadmin/calendar/settings";
|
|
8154
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
8155
|
-
let options_ = {
|
|
8156
|
-
method: "GET",
|
|
8157
|
-
headers: {
|
|
8158
|
-
"Accept": "application/json"
|
|
8159
|
-
}
|
|
8160
|
-
};
|
|
8161
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
8162
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
8163
|
-
}).then((_response) => {
|
|
8164
|
-
return this.processGetCalendarSettings(_response);
|
|
8165
|
-
});
|
|
8166
|
-
}
|
|
8167
|
-
processGetCalendarSettings(response) {
|
|
8168
|
-
const status = response.status;
|
|
8169
|
-
let _headers = {};
|
|
8170
|
-
if (response.headers && response.headers.forEach) {
|
|
8171
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
8172
|
-
}
|
|
8173
|
-
;
|
|
8174
|
-
if (status === 200) {
|
|
8175
|
-
return response.text().then((_responseText) => {
|
|
8176
|
-
let result200 = null;
|
|
8177
|
-
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
8178
|
-
result200 = CalendarSettingsDto.fromJS(resultData200);
|
|
8179
|
-
return result200;
|
|
8180
|
-
});
|
|
8181
|
-
}
|
|
8182
|
-
else if (status !== 200 && status !== 204) {
|
|
8183
|
-
return response.text().then((_responseText) => {
|
|
8184
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
8185
|
-
});
|
|
8186
|
-
}
|
|
8187
|
-
return Promise.resolve(null);
|
|
8188
|
-
}
|
|
8189
|
-
updateCalendarSettings(cmd) {
|
|
8190
|
-
let url_ = this.baseUrl + "/kpiadmin/calendar/settings";
|
|
8191
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
8192
|
-
const content_ = JSON.stringify(cmd);
|
|
8193
|
-
let options_ = {
|
|
8194
|
-
body: content_,
|
|
8195
|
-
method: "PUT",
|
|
8856
|
+
method: "POST",
|
|
8196
8857
|
headers: {
|
|
8197
8858
|
"Content-Type": "application/json",
|
|
8198
8859
|
"Accept": "application/json"
|
|
@@ -8201,169 +8862,10 @@ export class KpiAdminClient extends AuthorizedApiBase {
|
|
|
8201
8862
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
8202
8863
|
return this.http.fetch(url_, transformedOptions_);
|
|
8203
8864
|
}).then((_response) => {
|
|
8204
|
-
return this.
|
|
8205
|
-
});
|
|
8206
|
-
}
|
|
8207
|
-
processUpdateCalendarSettings(response) {
|
|
8208
|
-
const status = response.status;
|
|
8209
|
-
let _headers = {};
|
|
8210
|
-
if (response.headers && response.headers.forEach) {
|
|
8211
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
8212
|
-
}
|
|
8213
|
-
;
|
|
8214
|
-
if (status === 200) {
|
|
8215
|
-
return response.text().then((_responseText) => {
|
|
8216
|
-
let result200 = null;
|
|
8217
|
-
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
8218
|
-
result200 = CalendarSettingsDto.fromJS(resultData200);
|
|
8219
|
-
return result200;
|
|
8220
|
-
});
|
|
8221
|
-
}
|
|
8222
|
-
else if (status !== 200 && status !== 204) {
|
|
8223
|
-
return response.text().then((_responseText) => {
|
|
8224
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
8225
|
-
});
|
|
8226
|
-
}
|
|
8227
|
-
return Promise.resolve(null);
|
|
8228
|
-
}
|
|
8229
|
-
}
|
|
8230
|
-
export class KpiClient extends AuthorizedApiBase {
|
|
8231
|
-
constructor(configuration, baseUrl, http) {
|
|
8232
|
-
super(configuration);
|
|
8233
|
-
this.jsonParseReviver = undefined;
|
|
8234
|
-
this.http = http ? http : window;
|
|
8235
|
-
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
8236
|
-
}
|
|
8237
|
-
getMachineKpi(machineExternalId, previousPeriodStartDate, startDate, endDate, utcOffset) {
|
|
8238
|
-
let url_ = this.baseUrl + "/kpi/capacity?";
|
|
8239
|
-
if (machineExternalId === null)
|
|
8240
|
-
throw new globalThis.Error("The parameter 'machineExternalId' cannot be null.");
|
|
8241
|
-
else if (machineExternalId !== undefined)
|
|
8242
|
-
url_ += "machineExternalId=" + encodeURIComponent("" + machineExternalId) + "&";
|
|
8243
|
-
if (previousPeriodStartDate === null)
|
|
8244
|
-
throw new globalThis.Error("The parameter 'previousPeriodStartDate' cannot be null.");
|
|
8245
|
-
else if (previousPeriodStartDate !== undefined)
|
|
8246
|
-
url_ += "previousPeriodStartDate=" + encodeURIComponent(previousPeriodStartDate ? "" + previousPeriodStartDate.toISOString() : "") + "&";
|
|
8247
|
-
if (startDate === null)
|
|
8248
|
-
throw new globalThis.Error("The parameter 'startDate' cannot be null.");
|
|
8249
|
-
else if (startDate !== undefined)
|
|
8250
|
-
url_ += "startDate=" + encodeURIComponent(startDate ? "" + startDate.toISOString() : "") + "&";
|
|
8251
|
-
if (endDate === null)
|
|
8252
|
-
throw new globalThis.Error("The parameter 'endDate' cannot be null.");
|
|
8253
|
-
else if (endDate !== undefined)
|
|
8254
|
-
url_ += "endDate=" + encodeURIComponent(endDate ? "" + endDate.toISOString() : "") + "&";
|
|
8255
|
-
if (utcOffset === null)
|
|
8256
|
-
throw new globalThis.Error("The parameter 'utcOffset' cannot be null.");
|
|
8257
|
-
else if (utcOffset !== undefined)
|
|
8258
|
-
url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
|
|
8259
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
8260
|
-
let options_ = {
|
|
8261
|
-
method: "GET",
|
|
8262
|
-
headers: {
|
|
8263
|
-
"Accept": "application/json"
|
|
8264
|
-
}
|
|
8265
|
-
};
|
|
8266
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
8267
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
8268
|
-
}).then((_response) => {
|
|
8269
|
-
return this.processGetMachineKpi(_response);
|
|
8270
|
-
});
|
|
8271
|
-
}
|
|
8272
|
-
processGetMachineKpi(response) {
|
|
8273
|
-
const status = response.status;
|
|
8274
|
-
let _headers = {};
|
|
8275
|
-
if (response.headers && response.headers.forEach) {
|
|
8276
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
8277
|
-
}
|
|
8278
|
-
;
|
|
8279
|
-
if (status === 200) {
|
|
8280
|
-
return response.text().then((_responseText) => {
|
|
8281
|
-
let result200 = null;
|
|
8282
|
-
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
8283
|
-
result200 = MachineKpiDto.fromJS(resultData200);
|
|
8284
|
-
return result200;
|
|
8285
|
-
});
|
|
8286
|
-
}
|
|
8287
|
-
else if (status !== 200 && status !== 204) {
|
|
8288
|
-
return response.text().then((_responseText) => {
|
|
8289
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
8290
|
-
});
|
|
8291
|
-
}
|
|
8292
|
-
return Promise.resolve(null);
|
|
8293
|
-
}
|
|
8294
|
-
getMachineDailyUptime(machineExternalId, date, utcOffset) {
|
|
8295
|
-
let url_ = this.baseUrl + "/kpi/daily-uptime?";
|
|
8296
|
-
if (machineExternalId === null)
|
|
8297
|
-
throw new globalThis.Error("The parameter 'machineExternalId' cannot be null.");
|
|
8298
|
-
else if (machineExternalId !== undefined)
|
|
8299
|
-
url_ += "machineExternalId=" + encodeURIComponent("" + machineExternalId) + "&";
|
|
8300
|
-
if (date === null)
|
|
8301
|
-
throw new globalThis.Error("The parameter 'date' cannot be null.");
|
|
8302
|
-
else if (date !== undefined)
|
|
8303
|
-
url_ += "date=" + encodeURIComponent(date ? "" + date.toISOString() : "") + "&";
|
|
8304
|
-
if (utcOffset === null)
|
|
8305
|
-
throw new globalThis.Error("The parameter 'utcOffset' cannot be null.");
|
|
8306
|
-
else if (utcOffset !== undefined)
|
|
8307
|
-
url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
|
|
8308
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
8309
|
-
let options_ = {
|
|
8310
|
-
method: "GET",
|
|
8311
|
-
headers: {
|
|
8312
|
-
"Accept": "application/json"
|
|
8313
|
-
}
|
|
8314
|
-
};
|
|
8315
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
8316
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
8317
|
-
}).then((_response) => {
|
|
8318
|
-
return this.processGetMachineDailyUptime(_response);
|
|
8319
|
-
});
|
|
8320
|
-
}
|
|
8321
|
-
processGetMachineDailyUptime(response) {
|
|
8322
|
-
const status = response.status;
|
|
8323
|
-
let _headers = {};
|
|
8324
|
-
if (response.headers && response.headers.forEach) {
|
|
8325
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
8326
|
-
}
|
|
8327
|
-
;
|
|
8328
|
-
if (status === 200) {
|
|
8329
|
-
return response.text().then((_responseText) => {
|
|
8330
|
-
let result200 = null;
|
|
8331
|
-
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
8332
|
-
result200 = MachineDailyUptimeDto.fromJS(resultData200);
|
|
8333
|
-
return result200;
|
|
8334
|
-
});
|
|
8335
|
-
}
|
|
8336
|
-
else if (status !== 200 && status !== 204) {
|
|
8337
|
-
return response.text().then((_responseText) => {
|
|
8338
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
8339
|
-
});
|
|
8340
|
-
}
|
|
8341
|
-
return Promise.resolve(null);
|
|
8342
|
-
}
|
|
8343
|
-
getUptimeNormalTrend(assetId, assetExternalId, date, utcOffset) {
|
|
8344
|
-
let url_ = this.baseUrl + "/kpi/normal-day-trendline?";
|
|
8345
|
-
if (assetId !== undefined && assetId !== null)
|
|
8346
|
-
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
8347
|
-
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
8348
|
-
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
8349
|
-
if (date !== undefined && date !== null)
|
|
8350
|
-
url_ += "date=" + encodeURIComponent(date ? "" + date.toISOString() : "") + "&";
|
|
8351
|
-
if (utcOffset !== undefined && utcOffset !== null)
|
|
8352
|
-
url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
|
|
8353
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
8354
|
-
let options_ = {
|
|
8355
|
-
method: "GET",
|
|
8356
|
-
headers: {
|
|
8357
|
-
"Accept": "application/json"
|
|
8358
|
-
}
|
|
8359
|
-
};
|
|
8360
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
8361
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
8362
|
-
}).then((_response) => {
|
|
8363
|
-
return this.processGetUptimeNormalTrend(_response);
|
|
8865
|
+
return this.processExportReportToCsv(_response);
|
|
8364
8866
|
});
|
|
8365
8867
|
}
|
|
8366
|
-
|
|
8868
|
+
processExportReportToCsv(response) {
|
|
8367
8869
|
const status = response.status;
|
|
8368
8870
|
let _headers = {};
|
|
8369
8871
|
if (response.headers && response.headers.forEach) {
|
|
@@ -8374,11 +8876,7 @@ export class KpiClient extends AuthorizedApiBase {
|
|
|
8374
8876
|
return response.text().then((_responseText) => {
|
|
8375
8877
|
let result200 = null;
|
|
8376
8878
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
8377
|
-
|
|
8378
|
-
result200 = [];
|
|
8379
|
-
for (let item of resultData200)
|
|
8380
|
-
result200.push(UptimeTrendDataPointDto.fromJS(item));
|
|
8381
|
-
}
|
|
8879
|
+
result200 = DowntimeReasonsReportCsvDto.fromJS(resultData200);
|
|
8382
8880
|
return result200;
|
|
8383
8881
|
});
|
|
8384
8882
|
}
|
|
@@ -27848,6 +28346,517 @@ export class CncProgramInfoDto {
|
|
|
27848
28346
|
return data;
|
|
27849
28347
|
}
|
|
27850
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
|
+
}
|
|
27851
28860
|
export class ApplicationResourcesResourceDto {
|
|
27852
28861
|
constructor(data) {
|
|
27853
28862
|
if (data) {
|
|
@@ -29638,6 +30647,136 @@ export class NamedCompanyUtilizationDatapointListDto extends CompanyUtilizationD
|
|
|
29638
30647
|
return data;
|
|
29639
30648
|
}
|
|
29640
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
|
+
}
|
|
29641
30780
|
export class ResourceUtilizationDatapointListDto extends UtilizationDatapointListDto {
|
|
29642
30781
|
constructor(data) {
|
|
29643
30782
|
super(data);
|
|
@@ -33636,6 +34775,44 @@ export class DowntimeReasonCountDto {
|
|
|
33636
34775
|
return data;
|
|
33637
34776
|
}
|
|
33638
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
|
+
}
|
|
33639
34816
|
export class DowntimeReasonsReportDto {
|
|
33640
34817
|
constructor(data) {
|
|
33641
34818
|
if (data) {
|
|
@@ -33996,178 +35173,6 @@ export class UpdateMachinesCapacity {
|
|
|
33996
35173
|
return data;
|
|
33997
35174
|
}
|
|
33998
35175
|
}
|
|
33999
|
-
export class CalendarDayDto {
|
|
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.date = _data["date"] ? new Date(_data["date"].toString()) : undefined;
|
|
34011
|
-
this.dayCapacity = _data["dayCapacity"];
|
|
34012
|
-
this.capacityHours = _data["capacityHours"];
|
|
34013
|
-
this.companyId = _data["companyId"];
|
|
34014
|
-
}
|
|
34015
|
-
}
|
|
34016
|
-
static fromJS(data) {
|
|
34017
|
-
data = typeof data === 'object' ? data : {};
|
|
34018
|
-
let result = new CalendarDayDto();
|
|
34019
|
-
result.init(data);
|
|
34020
|
-
return result;
|
|
34021
|
-
}
|
|
34022
|
-
toJSON(data) {
|
|
34023
|
-
data = typeof data === 'object' ? data : {};
|
|
34024
|
-
data["date"] = this.date ? this.date.toISOString() : undefined;
|
|
34025
|
-
data["dayCapacity"] = this.dayCapacity;
|
|
34026
|
-
data["capacityHours"] = this.capacityHours;
|
|
34027
|
-
data["companyId"] = this.companyId;
|
|
34028
|
-
return data;
|
|
34029
|
-
}
|
|
34030
|
-
}
|
|
34031
|
-
export class CalendarCapacityDto {
|
|
34032
|
-
constructor(data) {
|
|
34033
|
-
if (data) {
|
|
34034
|
-
for (var property in data) {
|
|
34035
|
-
if (data.hasOwnProperty(property))
|
|
34036
|
-
this[property] = data[property];
|
|
34037
|
-
}
|
|
34038
|
-
}
|
|
34039
|
-
}
|
|
34040
|
-
init(_data) {
|
|
34041
|
-
if (_data) {
|
|
34042
|
-
this.date = _data["date"] ? new Date(_data["date"].toString()) : undefined;
|
|
34043
|
-
this.dayCapacity = _data["dayCapacity"];
|
|
34044
|
-
}
|
|
34045
|
-
}
|
|
34046
|
-
static fromJS(data) {
|
|
34047
|
-
data = typeof data === 'object' ? data : {};
|
|
34048
|
-
let result = new CalendarCapacityDto();
|
|
34049
|
-
result.init(data);
|
|
34050
|
-
return result;
|
|
34051
|
-
}
|
|
34052
|
-
toJSON(data) {
|
|
34053
|
-
data = typeof data === 'object' ? data : {};
|
|
34054
|
-
data["date"] = this.date ? this.date.toISOString() : undefined;
|
|
34055
|
-
data["dayCapacity"] = this.dayCapacity;
|
|
34056
|
-
return data;
|
|
34057
|
-
}
|
|
34058
|
-
}
|
|
34059
|
-
export class UpdateCalendarCapacity {
|
|
34060
|
-
constructor(data) {
|
|
34061
|
-
if (data) {
|
|
34062
|
-
for (var property in data) {
|
|
34063
|
-
if (data.hasOwnProperty(property))
|
|
34064
|
-
this[property] = data[property];
|
|
34065
|
-
}
|
|
34066
|
-
}
|
|
34067
|
-
}
|
|
34068
|
-
init(_data) {
|
|
34069
|
-
if (_data) {
|
|
34070
|
-
this.date = _data["date"] ? new Date(_data["date"].toString()) : undefined;
|
|
34071
|
-
this.dayCapacity = _data["dayCapacity"];
|
|
34072
|
-
}
|
|
34073
|
-
}
|
|
34074
|
-
static fromJS(data) {
|
|
34075
|
-
data = typeof data === 'object' ? data : {};
|
|
34076
|
-
let result = new UpdateCalendarCapacity();
|
|
34077
|
-
result.init(data);
|
|
34078
|
-
return result;
|
|
34079
|
-
}
|
|
34080
|
-
toJSON(data) {
|
|
34081
|
-
data = typeof data === 'object' ? data : {};
|
|
34082
|
-
data["date"] = this.date ? this.date.toISOString() : undefined;
|
|
34083
|
-
data["dayCapacity"] = this.dayCapacity;
|
|
34084
|
-
return data;
|
|
34085
|
-
}
|
|
34086
|
-
}
|
|
34087
|
-
export class CalendarSettingsDto {
|
|
34088
|
-
constructor(data) {
|
|
34089
|
-
if (data) {
|
|
34090
|
-
for (var property in data) {
|
|
34091
|
-
if (data.hasOwnProperty(property))
|
|
34092
|
-
this[property] = data[property];
|
|
34093
|
-
}
|
|
34094
|
-
}
|
|
34095
|
-
}
|
|
34096
|
-
init(_data) {
|
|
34097
|
-
if (_data) {
|
|
34098
|
-
if (_data["defaultHoursPerWeekday"]) {
|
|
34099
|
-
this.defaultHoursPerWeekday = {};
|
|
34100
|
-
for (let key in _data["defaultHoursPerWeekday"]) {
|
|
34101
|
-
if (_data["defaultHoursPerWeekday"].hasOwnProperty(key))
|
|
34102
|
-
this.defaultHoursPerWeekday[key] = _data["defaultHoursPerWeekday"][key];
|
|
34103
|
-
}
|
|
34104
|
-
}
|
|
34105
|
-
this.halfDayHours = _data["halfDayHours"];
|
|
34106
|
-
this.holidayHours = _data["holidayHours"];
|
|
34107
|
-
}
|
|
34108
|
-
}
|
|
34109
|
-
static fromJS(data) {
|
|
34110
|
-
data = typeof data === 'object' ? data : {};
|
|
34111
|
-
let result = new CalendarSettingsDto();
|
|
34112
|
-
result.init(data);
|
|
34113
|
-
return result;
|
|
34114
|
-
}
|
|
34115
|
-
toJSON(data) {
|
|
34116
|
-
data = typeof data === 'object' ? data : {};
|
|
34117
|
-
if (this.defaultHoursPerWeekday) {
|
|
34118
|
-
data["defaultHoursPerWeekday"] = {};
|
|
34119
|
-
for (let key in this.defaultHoursPerWeekday) {
|
|
34120
|
-
if (this.defaultHoursPerWeekday.hasOwnProperty(key))
|
|
34121
|
-
data["defaultHoursPerWeekday"][key] = this.defaultHoursPerWeekday[key];
|
|
34122
|
-
}
|
|
34123
|
-
}
|
|
34124
|
-
data["halfDayHours"] = this.halfDayHours;
|
|
34125
|
-
data["holidayHours"] = this.holidayHours;
|
|
34126
|
-
return data;
|
|
34127
|
-
}
|
|
34128
|
-
}
|
|
34129
|
-
export class UpdateCalendarSettingsCommand {
|
|
34130
|
-
constructor(data) {
|
|
34131
|
-
if (data) {
|
|
34132
|
-
for (var property in data) {
|
|
34133
|
-
if (data.hasOwnProperty(property))
|
|
34134
|
-
this[property] = data[property];
|
|
34135
|
-
}
|
|
34136
|
-
}
|
|
34137
|
-
}
|
|
34138
|
-
init(_data) {
|
|
34139
|
-
if (_data) {
|
|
34140
|
-
if (_data["defaultHoursPerWeekday"]) {
|
|
34141
|
-
this.defaultHoursPerWeekday = {};
|
|
34142
|
-
for (let key in _data["defaultHoursPerWeekday"]) {
|
|
34143
|
-
if (_data["defaultHoursPerWeekday"].hasOwnProperty(key))
|
|
34144
|
-
this.defaultHoursPerWeekday[key] = _data["defaultHoursPerWeekday"][key];
|
|
34145
|
-
}
|
|
34146
|
-
}
|
|
34147
|
-
this.halfDayHours = _data["halfDayHours"];
|
|
34148
|
-
this.holidayHours = _data["holidayHours"];
|
|
34149
|
-
}
|
|
34150
|
-
}
|
|
34151
|
-
static fromJS(data) {
|
|
34152
|
-
data = typeof data === 'object' ? data : {};
|
|
34153
|
-
let result = new UpdateCalendarSettingsCommand();
|
|
34154
|
-
result.init(data);
|
|
34155
|
-
return result;
|
|
34156
|
-
}
|
|
34157
|
-
toJSON(data) {
|
|
34158
|
-
data = typeof data === 'object' ? data : {};
|
|
34159
|
-
if (this.defaultHoursPerWeekday) {
|
|
34160
|
-
data["defaultHoursPerWeekday"] = {};
|
|
34161
|
-
for (let key in this.defaultHoursPerWeekday) {
|
|
34162
|
-
if (this.defaultHoursPerWeekday.hasOwnProperty(key))
|
|
34163
|
-
data["defaultHoursPerWeekday"][key] = this.defaultHoursPerWeekday[key];
|
|
34164
|
-
}
|
|
34165
|
-
}
|
|
34166
|
-
data["halfDayHours"] = this.halfDayHours;
|
|
34167
|
-
data["holidayHours"] = this.holidayHours;
|
|
34168
|
-
return data;
|
|
34169
|
-
}
|
|
34170
|
-
}
|
|
34171
35176
|
export class MachineKpiDto {
|
|
34172
35177
|
constructor(data) {
|
|
34173
35178
|
if (data) {
|
|
@@ -34317,34 +35322,6 @@ export class MachineDailyUptimePointDto {
|
|
|
34317
35322
|
return data;
|
|
34318
35323
|
}
|
|
34319
35324
|
}
|
|
34320
|
-
export class UptimeTrendDataPointDto {
|
|
34321
|
-
constructor(data) {
|
|
34322
|
-
if (data) {
|
|
34323
|
-
for (var property in data) {
|
|
34324
|
-
if (data.hasOwnProperty(property))
|
|
34325
|
-
this[property] = data[property];
|
|
34326
|
-
}
|
|
34327
|
-
}
|
|
34328
|
-
}
|
|
34329
|
-
init(_data) {
|
|
34330
|
-
if (_data) {
|
|
34331
|
-
this.timestamp = _data["timestamp"] ? new Date(_data["timestamp"].toString()) : undefined;
|
|
34332
|
-
this.uptime = _data["uptime"];
|
|
34333
|
-
}
|
|
34334
|
-
}
|
|
34335
|
-
static fromJS(data) {
|
|
34336
|
-
data = typeof data === 'object' ? data : {};
|
|
34337
|
-
let result = new UptimeTrendDataPointDto();
|
|
34338
|
-
result.init(data);
|
|
34339
|
-
return result;
|
|
34340
|
-
}
|
|
34341
|
-
toJSON(data) {
|
|
34342
|
-
data = typeof data === 'object' ? data : {};
|
|
34343
|
-
data["timestamp"] = this.timestamp ? this.timestamp.toISOString() : undefined;
|
|
34344
|
-
data["uptime"] = this.uptime;
|
|
34345
|
-
return data;
|
|
34346
|
-
}
|
|
34347
|
-
}
|
|
34348
35325
|
export class MachineGroupDto {
|
|
34349
35326
|
constructor(data) {
|
|
34350
35327
|
if (data) {
|
|
@@ -48115,7 +49092,6 @@ export class SaveValueResponseDto {
|
|
|
48115
49092
|
if (_data) {
|
|
48116
49093
|
this.elementCompleted = _data["elementCompleted"];
|
|
48117
49094
|
this.warning = _data["warning"];
|
|
48118
|
-
this.informationText = _data["informationText"];
|
|
48119
49095
|
this.isOutsideTolerances = _data["isOutsideTolerances"];
|
|
48120
49096
|
this.isCloseToTolerances = _data["isCloseToTolerances"];
|
|
48121
49097
|
if (Array.isArray(_data["tools"])) {
|
|
@@ -48135,7 +49111,6 @@ export class SaveValueResponseDto {
|
|
|
48135
49111
|
data = typeof data === 'object' ? data : {};
|
|
48136
49112
|
data["elementCompleted"] = this.elementCompleted;
|
|
48137
49113
|
data["warning"] = this.warning;
|
|
48138
|
-
data["informationText"] = this.informationText;
|
|
48139
49114
|
data["isOutsideTolerances"] = this.isOutsideTolerances;
|
|
48140
49115
|
data["isCloseToTolerances"] = this.isCloseToTolerances;
|
|
48141
49116
|
if (Array.isArray(this.tools)) {
|